# Mdot sensor data via lora

**URL:** <https://discourse.nodered.org/t/mdot-sensor-data-via-lora/6259>\
**Category:** General\
**Created:** [31 December 2018 14:39 UTC](https://discourse.nodered.org/t/mdot-sensor-data-via-lora/6259 "2018-12-31T14:39:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdot](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mdot](https://discourse.nodered.org/u/mdot)\
**Post date:** [31 December 2018 14:39 UTC](https://discourse.nodered.org/t/mdot-sensor-data-via-lora/6259/1 "2018-12-31T14:39:14Z")

</div>

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?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/33fb71caf268a1f44e18473f1f5804c1164e15d3.png)

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [31 December 2018 15:44 UTC](https://discourse.nodered.org/t/mdot-sensor-data-via-lora/6259/2 "2018-12-31T15:44:17Z")

</div>

Try putting this through A JSON node and then debug it.  
Look here too [https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [31 December 2018 15:49 UTC](https://discourse.nodered.org/t/mdot-sensor-data-via-lora/6259/3 "2018-12-31T15:49:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [1 January 2019 17:22 UTC](https://discourse.nodered.org/t/mdot-sensor-data-via-lora/6259/4 "2019-01-01T17:22:57Z")

</div>

My speed reading skills let me down again Dave!

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [11 May 2020 22:05 UTC](https://discourse.nodered.org/t/mdot-sensor-data-via-lora/6259/5 "2020-05-11T22:05:12Z")

</div>

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);  
send\_data(tx\_data);
