livebox:xap_serial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
livebox:xap_serial [2012/04/20 19:42] – [Output messages] brettlivebox:xap_serial [2014/02/16 05:56] (current) – [Enabling] brett
Line 9: Line 9:
 {{:livebox:xap-serial-webgui.png|}} {{:livebox:xap-serial-webgui.png|}}
  
-xAP serial uses the common ''/etc/xap-livebox.ini'' configuration file.  There is only one option, opening and closing serial ports is done via the xAP schema protocol.+xAP serial uses the ''/etc/xap.d/xap-serial.ini'' configuration file.  There is only one option, opening and closing serial ports is done via the xAP schema protocol.
  
 <code ini> <code ini>
Line 74: Line 74:
  
 The data= key supports escaping so that you can send non-printable characters the following are supported: The data= key supports escaping so that you can send non-printable characters the following are supported:
-^^ Escape Sequence ^^ Hex ^^ Represents ^^ +^^ Escape Sequence ^^ Hex ^^ Represents ^^ When ^^ 
-|| \a || 0x07 || Bell (alert) || +|| \a || 0x07 || Bell (alert) || || 
-|| \b || 0x08 || Backspace || +|| \b || 0x08 || Backspace || || 
-|| \f || 0x0c ||Form feed || +|| \f || 0x0c ||Form feed || || 
-|| \n || 0x0a || New line || +|| \n || 0x0a || New line || || 
-|| \r || 0x0d || Carriage return || +|| \r || 0x0d || Carriage return || || 
-|| \t || 0x09 || Horizontal tab || +|| \t || 0x09 || Horizontal tab || || 
-|| \v || 0x0b || Vertical tab || +|| \v || 0x0b || Vertical tab || || 
-|| ''\\'' || 0x5c || Backslash || +|| ''\\'' || 0x5c || Backslash || || 
-|| \ooo || 0x## || An octal bit pattern  || +|| \ooo || 0x## || An octal bit pattern  || || 
-|| \x## || 0x## || A Hexadecimal number build 307 ||+|| \x## || 0x## || A Hexadecimal number || build 307 ||
  
 ====== Examples ====== ====== Examples ======
Line 133: Line 133:
 ====== A short tutorial ====== ====== A short tutorial ======
  
-I have a little microcontroller project that works as an RF receiver. It can decode signals sent by the [[http://www.byebyestandby.co.uk/products.php|Bye Bye StandBy]] (BBSB) range of RF handheld controllers, PIR units and switches.  +I have a little microcontroller project that works as an RF receiver. It can decode signals sent by the [[http://www.byebyestandby.co.uk/products.php|Bye Bye StandBy]] (BBSB) or HomeEasy (HE) range of RF handheld controllers, PIR units and switches.  
 +Note that any one receiver can be configured to decode either HE or BBSB, not both at the same time (a chip change is required to swap protocols). \\
 {{http://farm5.static.flickr.com/4107/5104201077_47002647e3.jpg}} {{http://farm5.static.flickr.com/4107/5104201077_47002647e3.jpg}}
  
-Currently, it simply outputs any received code to a serial port on the micro board. This is interesting, but not really of much practical use. What I’m looking to do is to have the BBSB sensors and switches fully interact with the other facilities that are controlled by my HAH.+Currently, it simply outputs any received code to a serial port on the micro board. This is interesting, but on its own is not really of much practical use. What I’m looking to do is to have the BBSB sensors and switches fully interact with the other facilities that are controlled by my HAH.
  
 For example, it would be handy to be able to identify a particular BBSB PIR being triggered and then activate a, HAH connected, RF mains socket to turn on a light. For example, it would be handy to be able to identify a particular BBSB PIR being triggered and then activate a, HAH connected, RF mains socket to turn on a light.
Line 151: Line 151:
  
 Before you connect the micro, just plug the USB adaptor into the USB port on the side of the HAH (the port next to the two pushbuttons). \\ {{:livebox:livebox-reset.jpg|usb and reset buttons}}  Before you connect the micro, just plug the USB adaptor into the USB port on the side of the HAH (the port next to the two pushbuttons). \\ {{:livebox:livebox-reset.jpg|usb and reset buttons}} 
-\\ Now, telnet into the HAH and issue the ‘dmesg’ command. If the USB adaptor has been recognized, you should see something along the lines of …+\\ Now, telnet into the HAH and issue the ‘dmesg’ command. If the USB adaptor has been recognised, you should see something along the lines of …
  
 <code> <code>
Line 179: Line 179:
 ===== Step 2. Activating xap-serial ===== ===== Step 2. Activating xap-serial =====
  
-xap-serial is the name of the process that handles the transformation of serial data to and from xAP messages. By default, this process is not enabled. To enable it, we edit the /etc/xap-livebox.ini file. Search for the [serial] section and change ‘enabled=0’ to ‘enabled=1’. Save the file, then restart your HAH.+xap-serial is the name of the process that handles the transformation of serial data to and from xAP messages. By default, this process is not enabled. To enable it, we edit the /etc/xap-livebox.ini file. Search for the [serial] section and change ‘enabled=0’ to ‘enabled=1’. Save the file, then restart your HAH. You can also control the process from the HAH web UI, Automation/Assists tab.
 ===== Step 3. Configure xap-serial ===== ===== Step 3. Configure xap-serial =====
  
Line 303: Line 303:
 ===== RF Receiver Notes ===== ===== RF Receiver Notes =====
  
-Currently, two versions of the firmware. One supports Bye Bye Standby (BBSB) devices, the other supports Home Easy (HE) devices. +Currently, two versions of the firmware. One supports Bye Bye Standby (BBSB) devices, the other supports Home Easy (HE) devices. Now available in the [[http://www.homeautomationhub.com/content/homeeasy-rf-receiver|Shop]].
 ==== Home Easy Receiver ==== ==== Home Easy Receiver ====
  
Line 336: Line 335:
 |HE306|Wireless Doorbell| |HE306|Wireless Doorbell|
 |HE403|External PIR| |HE403|External PIR|
 +|Byron RS12/RS13|External PIR|
  
 \\ Note: The HE200/HE403/HE306 are branded as 'Home Easy' but actually transmit using the BBSB protocol. \\ Note: The HE200/HE403/HE306 are branded as 'Home Easy' but actually transmit using the BBSB protocol.
Line 342: Line 342:
  
 In testing, it has been noted that occasionally the very first in a series of messages presents an incorrect housecode. However, subsequent transmissions are good. Easy enough to filter out in the script. In testing, it has been noted that occasionally the very first in a series of messages presents an incorrect housecode. However, subsequent transmissions are good. Easy enough to filter out in the script.
 +
 +\\
 +KevinT put his RF receiver into a nice enclosure ... thanks to him for this [[http://www.flickr.com/photos/netcompsys/5104469757/|picture]].
 {{tag>livebox avr atmel arduino}} {{tag>livebox avr atmel arduino}}
  • livebox/xap_serial.1334950931.txt.gz
  • Last modified: 2012/04/20 19:42
  • by brett