Baro decimal precision

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
x98pl
Posts: 1
Joined: Thursday 26 March 2020 23:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Baro decimal precision

Post 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?
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Baro decimal precision

Post 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.
mySensors -> Domoticz -> InfluxDB -> Grafana
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Baro decimal precision

Post 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
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Baro decimal precision

Post 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
mySensors.png (10.52 KiB) Viewed 1034 times
MQTT.png
MQTT.png (10.44 KiB) Viewed 1034 times
D.
mySensors -> Domoticz -> InfluxDB -> Grafana
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Baro decimal precision

Post 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.
mySensors -> Domoticz -> InfluxDB -> Grafana
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest