This wiki is intended to document my creation of my own automated home.  It all took place over many, many, years, starting as far back as 1994.  (Yes, I was doing Internet of Things long before most people had thought about it.  It's true.)

I'll approach this from a hierarchical viewpoint.

At the top level, I have my "xten.html" web page.  This invokes the "xt" script.  This script standardizes the names of all items in the house and allows a simple "on" and "off" command line interface, regardless of whether you're controlling an X10 device, a Wink device, or even a Nest Thermostat.  This allows one main web page to control everything in the house, regardless of what type of device it happens to be.  Also, having one primary script which controls everything, allows for a simple, standard, interface which other scripts can utilize in order to accomplish those basic operations.

The whole system is built upon a series of simple building blocks.  (You don't have to build, or even design, the whole system from the outset.  This system was built over, literally, decades.  Just make sure that each part of the system does one basic operation in a standardized way, and does it in such a way that it can easily be utilized as a primitive operation in higher level functional units.  This is the basis of the design of Unix, and allows for incremental improvements and additions over time.  Just think, "building block", and don't get carried away with greater functionality.  Then, be willing to rewrite as you go.)

The "xt" script controls the following types of devices:

  • X10 devices - via writing X10 commands to "ti103_fifo" (a unix named pipe interface to the "ti103" program.
  • Wink devices - via invoking the "wink.pl" PERL script, which talks REST to Wink's server.
  • Nest devices - via invoking the "nest_set.py" script, which talks REST to Nest's server.
    (I admit that currently this simple program only turns my thermostat on or off.)

(I originally wrote the "nest" script in PERL also, but then wanted to learn Python, so I re-wrote it in Python. Together, the "wink" and "nest" scripts serve as examples of how to do REST in both languages.)

(The "ti103" program is written in "C" and talks over a serial line to the "TI103" device.  This device talks the X10 protocol over power lines as well as listens to X10 commands invoked from elsewhere.)

I have a Davis Weather Station on my roof.  Here's the program which reads from the console and stores the information into various files.

If you have an iPhone, you can control all of this using the "homebridge" program.  Just install "node", then install "homebridge".  I also installed the following other packages:

Commands used:

sudo npm install homebridge
sudo npm install homebridge-gsh
        for integration with Google Home
sudo npm install homebridge-config-ui-x 
        for configuring homebridge-gsh
sudo npm install homebridge-wink3 
        for integration with the Wink Hub 2
sudo npm install homebridge-cmdswitch2
        along with "homebridge-readablehttp" for controlling arbitrary devices via a URL
sudo npm install homebridge-readablehttp
        along with "homebridge-cmdswitch2" above

Once you have homebridge working, then installing homebridge-gsh allows control of all homebridge devices via Google Home.

Please feel free to contact me with questions about any of this.

(I'll be adding more and more to this description in the future.  Sorry, but this documentation effort is just starting.)

/raj

List of Fitbit software projects

Tags:
Created by superadmin on 2009/09/09 00:00
    

Need help?

If you need help with XWiki you can contact: