I am using ArduinoJson in a project to be able to send process data of a test bench compactly to a MQTT broker. In the reverse direction, data (setpoints) is sent to the Arduino via an HMI. Thereby I have the following problem:
When changing individual parameters on the HMI, I always have to send the complete package of parameters. Example:
I have the parameters pressure, temperature and time. The JSON looks like that:
If I change only the time at the HMI and send only the time value in a JSON file:
the library overwrites the other missing values with 0 in the following code segment:
pressure = docIn["pressure"]; temperature = docIn["temperature"]; time = docIn["time"];
So I am forced to send always the complete package of data, which leads to problems with some of my parameters.
Does anyone here know about the library and can tell me if there is a possibility to send only single parameters?
Thanks a lot for the help