Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
livebox:hah [2011/12/18 19:07] – [Home Automation Hub (Overview)] brett | livebox:hah [2013/04/12 08:30] – [Home Automation Hub (Overview)] minerva9 | ||
---|---|---|---|
Line 5: | Line 5: | ||
The Home Automation Hub (HAH) Project transforms the [[Livebox]] into one of the **most capable and affordable** Home Automation systems that you might imagine. | The Home Automation Hub (HAH) Project transforms the [[Livebox]] into one of the **most capable and affordable** Home Automation systems that you might imagine. | ||
- | < | ||
- | <iframe src=" | ||
- | </ | ||
{{: | {{: | ||
- | ====== | ||
The following features were proven to make this project a winner: {{ hah-box.jpg? | The following features were proven to make this project a winner: {{ hah-box.jpg? | ||
Line 43: | Line 39: | ||
| {{: | | {{: | ||
- | ====== Try the HAH firmware ====== | + | Also, control from Andriod devices |
- | The HAH firmware is a complete, free, replacement for the Livebox firmware. It is open-sourced, | + | Now with a [[xAPFlash]] interface! |
- | \\ | + | |
- | \\ | + | |
- | To give it a try, start by downloading the file [[http:// | + | |
- | To install this .dwb firmware onto your Livebox, you'll need to follow some detailed instructions. There are four main stages in the process. | + | |
- | + | ||
- | 1. [[firmware# | + | |
- | 2. [[commandlineaccess|Gain command line access]] | + | |
- | 3. [[buildingfirmware# | + | |
- | 4. [[firmware|Flash the HAH firmware onto the Livebox]] | + | |
- | + | ||
- | This firmware replacement is fully functional; [[http:// | + | |
- | This is also a great way to get yourself a new kernel | + | |
- | + | ||
- | < | + | |
- | If you find the idea of reflashing your Livebox too daunting, you can buy a pre-flashed HAH in the [[http:// | + | |
- | </ | + | |
- | Useful information about the HAH firmware: | + | |
- | * uses DHCP by default to obtain an IP address. | + | |
- | * Default **root** password is **admin** | + | |
- | * SSH enabled ([[http:// | + | |
- | * Console login disabled as this is where the additional hardware attaches. | + | |
- | * Webserver listens on port 80. | + | |
- | * [[http:// | + | |
- | * No ADSL or WiFi support. Once you reflash with the HAH firmware, the Livebox is no longer an ADSL/WiFi router. | + | |
- | * The two ethernet ports are bridged, the MAC address of the unit is that of the bridge, not the one on the label on the box. | + | |
- | <note tip> | + | |
- | {{ : | + | |
- | </ | + | |
- | Then perhaps go for a Livebox gcc or python! see [[development# | + | |
+ | ^ Mobile App ^ | ||
+ | | {{: | ||
====== Architecture ====== | ====== Architecture ====== | ||
Line 90: | Line 59: | ||
{{block_diagram.png|}} | {{block_diagram.png|}} | ||
- | * [[hah# | + | * xap-HUB - allows multiple xAP devices to be controlled |
* [[xap_adapter|xap-adapter]] - convert the AVR menu interface into an xAP protocol and interfaces with the RS232 port. | * [[xap_adapter|xap-adapter]] - convert the AVR menu interface into an xAP protocol and interfaces with the RS232 port. | ||
- | * [[xap_currentcost|xap-currentcost]] - USB/Serial interface to the [[http:// | + | * [[xap_currentcost|xap-currentcost]] - USB/Serial interface to the [[http:// |
* [[sms|xap-sms]] - USB/Serial interface via a DLR-3 cable to a Nokia 7110 mobile phone. | * [[sms|xap-sms]] - USB/Serial interface via a DLR-3 cable to a Nokia 7110 mobile phone. | ||
- | * [[pachube|xap-pachube]] - Feed xAP BSC data to the [[http:// | + | * [[pachube|xap-pachube]] - Feed xAP BSC data to the [[http:// |
- | * [[google_calendar|xap-googlecal]] - Trigger xAP event from Google calendar | + | * [[google_calendar|xap-googlecal]] - Trigger xAP events |
* [[twitter|xap-twitter]] - Remote control with Twitter. | * [[twitter|xap-twitter]] - Remote control with Twitter. | ||
- | * [[hah_plugboard_v2|xap-plugboard]] - [[http:// | + | * [[hah_plugboard_v2|xap-plugboard]] - [[http:// |
- | * [[iserver]] - xAP/TCP gateway for running a wi-fi based touch screen for remote control. | + | * [[iserver]] - xAP/TCP gateway for running a Wi-Fi based touch screen for remote control. |
All components use the file / | All components use the file / | ||
- | |||
- | ====== Background on xAP ====== | ||
- | |||
- | The best way to start understanding xAP is to read the [[http:// | ||
- | |||
- | A tool to help you view the endpoint control hierarchy - [[http:// | ||
- | |||
- | Here you can see all the endpoints on the Livebox Controller that can be directly addressed using the xAP protocol. | ||
- | |||
- | {{: | ||
- | |||
- | For more information about programming the Livebox with xAP and Python see [[: | ||
- | |||
- | ===== xAPBSC.cmd ===== | ||
- | |||
- | Using the xAPBSC.cmd class we can define actions. | ||
- | Turn on RF relay 1. | ||
- | < | ||
- | xAP-header | ||
- | { | ||
- | v=12 | ||
- | hop=1 | ||
- | uid=FF123400 | ||
- | class=xAPBSC.cmd | ||
- | source=acme.my.controller | ||
- | target=dbzoo.livebox.controller: | ||
- | } | ||
- | output.state.1 | ||
- | { | ||
- | id=* | ||
- | state=on | ||
- | } | ||
- | </ | ||
- | |||
- | Display the string "Hello World" on the LCD display | ||
- | < | ||
- | xAP-header | ||
- | { | ||
- | v=12 | ||
- | hop=1 | ||
- | uid=FF123400 | ||
- | class=xAPBSC.cmd | ||
- | source=acme.my.controller | ||
- | target=dbzoo.livebox.controller: | ||
- | } | ||
- | output.state.1 | ||
- | { | ||
- | id=* | ||
- | text=Hello World | ||
- | } | ||
- | </ | ||
- | ===== xAPBSC.info / .event ===== | ||
- | |||
- | Messages in xAPBSC.info and .event are sent to indicate the current state of an Input or Output. | ||
- | |||
- | This sample message is telling us that Channel 1 of the CurrentCost device is using 576 watts of power.\\ | ||
- | A **.event** will be triggered as soon as a data value changes. | ||
- | < | ||
- | xAP-header | ||
- | { | ||
- | v=12 | ||
- | hop=1 | ||
- | uid=FF00DC01 | ||
- | class=xAPBSC.event | ||
- | source=dbzoo.livebox.CurrentCost: | ||
- | } | ||
- | input.state | ||
- | { | ||
- | level=576 | ||
- | } | ||
- | </ | ||
- | |||
- | **.info** messages are sent every couple of minutes to show the current state of the system. | ||
- | < | ||
- | xAP-header | ||
- | { | ||
- | v=12 | ||
- | hop=1 | ||
- | uid=FF00DB0E | ||
- | class=xAPBSC.info | ||
- | source=dbzoo.livebox.Controller: | ||
- | } | ||
- | output.state | ||
- | { | ||
- | state=off | ||
- | } | ||
- | </ | ||
- | ===== xAPBSC.query ===== | ||
- | |||
- | To get an immediate .INFO response from an end point we can direct a .query message to an endpoint or set of endpoints. | ||
- | |||
- | < | ||
- | xap-header | ||
- | { | ||
- | v=12 | ||
- | hop=1 | ||
- | uid=FF00DB00 | ||
- | class=xAPBSC.query | ||
- | source= ACME.Controller.Central | ||
- | target= dbzoo.livebox.controller: | ||
- | } | ||
- | request | ||
- | { | ||
- | } | ||
- | </ | ||
- | |||
- | |||
- | ====== WebServer ====== | ||
- | |||
- | The webserver is written in C using | ||
- | * embedded web server from [[http:// | ||
- | * [[http:// | ||
- | |||
- | The web server listens on PORT 80 from here you can control most of the Home Automation controller features. | ||
- | |||
- | {{: | ||
- | |||
- | To access any other page but **info** you will need to authenticate. | ||
- | |||
- | {{: | ||
- | |||
- | [[hah_webserver|More screenshots]] | ||
- | |||
- | |||
- | ===== Settings ===== | ||
- | |||
- | There are several settings in the / | ||
- | ==== Network / Services ==== | ||
- | |||
- | The network section defines what additional services will be enabled and the ports used, whether DHCP or STATIC IP configuration is setup, if the two Ethernet ports should be bridged together into a Switch configuration or addressed individually, | ||
- | |||
- | {{setup1.PNG}} | ||
- | |||
- | < | ||
- | [network] | ||
- | lan_proto=dhcp | ||
- | hostname=hahbox | ||
- | config_bridge=1 | ||
- | ether_0=00: | ||
- | ether_1=00: | ||
- | domain= | ||
- | ntp_host=uk.pool.ntp.org | ||
- | </ | ||
- | |||
- | The power LED indicator, although it appears on the SETUP page, has its own section. | ||
- | < | ||
- | [hardware] | ||
- | power=0 | ||
- | </ | ||
- | |||
- | These network entries allow in-built services such as SSH, TELNET and FTP to be enabled/ | ||
- | |||
- | {{services.PNG}} | ||
- | |||
- | < | ||
- | [network] | ||
- | telnet_enable=0 | ||
- | telnet_port=23 | ||
- | ssh_enable=1 | ||
- | ssh_port=22 | ||
- | </ | ||
- | |||
- | ==== Access Security ==== | ||
- | |||
- | Access to various pages in the HAH controller can be controlled in the [security] section. | ||
- | |||
- | < | ||
- | [security] | ||
- | user=demo | ||
- | passwd=secret | ||
- | demo=automation, | ||
- | </ | ||
- | |||
- | Will create a login user called " | ||
- | |||
- | Up to 10 additional user accounts can be created. | ||
- | < | ||
- | [security] | ||
- | user=demo, | ||
- | passwd=secret, | ||
- | demo=automation, | ||
- | foo=automation, | ||
- | </ | ||
- | |||
- | The page names are derived from the names of the pages as defined in the URL. For example the page setup.kl1 will be " | ||
- | |||
- | There are two other entries that appear in the security section that are update-able via the webserver\\ | ||
- | {{admin.PNG}} | ||
- | |||
- | < | ||
- | info_protect=0 | ||
- | admin_passwd=21232f297a57a5a743894a0e4a801fc3 | ||
- | </ | ||
- | |||
- | Info protect controls whether the INFO page is displayed without needing to authenticate as a valid user. The admin_password is an MD5 hash of the special user " | ||
- | |||
- | If you forget the " | ||
- | |||
- | ==== Wake on LAN ==== | ||
- | |||
- | Wake on LAN is a great way to save power by keeping your PC on ' | ||
- | \\ | ||
- | \\ | ||
- | More details of regarding WOL can be found [[http:// | ||
- | |||
- | \\ | ||
- | {{wol.png}} | ||
{{tag> | {{tag> | ||
~~DISCUSSION: | ~~DISCUSSION: |