Page 1 of 1

Strange 0, in the Device data field. (temp/hum/baro)

Posted: Friday 16 April 2021 13:24
by willem9136
Something strange.
I made a virtual sensor for Temp+Hum+Baro
All looks normal. In Devices I see the sensor and the data field contains the items 0.0C,50%,1010hPa
But after I ran my python/json script this field changed into : 0, 9.0;70.0;1030.03
The values 9.0 70.0 and 1030.03 are ok but what is the 0, at the first position coming from?
Because of this the sensor is not working.
The log file shows that every thing is ok and there is no 0, in the json call.

Who can see what I do wrong?

curl -s "http://192.168.2.235:8080/json.htm?type ... .0;1030.03"
{
"status" : "OK",
"title" : "Update Device"
}
I will attach the Python script to this case.

re: Strange 0, in the Device data field. (temp/hum/baro)

Posted: Friday 16 April 2021 22:06
by waaren
willem9136 wrote: Friday 16 April 2021 13:24 I made a virtual sensor for Temp+Hum+Baro

But after I ran my python/json script this field changed into : 0, 9.0;70.0;1030.03
Who can see what I do wrong?
curl -s "http://192.168.2.235:8080/json.htm?type ... .0;1030.03"
This type of sensor expects 5 values in svalue (separated by semicolons).

See API / JSON wiki

Re: Strange 0, in the Device data field. (temp/hum/baro)

Posted: Saturday 17 April 2021 19:32
by willem9136
Solved. Supplied 5 Paramus.