So, I'm about as new as you can get with JavaScript and coding in general, so this might be tough, but please bear with me.
I'm getting data from two DHT-11 temperature and humidity sensors via a raspi 4 and am successfully controlling based on the 2 (4 total) values. The sensors each output their data to a full message as such:
{"topic":"rpi-dht11-tank1","payload":"16.00","_msgid":"20581305.994f1c","humidity":"67.00","isValid":true,"errors":0,"location":"DHT11 Tank 1","sensorid":"dht11"}
Each node's (useful) values are apparently being filtered and separated by two function blocks. One for the temperature reading:
msg.payload = msg.payload;
return msg;
The other for humidity reading;
msg.payload = msg.humidity;
return msg;
This setup appears to work fine and is controlling relays, lights and alarms perfectly.
Now the lcd node expects an object containing arrays as such:
{
msgs: [
{
msg: "string",
pos: number,
center: "boolean"
},
{
msg: "string",
pos: number,
center: "boolean"
},
]
};
I've gotten the screen to function and display properly, using a manually typed-in object from an inject node. Obviously, my goal here is to get those values coming out of the function node from the DHT-11 and get them into the {msg: "string"} location in the array of the lcd's object and monitor the values in real-time. Any help would be greatly appreciated. Thank you.