JeeNode - No XAP Messages...?
Hi,
I've been running a Livebox for a number of months now, all has been working until a couple of weeks ago when I noticed that the XAP messages from my JeeNode seemed to have stopped. I have checked the JeeNode and it is transmitting data - I can see a XAP-Serial message with the details -
xap-header
{
v=12
hop=1
uid=FF00D500
class=Serial.Comms
source=dbzoo.livebox.Serial
}
Serial.Received
{
port=/dev/ttyUSB1
data=OK 2 0 0 213 0
}
That is freaking weird - I mean it says "process RoomNode[2]" its running where it should be!
Staring at the code I can only see a couple of reasons why a message would not be sent.
- The value has not change from the last value - but you would still get INFO messages.
- You've copied one of the std modules into /etc/plugboard and modified it and its using that first.
- Its being reaped
Everybody (even me) uses this code so I'm scratching as to why its breaking for you only.
Very odd indeed.
Why is this node generating data every second? Did you tweak the firmware on the RoomNode itself?
Here is a run on my system - its not a livebox box its running directly on my joggler but you can see the initial INFO packet go out annoucing the blank node. And then some data coming in, as the nodes only transmit every 2min the timeout counter ticks up until it either we get data that resets it back to 1, or the ttl limit is reached. and then its reaped.
# lua /etc/plugboard/plugboard.lua
Loading /etc/plugboard/01jeeNodeApplet.lua [ JeeNode ]
build RoomNode[2]
build RoomNode[3]
Loading /etc/plugboard/hepburnTempApplet.lua [ Hepburn temp web servlet ]
Loading /etc/plugboard/xapCacheWebserverApplet.lua[ xAP Caching web servlet ]
Running...
xap-header
{
uid=FF00D802
source=dbzoo.joggler.jeenode:hepburn.temp
hop=1
class=xAPBSC.info
v=12
}
input.state
{
state=?
text=?
}
Reaping RoomNode[2] alive=true ttl=900 timeout=10
Reaping RoomNode[3] alive=true ttl=900 timeout=10
Reaping RoomNode[2] alive=true ttl=900 timeout=20
Reaping RoomNode[3] alive=true ttl=900 timeout=20
Reaping RoomNode[2] alive=true ttl=900 timeout=30
Reaping RoomNode[3] alive=true ttl=900 timeout=30
Reaping RoomNode[2] alive=true ttl=900 timeout=40
Reaping RoomNode[3] alive=true ttl=900 timeout=40
{
data = "OK 3 0 0 145 0 0",
port = "/dev/ttyUSB0",
}
process RoomNode[3]
temp2=0
moved=0
humi=0
temp=14.5
lobat=0
light=0
{
data = "OK 2 140 0 174 0",
port = "/dev/ttyUSB0",
}
process RoomNode[2]
moved=0
humi=0
temp=17.4
lobat=0
light=140
xap-header
{
uid=FF00D802
source=dbzoo.joggler.jeenode:hepburn.temp
hop=1
class=xAPBSC.event
v=12
}
input.state
{
state=on
text=17.4
}
Reaping RoomNode[2] alive=true ttl=900 timeout=4
Reaping RoomNode[3] alive=true ttl=900 timeout=7
Reaping RoomNode[2] alive=true ttl=900 timeout=14
Reaping RoomNode[3] alive=true ttl=900 timeout=17
Reaping RoomNode[2] alive=true ttl=900 timeout=24
Reaping RoomNode[3] alive=true ttl=900 timeout=27
lua: /usr/share/lua/5.1/xap/init.lua:114: interrupted!
stack traceback:
[C]: in function 'select'
/usr/share/lua/5.1/xap/init.lua:114: in function 'process'
/etc/plugboard/plugboard.lua:73: in main chunk
[C]: ?
#
huh? The only way pachube can get data is from an xAP message via xap-hub and if its getting it from the hub then it should be broadcast on the wire as well as distributed to every other internal component (such as pachube in this case). However earlier you said xap-snoop wasn't seeing anything either. This makes no sense.
Unless there is a bug in the hub? But that would break lots of things as its a CORE component and central to the complete distribution of every xap message that can be received on the wire. That and I've found no bug in there since I released it - its been one of the most solid bits of the system. It has to be.
Here is how things work:
Components can send (broadcast) an xAP packet by themselves. Only one process may listen on the correct PORT (3639) for incoming xap message, that is the job of the xap-HUB. Other components plug into the hub and it takes care of making sure an incoming message gets sent (multiplexed) to everybody that registers with it.
Brett
Wow that is crazy.
xap-snoop can only get it because the xap-hub got it - but that would mean that xap-hub isn't broadcasting it externally - or is having an issue doing this. I'm assuming you are seeing every other xap packet that you would expect to see in xFxViewer? Have you got 2x livebox on your network? What changed recently then.
Also what version of xFx are you running btw? I tend to use the older V3 version as it does not require my PC to be running a hub as well. But as you say wireshark get no data either which is pretty definitive.
UPDATE: Wait that isn't right. Packets Transmitted go directly onto the wire as a broadcast packet. The xap-hub just happens to see these and picks them up to forward back INTO the system. I built this thing and even I get confused.
Brett
I'm confused everything you have show demonstrated that its working. Try using xap-snoop locally instead of xFxViewer you can setup filters using this if you wish.
# xap-snoop -s "dbzoo.livebox.jeenode:conservatory"
Brett