Thermometer sensor with only 1 decimal

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
gmarchionni
Posts: 8
Joined: Sunday 11 June 2017 0:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Thermometer sensor with only 1 decimal

Post by gmarchionni » Monday 24 September 2018 22:41

Hi all,
i'm having a stupid problem, that i tried to solve reading the forum and i could not.

so, i had for a long time a sensor with humidity and another sensor with temperature coming from a gadgeteer board via web json.
working perfectly and represented as 25.20 C degrees. (the gadgeteer board sends 25.20000000000 similar value.)

lately i'm triying to implement, on the same domoticz a new sensor, but i only get 1 decimal point....how can i change this behaviour?
the problem is not the sensor, because the same gadgeteer board with the same software, on a new IDX sensor, works with only 1 decimal...

Thanks for any help...
Giulio

gmarchionni
Posts: 8
Joined: Sunday 11 June 2017 0:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Thermometer sensor with only 1 decimal

Post by gmarchionni » Saturday 29 September 2018 1:01

no one knows what i'm talking about?

User avatar
waaren
Posts: 1352
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Thermometer sensor with only 1 decimal

Post by waaren » Saturday 29 September 2018 1:42

gmarchionni wrote:
Monday 24 September 2018 22:41
so, i had for a long time a sensor with humidity and another sensor with temperature coming from a gadgeteer board via web json.
working perfectly and represented as 25.20 C degrees. (the gadgeteer board sends 25.20000000000 similar value.)
lately i'm triying to implement, on the same domoticz a new sensor, but i only get 1 decimal point....how can i change this behaviour?
the problem is not the sensor, because the same gadgeteer board with the same software, on a new IDX sensor, works with only 1 decimal...
I am on version 4.10009 and on that version when updating a (virtual) temp-sensor using json the value is chopped to 1 decimal even if the json sends more. The value in the database also has only 1 decimal. Don't know with what version this change was implemented.
If you update the same sensor with dzVents more decimals are accepted and in the database and shown on the GUI.
So if you need the extra decimals you are probably forced to use a workaround(sending the value to a uservariable or dummy custom sensor first and use dzVents (or maybe Lua) to copy that to the temperature sensor.
You might want to raise a feature request on GitHub to make the amount of decimals in temperature sensors a configurable setting.
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

gmarchionni
Posts: 8
Joined: Sunday 11 June 2017 0:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Thermometer sensor with only 1 decimal

Post by gmarchionni » Saturday 29 September 2018 16:35

Thanks....but weird..as i already have a sensor with 2 decimals...

so either it was already with 2 decimals and it has been trimmed to 1 or i don't know.
i'll look into having a variable and update it that way.
thanks
Attachments
Screenshot (15).png
Screenshot (15).png (17.68 KiB) Viewed 324 times

svde
Posts: 22
Joined: Sunday 17 April 2016 10:36
Target OS: Linux
Domoticz version:
Contact:

Re: Thermometer sensor with only 1 decimal

Post by svde » Sunday 28 October 2018 12:06

waaren wrote:
Saturday 29 September 2018 1:42
gmarchionni wrote:
Monday 24 September 2018 22:41
so, i had for a long time a sensor with humidity and another sensor with temperature coming from a gadgeteer board via web json.
working perfectly and represented as 25.20 C degrees. (the gadgeteer board sends 25.20000000000 similar value.)
lately i'm triying to implement, on the same domoticz a new sensor, but i only get 1 decimal point....how can i change this behaviour?
the problem is not the sensor, because the same gadgeteer board with the same software, on a new IDX sensor, works with only 1 decimal...
I am on version 4.10009 and on that version when updating a (virtual) temp-sensor using json the value is chopped to 1 decimal even if the json sends more. The value in the database also has only 1 decimal. Don't know with what version this change was implemented.
If you update the same sensor with dzVents more decimals are accepted and in the database and shown on the GUI.
So if you need the extra decimals you are probably forced to use a workaround(sending the value to a uservariable or dummy custom sensor first and use dzVents (or maybe Lua) to copy that to the temperature sensor.
You might want to raise a feature request on GitHub to make the amount of decimals in temperature sensors a configurable setting.
I'm also seeing that when values are updated via dzvents more decimals are possible. When values are updated via JSON they are chopped / rounded off. This is causing unreliable predictions in my thermostat script. I'm just writing this to let you know you're not the only one looking into this...

Submitted an issue on github: https://github.com/domoticz/domoticz/issues/2811

SweetPants
Posts: 2407
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10276
Location: The Netherlands
Contact:

Re: Thermometer sensor with only 1 decimal

Post by SweetPants » Sunday 28 October 2018 15:02

What sensor do you use? Most temp sensors have an accuracy of +/- 0.5 degrees and even more worse at lower temperatures. Needing more then one decimal seems overdone to me
Ubuntu 16.04.5 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

svde
Posts: 22
Joined: Sunday 17 April 2016 10:36
Target OS: Linux
Domoticz version:
Contact:

Re: Thermometer sensor with only 1 decimal

Post by svde » Sunday 28 October 2018 16:56

OK... interesting to see that the first response is a question about which sensors I use, and the inevitable discussion starts on the accuracy of the sensor, that a human can't even feel the difference (which I agree with), etc.

I can tell you that the sensors in question are wireless sensor tags https://store.wirelesstag.net/collections/all and I will also be using some DHT22's.

The reason why I have an issue with the fact that something in domoticz changed (+/- 2018.06.07) is that I take the temperature delta between 20 minutes ago and now, multiple that by 6 (20 minutes * 6 = 2 hours) and add that to the current temperature. This gives an indication / prediction what the temperature may be like in 2 hours time (if the trend from the last 20 minutes continues). When that prediction dips under the room setpoint, it's time to turn on the heatpump and open the valves to the underfloor heating.

If the setpoint is 20C, and you the room temperature is just above the setpoint, then only having a 1 decimal resolution as input into the prediction causes the heatpump to turn on when its not necessary. In my usecase the accuracy of the sensors doesn't really matter, as long as it is able to send a few more decimals to domoticz, as long as those decimals are relatively accurate (within the sensor), it'll work for me.

I didn't notice the change in domoticz which was made in the European spring until this weekend, when my heater turned on again for the first time since March.

2 more things to consider:
- updating values with DzVents allows for two decimal temperature values to be put into the system
- the humidity values are registered in the system (even via json) with a lot of decimals. So why is the temperature value chopped, but not the humidity value?

svde
Posts: 22
Joined: Sunday 17 April 2016 10:36
Target OS: Linux
Domoticz version:
Contact:

Re: Thermometer sensor with only 1 decimal

Post by svde » Monday 29 October 2018 10:13

Fixed in 10122.

gmarchionni
Posts: 8
Joined: Sunday 11 June 2017 0:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Thermometer sensor with only 1 decimal

Post by gmarchionni » Friday 30 November 2018 22:02

Thanks.

I cannot understand though, why a thermometer sensor that was added a long time ago, when it used to work with 2 decimals, it's still showing up in 2 decimals on 4.9700.
Is this how it's supposed to work?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests