livebox:hah_hahnode:nanode_gateway

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
Next revisionBoth sides next revision
livebox:hah_hahnode:nanode_gateway [2013/06/02 04:54] brettlivebox:hah_hahnode:nanode_gateway [2013/06/02 05:23] brett
Line 5: Line 5:
 What this does is it accepts an RF packet and dump the same format xAP message onto the Ethernet as the [[livebox/xap_serial]] program would do. What this does is it accepts an RF packet and dump the same format xAP message onto the Ethernet as the [[livebox/xap_serial]] program would do.
  
-Which means this one embedded device can replace the base jeenode + xap-serial running on the livebox as a standalone solution.+This one embedded device can replace the base jeenode + xap-serial running on the livebox.  The diagram below shows on the left the traditional livebox solution using a Base node to receive RF communication which is relayed to xap-serial and on the right how this can be done using just a Nanode.
  
 {{:livebox:hah_hahnode:nanodegateway.png|}} {{:livebox:hah_hahnode:nanodegateway.png|}}
 +
 +This device acts as a pseudo xap-serial service and will transmit a packet conforming to the xAP Serial Schema, however as its not been programmed to be a true xap-serial device it will only generate Serial.Received class messages.
 +
 +Once the firmware is flashed the only details that requires configuration are the NODE ID, Group and RF Frequency these must be done via the serial interface use to flash the device.  The firmware will obtain an IP address via DHCP.
 +
 +Once operational it will transmit onto the Ethernet a xAP heartbeat every minute to let you know its alive.
 +<code>
 +xap-hbeat
 +{
 +v=12
 +hop=1
 +uid=FFABCD00
 +class=xap-hbeat.alive
 +source=dbzoo.nanode.gateway
 +interval=60
 +port=0
 +}
 +</code>
 +
 +An RF packet that can be decoded will be emitted using the pseudo port /dev/ttyUSB0 this is to allow easier integration into the Livebox LUA plugboard backend where the full decode of the data stream is performed.
 +<code>
 +xap-header
 +{
 +v=12
 +hop=1
 +uid=FFABCD00
 +class=Serial.Comms
 +source=dbzoo.nanode.gateway
 +}
 +Serial.Received
 +{
 +port=/dev/ttyUSB0
 +data=OK 3 50 1 178 0
 +}
 +</code>
 +
 +Integration into the [[livebox/hah_hahnode#configuring_the_jeenodeappletlua|jeenodeApplet.lua]] require a minor change.
 +<code>
 +function init()
 +   monitor({ target="dbzoo.nanode.gateway", port="/dev/ttyUSB0" },
 +           { [2] = RoomNode{base="dbzoo.nanode.jeenode:2", endpoints={lobat=1,temp=1,light=1},ttl=900},
 +             [3] = RoomNode{base="dbzoo.nanode.jeenode:3", endpoints={lobat=1,temp=1,light=1},ttl=900},
 +             [4] = RoomNode{base="dbzoo.nanode.jeenode:4", endpoints={lobat=1,temp=1,light=1},ttl=900},
 +             [7] = RoomNode{base="dbzoo.nanode.jeenode:7", endpoints={lobat=1,temp=1,humi=1},ttl=900}
 +           })
 +end
 +</code>
 +
 +This configuration can be seen in the xFxViewer output with corresponding nanode gateway packets also being shown.
 +
 +{{:livebox:hah_hahnode:nanode-gw-xfxviewer.png?800}}
 +
  • livebox/hah_hahnode/nanode_gateway.txt
  • Last modified: 2014/01/20 09:11
  • by brett