DHT11 not decimal values?
Moderators: grovkillen, Stuntteam, TD-er
DHT11 not decimal values?
I have been searching the internet and this forum but can't find the answer.
My DHT11 is only showning temperature in full degree's nothing in decimals. So only 20 21 22.
Is the sensor not sending it ? Like 19.5 ?
Or have I done something wrong.
In the ESP it does have decimals 2 defined.
many thanks for your help !
Frank
My DHT11 is only showning temperature in full degree's nothing in decimals. So only 20 21 22.
Is the sensor not sending it ? Like 19.5 ?
Or have I done something wrong.
In the ESP it does have decimals 2 defined.
many thanks for your help !
Frank
Re: DHT11 not decimal values?
Where are you looking?My DHT11 is only showning temperature in full degree's nothing in decimals.
Assuming that DHT22 is treated same as DHT11, I see in ESPEasy the DHT-values with 2 decimals, and in Domoticz the Temperature-value with 1 decimal, and the Humidity-value without decimal (but who cares about the latter?)
Re: DHT11 not decimal values?
DHT11 has this limit, it can read temperature and humidity only by integer value.
If you need better precision up to 0.1° then use DHT22 which is more advanced and expensive of course.
If you need better precision up to 0.1° then use DHT22 which is more advanced and expensive of course.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: DHT11 not decimal values?
My usecase requires 2 decimals. The DHT22 on my ESP shows 2 decimals, but the second decimal is always "0". I also have a luftdaten sensor which has a BME280 and DHT22 attached, I see that the BME280 on the luftdaten sensor does have 2 decimal values (the DHT22 connected to the lufdaten also only shows "0" as the second decimal). My question: does a BME280 support 2 decimals with esp easy?
Re: DHT11 not decimal values?
BME280 shows something with 2 digits, but when I compare to a calibrated Pt100, I don’t even think the 2 decimals are ... worthy to be used
98710533: BME280: dew point 1.74C
98710545: BME280 : Address: 0x76
98710545: BME280 : Temperature: 6.36
98710546: BME280 : Humidity: 72.58
98710546: BME280 : Barometric Pressure: 999.12

98710533: BME280: dew point 1.74C
98710545: BME280 : Address: 0x76
98710545: BME280 : Temperature: 6.36
98710546: BME280 : Humidity: 72.58
98710546: BME280 : Barometric Pressure: 999.12
Belgium and land of ESP ... counting 

Re: DHT11 not decimal values?
Perfect. Thanks!
I have a use case which involves making predictions based on temperature delta's between 20 minutes ago and now. One decimal resolution is insufficient to make it work reliably.
Re: DHT11 not decimal values?
Hi there,
thanks to the support of Gijs and Grovkiller I now have some basic sliding average filter implemented.
Looks like:
On Temperature#Value Do
Let,2,[VAR#1]*4
Let,1,[Temperature#Value]
TaskValueSet,12,1,([VAR#1]+[VAR#2])/5
EndOn
Now, as I understand, the DHT11 only gives integers as a value. And esp easy sends it to domoticz as a floatingpoint with 2 digits after the dot. True?
So, is it because the numbers are integers, an inbetween value cannot be calculated? ( i was hoping it did, to have also have values like 17.35 or so)
Of course I understand it has nothing to do with accuracy, but i just like smooth lines:)
Is there a solution to that?
Jan
thanks to the support of Gijs and Grovkiller I now have some basic sliding average filter implemented.
Looks like:
On Temperature#Value Do
Let,2,[VAR#1]*4
Let,1,[Temperature#Value]
TaskValueSet,12,1,([VAR#1]+[VAR#2])/5
EndOn
Now, as I understand, the DHT11 only gives integers as a value. And esp easy sends it to domoticz as a floatingpoint with 2 digits after the dot. True?
So, is it because the numbers are integers, an inbetween value cannot be calculated? ( i was hoping it did, to have also have values like 17.35 or so)
Of course I understand it has nothing to do with accuracy, but i just like smooth lines:)
Is there a solution to that?
Jan
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: DHT11 not decimal values?
You can set your decimals on that dummy value. Given that you have a filter you still get decimals even if the dht only deliver integers.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: DHT11 not decimal values?
Dear grovkillen,
maybe my learning curve is not so steep...?
I expected to have decimals with the filter. But I don's see it.
Maybe is mis the point on "you can set your decimals on that dummy value" ?
A hint for me?
best regards!
Jan
maybe my learning curve is not so steep...?
I expected to have decimals with the filter. But I don's see it.
Maybe is mis the point on "you can set your decimals on that dummy value" ?
A hint for me?
best regards!
Jan
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: DHT11 not decimal values?
In the task settings for your dummy device, what number of decimals do you have set?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: DHT11 not decimal values?
I dont understand dummy device. have a dht11 connected, rules as suggested, always xx.00 degrees.
- Attachments
-
- Knipsel.PNG (45.3 KiB) Viewed 20207 times
Last edited by j-ghost on 14 Feb 2019, 22:45, edited 1 time in total.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: DHT11 not decimal values?
Ok, so you have the dht on task number 12? Our suggestion was to use a separate device called dummy device. The DHT should only add it's values not be the one publishing them. So that last line where we use the TaskValueSet we should point it to a dummy device, not back to the DHT device.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: DHT11 not decimal values?
added a picture in prev post, can do dht on task number 1 or put sensor on different row (12)
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: DHT11 not decimal values?
Code: Select all
On DHT11#Temperature Do
Let,2,[VAR#1]*4
Let,1,[DHT11#Temperature]
TaskValueSet,2,1,([VAR#1]+[VAR#2])/5
EndOn
You should see that value being populated with values once you have updated the rule.
Also your device names in the rules need to match your device names
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: DHT11 not decimal values?
No changes,
VAR#1 and 2 , do i need to change that to DHT11#Temperature ?
WHere does VAR#2 come from?
(sorry for the apparently 'i should know' questions)
VAR#1 and 2 , do i need to change that to DHT11#Temperature ?
WHere does VAR#2 come from?
(sorry for the apparently 'i should know' questions)
- Attachments
-
- Knipsel.PNG (11.11 KiB) Viewed 20187 times
Re: DHT11 not decimal values?
On Temperature#Value Do
Let,2,[dummydev#Dtemp]*4
Let,1,[DHT11#Temperature]
TaskValueSet,2,1,([DHT11#Temperature]+[dummydev#Dtemp])/5
EndOn
with:
Let,2,[dummydev#Dtemp]*4
Let,1,[DHT11#Temperature]
TaskValueSet,2,1,([DHT11#Temperature]+[dummydev#Dtemp])/5
EndOn
with:
- Attachments
-
- Knipsel.PNG (19.39 KiB) Viewed 20184 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: DHT11 not decimal values?
Copy and paste my code, it'll work. Please study your code and you'll see that you're not using the correct event trigger.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: DHT11 not decimal values?
Thanks for you patience,
modifying to much at the same time...your code works,
but still have difficulty understanding the syntax a bit.
Can i modify var#2 to dummydev#Dtemp or does that not make sense? or is 2 here not a variable but a location?
On DHT11#Temperature Do
Let,2,[VAR#1]*4
Let,1,[DHT11#Temperature]
TaskValueSet,2,1,([VAR#1]+[VAR#2])/5
Let,4,[VAR#3]*4
Let,3,[DHT11#Humidity]
TaskValueSet,2,2,([VAR#3]+[VAR#4])/5
EndOn
GReets
Jan
modifying to much at the same time...your code works,
but still have difficulty understanding the syntax a bit.
Can i modify var#2 to dummydev#Dtemp or does that not make sense? or is 2 here not a variable but a location?
On DHT11#Temperature Do
Let,2,[VAR#1]*4
Let,1,[DHT11#Temperature]
TaskValueSet,2,1,([VAR#1]+[VAR#2])/5
Let,4,[VAR#3]*4
Let,3,[DHT11#Humidity]
TaskValueSet,2,2,([VAR#3]+[VAR#4])/5
EndOn
GReets
Jan
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: DHT11 not decimal values?
You set the internal variables by the use of the Let command, these variables are "stored" under the name VAR followed by the variable number. You need to use at least one of them variables but my idea was to use two to not confused too much. You would otherwise need to set the variable after the filter...
In short, use the VAR#n syntax.
In short, use the VAR#n syntax.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Who is online
Users browsing this forum: No registered users and 17 guests