livebox:hah_hahnode:nanode_gateway

This is an old revision of the document!


Nanode Gateway

The Nanode is an RF enabled, and Ethernet enabled, AVR328P boards using the same development tools as the Arduino. The RF chip is the same as that used the JeeNodes so this unit makes an ideal embedded gateway for automation.

They are available for purchase here: http://shop.nanode.eu/shop/nanodes/nanode-gateway/

How we are going to use this it to have it pretend to be an xap_serial device. This way we don't need to constantly change its firmware when new Nodes are added or removed onto the network. Nor do we need to change its firmware if new types of messages are introduced. All this backend encoding/decoding will be taken care by our LUA scripting engine.

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.

It does this by acting as a pseudo xap-serial service however it will only generate Serial.Received class messages (for now).

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.

xap-hbeat
{
v=12
hop=1
uid=FFABCD00
class=xap-hbeat.alive
source=dbzoo.nanode.gateway
interval=60
port=0
}

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.

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
}

Integration into the jeenodeApplet.lua require a minor change.

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

This configuration can be seen in the xFxViewer output with corresponding nanode gateway packets also being shown.

  • livebox/hah_hahnode/nanode_gateway.1370152204.txt.gz
  • Last modified: 2013/06/02 05:50
  • by brett