NodeRed, message payload
- This topic has 8 replies, 4 voices, and was last updated 8 years, 7 months ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)
- You must be logged in to reply to this topic.
I’ve connected multiple mDots to my Conduit running NodeRed.
I use the “debug” pane to the right to display the “msg.payload”
This works as far as it goes, but the “debug” display does not appear to differentiate between the different mDots – there’s no serial number or other identifier. So their outputs appear identical.
So a few questions…
a) Is there a NodeRed setting to display something to differentiate the mDots payloads in the debug window?
b) Is there something other than “msg.payload” to display (I couldn’t find documentation for this… and there’s not “drop down” when making that entry)
c) So that I can stuff the value into a message myself, how can my ‘c’ code extract such a serial number directly from the mDot itself?
Thanks
Mike
Select “complete message object” in the dropdown to see all properties.
Otherwise
msg.eui – will give the dev eui of the packet
Thanks!
Is there a ‘c’ call I can make to extract s/n (EUI) within the mDot?
-Mike
Michael,
You’re looking for
std::vector
See mDot.h in the mDot library for more details.
Cheers,
Mike
I was unable to find a “decoder ring” for the various fields in the “complete message object”. Some fields are rather obvious; others, not so much:
chan, cls, codr, datr, etc…
Thanks
Mike
Many of the fields are coming directly from the packet forwarder process.
Info can be found here:
https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT
I will also add this info to our documentation for lora and node-red.
So Jason, I to am interested in the full props of the payload. Particularly the mDot id. I don’t want to waste precious payload space on sending the deviceID on each transmission.
I don’t seem to see the ID in the Complete Object Properties.
“chan”: 7,
“cls”: 0,
“codr”: “4/5”,
“datr”: “SF9BW125”,
“freq”: “910.1”,
“lsnr”: “11”,
“modu”: “LORA”,
“port”: 1,
“rfch”: 1,
“rssi”: -81,
“seqn”: 8,
“size”: 72,
“timestamp”: “2016-04-16T00:04:18Z”,
“tmst”: 4099711332,
“payload”: “79.7,99.4,1007.9,609,0123456789 123”,
“eui”: “00:80:00:00:00:00:aa:f8”,
“_msgid”: “9809d894.67f628”
Terence,
If you look at my posts and the replies, apparently the eui is the device-specific ID.
Oh, I see that now. Thanks for the info.