sendBatteryLevel: wrong nodeId?
-
Hi.
My battery powerd sensor node is connected to OpenHAB via mqtt/ethernet gateway. The switch works well in OpenHAB. But not the battery level.
For testing every time the switch changed a hardcoded value of "77" is send after the switch message.
Log MQTT-Gateway:
Started!
0;0;3;0;9;read: 26-26-0 s=4,c=1,t=16,pt=2,l=2:0
0;0;3;0;9;read: 26-26-0 s=255,c=3,t=0,pt=1,l=1:77
0;0;3;0;9;read: 26-26-0 s=4,c=1,t=16,pt=2,l=2:1
0;0;3;0;9;read: 26-26-0 s=255,c=3,t=0,pt=1,l=1:77
The PC-MQ-Client MQTT.fx also only shows the switch messages.
The nodeId is 4. Why is there "255" in line 2 and 4? Or is this OK?
-
bump
I also wonder what the S, T, PT & L values stand for..
i see them coming and going but never understood what they are here forhappy new year!
-
s=child-sensor-id,
c=message-type
t=sub-type
pt=payload-type (see MyMessage.h)
l=payload lengthYou will understand it better if you have a look at the code:
https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MyMessage.h#L175
https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.cpp#L273
https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.cpp#L220
-
@hek
Thanks for reply.
I know the meaning of "s". But I was wondering about the value "255". Is this OK? I think it should be "4" - the value of "CHILD_ID" in my sketch.
-
sensor id is not the same as node id.
sensor id = 255 is used for internal stuff like id request and battery level for node. You can assign 0-254 to your own attached sensors (to the arduino node).
Suggested Topics
-
MQTT-SN
General Discussion • 29 Nov 2014, 10:00 • binladin 30 Nov 2014, 17:42 -
💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
OpenHardware.io • 20 Jan 2017, 16:20 • openhardware.io 29 Oct 2018, 08:03 -
Node sending req packets constantly (Packet type 2 on MQTT)
Troubleshooting • 30 Apr 2017, 08:50 • Samuel235 30 Apr 2017, 16:58 -
Indoor BLE Location ( or presence detection)
General Discussion • 11 Dec 2014, 05:01 • gregl 17 Nov 2016, 12:27 -
No Auto node id
Troubleshooting • 18 Dec 2014, 18:16 • C.r.a.z.y. 25 Dec 2014, 17:30 -
RFM69 MQTT gateway radio send loop
Troubleshooting • 31 Oct 2019, 11:40 • alexelite 1 Nov 2019, 22:00 -
💬 Bed occupancy detector
OpenHardware.io • 4 Oct 2018, 19:18 • openhardware.io 4 Oct 2018, 19:18 -
Raspberry PI + MQTT (Mosquitto) + Serial Gateway
General Discussion • 14 Feb 2015, 06:12 • catcher 2 Mar 2017, 17:58