AM2301+Tasmota - No history for humidity

Moderator: leecollings

Post Reply
sciurius
Posts: 55
Joined: Monday 26 July 2021 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: NL
Contact:

AM2301+Tasmota - No history for humidity

Post 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
scrot20220218081233.png (14.14 KiB) Viewed 1003 times
scrot20220218081617.png
scrot20220218081617.png (21.42 KiB) Viewed 1003 times
User avatar
waltervl
Posts: 5844
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: AM2301+Tasmota - No history for humidity

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
joba1
Posts: 19
Joined: Saturday 03 March 2018 16:39
Target OS: Linux
Domoticz version: V2024.7
Location: DE
Contact:

Re: AM2301+Tasmota - No history for humidity

Post 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?
User avatar
waltervl
Posts: 5844
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: AM2301+Tasmota - No history for humidity

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
sciurius
Posts: 55
Joined: Monday 26 July 2021 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: NL
Contact:

Re: AM2301+Tasmota - No history for humidity

Post 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?
User avatar
waltervl
Posts: 5844
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: AM2301+Tasmota - No history for humidity

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
sciurius
Posts: 55
Joined: Monday 26 July 2021 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: NL
Contact:

Re: AM2301+Tasmota - No history for humidity

Post by sciurius »

Well, column HUMIDITY in table TEMPERATURE is of type INTEGER, so that settles it...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest