Nanode gateway
I got me one of these to play with (Nanode Gateway) - its basically a JeeNode/Arduino with an ethernet port.
http://shop.nanode.eu/shop/nanodes/nanode-gateway/
As proof of concept I turned this into a xap-serial gateway. What this does is it accept an RF packet and dump the same format xap message onto the ethernet as the xap-serial program would do. This one embedded device can replace the base jeenode + xap-serial running on the livebox. Which is kind of neat.
Rough code for your amusment attached: This depends on EtherCard and JeeLib from jeelabs. The xAP class libraries that I wrote are slighly modified from those in the SVN repo - once I finish hacking and I'm happy with these I'll check this and all my bit in.
I think what I might try next is to also have a web server front end and allow you to assign a node type (aka RoomNode) to this RF packet and it have it decode and put those on the wire too as a native xap packets. This would allow it to assume the job of the plugboard jeenode decoder.
Brett
Attachment | Size |
---|---|
RFgateway.zip | 7.7 KB |
Hi Brett
I've managed to get your sketch running on a nanode (older V5 with attached RFM12) and I can see activity from various nodes on the serial port. I have disconnected the base node in the hope of seeing activity on XFX viewer . I have modified the jeenode applet:
function init()
monitor(jeemon, nodes)
monitor({ target="dbzoo.nanode.gateway", port="/dev/ttyUSB0" },
{ [2] = RoomNode{base="dbzoo.nanode.jeenode:2", endpoints={temp=1,light=1,moved=1},ttl=360},
[4] = RoomNode{base="dbzoo.nanode.jeenode:4", endpoints={temp=1,temp2=1},ttl=360},
[5] = RoomNode{base="dbzoo.nanode.jeenode:5", endpoints={temp=1,oil=1,humi=1,battery=1},ttl=3600}
})
end
Bit confused.
why is there a reference to USB0? Is the NODE ID of the nanode important?
I'm not seeing any traffic.
thanks
John
This works very well - I'm now using it full time and it bolts nicely into the jeenode applet on the Livebox too. All I needed to do to the applet was add this extra monitor section. Now I have a 915Mhz basenode directly connected and a 868Mhz Nanode gateway pushing out xap-serial conformant packets that are also picked up. Rock on.
jeenodeApplet.lua
--snip--
function init()
monitor(jeemon, nodes)
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}
})
end