I have a problem with MQTT JSON data send to a Node-red frontend ...
After some time (usually about 10 to 15 minutes) and although my sensors produce valid data(!) - in the serialized JSON Data some values change to 'null' data!
I serialize data like this:
// 4 Json Object-Buffer erstellen
/ Daten ueber JSON-MQTT an Frontend
Serial.println("--- Data packages sent via MQTT to RaspberryPi --------------");
HTU21JSON["ESP_Datapack1"] = "";
HTU21JSON["temperatur"] = String(HTU21_temperature,1);
HTU21JSON["humidity"] = String(HTU21_humidity,1);
HTU21JSON["dewpoint"] = String(HTU21_dewpoint,1);
HTU21JSON["BMP_pressure"] = String(luftdruck,1);
// JSON HTU21 Daten in eine Variable schreiben
see also attached picture ...
What could be the reason for that?
The reason could be what ever is publishing the data has an issue reading a sensor.
What sensors are reading the humidity and water level?
What device is sending the data? (is it an esp32?)
What software is running on that device?
How do you have the sensor connected?
22 November 2022 13:45
Just to clarify, are you asking for help with the code that runs in some unspecified device, or is this a problem that you think is caused by node-red?
you are right.... the problem is not caused by Node-Red ... it is caused inside ESP32 serializing sensor data... please apologize - I should post in the ESP32 forum...
I'm almost sure that the issue is caused by how the ESP32 handles the buffer data which it used to serialize JSON data ... so this is not a Node-Red problem... I should post it on a ESP32 forum I guess...
Depending on the sensor and how you have it wired, the sensor might not have a reading. That’s why I asked what sensors you are using.
21 January 2023 19:05
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.