# Wiki source code of Home automation

Last modified by Richard Johnson on 2020/08/01 16:29
Export
Office Formats
Export as PDF
Other Formats

Select the pages to export:

select all/ none

Legend:
  Created Page
  Modified Extension Page
  Clean Extension Page

Export as HTML

Show last authors

author | version | line-number | content
--- | --- | --- | ---
|  | 1 | I'll approach this from a hierarchical viewpoint.
|  | 2 | \\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.
|  | 3 | \\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.)
|  | 4 | \\The "xt" script controls the following types of devices:
|  | 5 |
|  | 6 | * X10 devices - via writing X10 commands to "ti103_fifo" (a unix named pipe interface to the "[[ti103>>path:/xwiki/wiki/iotstuff/view/Main/ti103/]]" program.
|  | 7 | * Wink devices - via invoking the "[[wink.pl>>path:/xwiki/wiki/iotstuff/view/wink/pl/]]" PERL script, which talks REST to Wink's server.
|  | 8 | * Nest devices - via invoking the "[[nest_set.py>>path:/xwiki/wiki/iotstuff/view/nest_set/py/]]" script, which talks REST to Nest's server.
|  | 9 | (I admit that currently this simple program only turns my thermostat on or off.)
|  | 10 |
|  | 11 | (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.)
|  | 12 |
|  | 13 | (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.)
|  | 14 |
|  | 15 | I have a Davis Weather Station on my roof. [[Here's the program>>url:https://github.com/rajid/davis_weather]] which reads from the console and stores the information into various files.
|  | 16 |
|  | 17 | If you have an iPhone, you can control all of this using the "homebridge" program. Just install "[[node>>url:https://nodejs.org/en/download/]]", then install "homebridge". I also installed the following other packages:
|  | 18 |
|  | 19 |
|  | 20 | Commands used:
|  | 21 |
|  | 22 | **sudo npm install homebridge**
|  | 23 | **sudo npm install [[**homebridge-gsh**>>url:https://www.npmjs.com/package/homebridge-gsh]]**
|  | 24 | for integration with Google Home
|  | 25 | **sudo npm install homebridge-config-ui-x **
|  | 26 | for configuring homebridge-gsh
|  | 27 | **sudo npm install homebridge-wink3 **
|  | 28 | for integration with the Wink Hub 2
|  | 29 | **sudo npm install homebridge-cmdswitch2**
|  | 30 | along with "homebridge-readablehttp" for controlling arbitrary devices via a URL
|  | 31 | **sudo npm install homebridge-readablehttp**
|  | 32 | along with "homebridge-cmdswitch2" above
|  | 33 |
|  | 34 |
|  | 35 | Once you have homebridge working, then installing homebridge-gsh allows control of all homebridge devices via Google Home.
|  | 36 |
|  | 37 |
|  | 38 | Please feel free to contact me with questions about any of this.
|  | 39 |
|  | 40 | (I'll be adding more and more to this description in the future. Sorry, but this documentation effort is just starting.)
|  | 41 |
|  | 42 | /raj

# Applications

# Tips

If you're a new XWiki user, check out the Getting Started Guide.

# Need help?

If you need help with XWiki you can contact:

- Community Support
- Professional Support

XWiki Debian 13.10.2