Mdot sensor data via lora

I'm a beginner, I have an mdot and multitech conduit and i'm struggling to write a function to change payload into actual sensor data being transmitted. The payload being recieved in the node red debug is "payload". "\u0012?"

Can anybody help please?


Try putting this through A JSON node and then debug it.
Look here too

errr - it already says it's an object... and that msg.payload is just a string...

What we need to know is how the mdot encoded up the data in the first place.
\u0012 is just unicode - which is same as 0x12 or 18 decimal... but until we know what was expected then... not much we can say.

1 Like

My speed reading skills let me down again Dave!

This is how it encodes it.

light = lux.getData();
tx_data.push_back((light >> 8) & 0xFF);
tx_data.push_back(light & 0xFF);
logInfo("light: %lu [0x%04X]", light, light);