Page 1 of 1
Baro decimal precision
Posted: Friday 27 March 2020 0:07
by x98pl
Hello! I'm using BME280 sensor that provides me temperature, humidity and pressure connected to remote ESP module by MQTT. In Domoticz I have a virtual sensor with these 3 quantities. BME280 provides me pressure with 2 decimal places. In the MQTT topic there are 2 decimal places as well, but in Domoticz database and dashboard I can see only integer without decimals. It causes that my graphs are not smooth.
I have the last released stable version 2020.1 installed which was updated from previous one (4.10717). The old version has the same issue.
Can somebody help me how to add decimals?
Re: Baro decimal precision
Posted: Sunday 03 May 2020 22:04
by dflandre
I've go the same issue with Domoticz version 4.10717.
When I send
Code: Select all
mosquitto_pub -h localhost -t "domoticz/in" -m '{ "idx" : 437, "nvalue" : 0, "svalue" : "19.30;52.00;2;1013.30;0" }
the baro panel (437) displays 1013 and when I send
Code: Select all
mosquitto_pub -h localhost -t "domoticz/in" -m '{ "idx" : 437, "nvalue" : 0, "svalue" : "19.30;52.00;2;1013.66;0" }
the baro pannel displays 1014.
For the temp value, decimals are OK.
Thanks for your help.
D.
Re: Baro decimal precision
Posted: Sunday 03 May 2020 22:44
by FireWizard
Hi,
According to:
https://piandmore.wordpress.com/2019/02 ... -domoticz/.
This sensor should have the following data:
Temperature+Humidity+Barometer
The temperature+Humidity+Barometer sensor will show just that and an environment level and a prediction. You can send digits for the temperature but only the first is displayed (it is rounded off). The humidity only displays whole numbers (chops off any digits).
{"command":"udevice", "idx":1234, "svalue":"tm;hu;lv;ba;pr"}
where tm is the temperature, hu is the humidity and lv is the environment level, ba is the pressure and pr is the prediction.
lv can have the following values:
0, normal
1, comfortable
2, dry
3, wet
pr can have the following values:
0, no prediction
1, sunny
2, partly cloudy
3, cloudy
4, rain
5, unknown
(oddly enough 6 cloudy/rain does not work for this sensor)
Regards
Re: Baro decimal precision
Posted: Monday 04 May 2020 10:19
by dflandre
I've go to Temp-Humidity-Baro sensors on my Domoticz server. One is mySensors and have decimals on the displayed pressure value and the other is MQTT and on this one, the displayed value is rounded to an integer.
I would like have decimals on the MQTT baro value too.
- mySensors.png (10.52 KiB) Viewed 1032 times
- MQTT.png (10.44 KiB) Viewed 1032 times
D.
Re: Baro decimal precision
Posted: Monday 04 May 2020 18:51
by dflandre
I found something :
In the database
domoticz.bd (edited with sqlite3), I changed the subtype of my virtual sensor from 1 to 16.
Now it's names "weather station" in the devices list and it displays one decimal.
So, is there a simple way to change the subtype of a sensor ?
I didn't find a list of subtype. Where can I find it ?
D.