Page 1 of 1
AM2301+Tasmota - No history for humidity
Posted: Friday 18 February 2022 8:18
by sciurius
Hi,
I have a NodeMCU running Tasmota 11 with a AM2301 (DHT22) connected to it. The devices are correctly picked up by the Tasmota Autodiscovery plugin.
Values are shown correctly, but Domoticz does not keep a history for the humidity readings. Do I need to change a setting?

- scrot20220218081233.png (14.14 KiB) Viewed 1036 times

- scrot20220218081617.png (21.42 KiB) Viewed 1036 times
Re: AM2301+Tasmota - No history for humidity
Posted: Friday 18 February 2022 8:58
by waltervl
Standard Humidity device keeps track of Humidity but it looks like the plugin uses something else.
A humidity sensor also needs an indication of the status (normal, wet, dry etc) so it needs 2 parameters. This status then needs to be calculated by the plugin.
So discuss this with the plugin owner.
As a reference check
https://www.domoticz.com/wiki/Dummy_for ... s#Humidity
https://www.domoticz.com/wiki/Domoticz_ ... s#Humidity and
https://www.domoticz.com/wiki/Developin ... #Devices_2
Re: AM2301+Tasmota - No history for humidity
Posted: Friday 18 February 2022 23:08
by joba1
Hi,
I‘m the plugin author and just looked into this.
Technically it is no problem to send a humidity description.
But I have no idea which percentages should be translated to which description.
Any suggestions?
Re: AM2301+Tasmota - No history for humidity
Posted: Saturday 19 February 2022 13:52
by waltervl
joba1 wrote: ↑Friday 18 February 2022 23:08
Hi,
I‘m the plugin author and just looked into this.
Technically it is no problem to send a humidity description.
But I have no idea which percentages should be translated to which description.
Any suggestions?
This is how it is calculated in DzVents
Code: Select all
function self.humidityStatus (temperature, humidity)
local constants = domoticz or require('constants')
local temperature = tonumber(temperature)
local humidity = tonumber(humidity)
if humidity <= 30 then return constants.HUM_DRY
elseif humidity >= 70 then return constants.HUM_WET
elseif humidity >= 35 and
humidity <= 65 and
temperature >= 22 and
temperature <= 26 then return constants.HUM_COMFORTABLE
else return constants.HUM_NORMAL end
end
Re: AM2301+Tasmota - No history for humidity
Posted: Monday 21 February 2022 13:31
by sciurius
While on the topic: The docs say that the humidty value is a "PERCENTAGE (may be > 100)" but it doesn't say whether it is an integer or a float value. It seems that float values are rounded (truncated?) to integers, so no decimal precision. Is this intentional?
Re: AM2301+Tasmota - No history for humidity
Posted: Monday 21 February 2022 13:39
by waltervl
Perhaps, the developers are not always updating the documentation. So you sometimes have to find it out by experimenting or check the source code.
You could also check the database with an SQLite browser to see what is stored.
Re: AM2301+Tasmota - No history for humidity
Posted: Monday 21 February 2022 16:55
by sciurius
Well, column HUMIDITY in table TEMPERATURE is of type INTEGER, so that settles it...