stas-demydiuk / domoticz-zigbee2mqtt-plugin

zigbee2mqtt plugin for domoticz
MIT License
136 stars 98 forks source link

Tuya TS0601 air quality sensor request for support #736

Closed daserra23 closed 2 years ago

daserra23 commented 2 years ago

The device only creates temp, humidity and link quality devices at the moment. Missing is CO2, VOC and formaldehyde. In that is very cheap and works very well in zigbee2mqtt I thought it might be good to make it available via the plugin. I am happy to provide and information that might enable this.

During device creation I received the following errors;

2021-11-10 18:28:09.733 Error: (ZIGBEE) Device creation failed, Domoticz settings prevent accepting new devices. 2021-11-10 18:28:45.229 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "co2" 2021-11-10 18:28:45.230 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "voc" 2021-11-10 18:28:45.230 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "formaldehyd" 2021-11-10 18:31:03.468 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "co2" 2021-11-10 18:31:03.469 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "voc" 2021-11-10 18:31:03.469 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "formaldehyd" 2021-11-10 18:31:03.672 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "co2" 2021-11-10 18:31:03.673 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "voc" 2021-11-10 18:31:03.673 Error: (ZIGBEE) 0x9035eafffeb5e390: can not process numeric item "formaldehyd" 2021-11-10 18:31:04.691 Error: (ZIGBEE) 'onMessage' failed 'KeyError'. 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 297 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 137 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 167 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 217 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 63 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices_manager.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 64 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 132 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/device.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 111 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/device.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 45 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/temperature_humidity_sensor.py' 2021-11-10 18:31:04.691 Error: (ZIGBEE) ----> Line 32 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/temperature_humidity_sensor.py'

This is the device in the zigbee2mqtt.io page

https://www.zigbee2mqtt.io/devices/TS0601_air_quality_sensor.html

stas-demydiuk commented 2 years ago

Do you have a link for this device on aliexpress or another place where I can buy it?

daserra23 commented 2 years ago

https://nl.aliexpress.com/item/1005002301550800.html?spm=a2g0o.productlist.0.0.48dc198c2fSHda&algo_pvid=468ba468-2bc8-4607-a2dd-ab0da718e0f3&algo_exp_id=468ba468-2bc8-4607-a2dd-ab0da718e0f3-1&pdp_ext_f=%7B%22sku_id%22%3A%2212000019988342162%22%7D

There are many versions of it if you search for Tuya Air quality sensor.

stas-demydiuk commented 2 years ago

Got it, was confused that it looks different than the one by the link you've initially shared. Ordered one

daserra23 commented 2 years ago

Wow, that's great. It does look different but in the zigbee2mqtt "front end" the device page shows the older (1st link) photo. It's a lot of sensor for not much money !

stas-demydiuk commented 2 years ago

@daserra23, now all features should be supported

daserra23 commented 2 years ago

Brilliant. I gave it a try but as I am on an old Domoticz version due to OZW issues I fell foul of the exdomoticz situation and the plugin wouldn't work. However I will be upgrading Domoticz as soon as I have time to deal with my 35 Z-wave nodes with the next stable. Thanks a ton for your help; how did you find the Tuya hardware, I noticed it was a bit spammy but it didn't cause any network slowdowns ?

Claude2666 commented 2 years ago

Hi,

I had also noticed that there were frequent updates, so in the WebGUI (frontend) of Zigbee2MQTT, I have updated the reporting settings so I only get an update every 60 sec

image

I did noticed that this device sometimes reports an extreme high value and then jumps to 0, and after some hours it starts to report again. So I have my doubts about the reliability of this device.

But it works fine with the latest plugin version, both voc and switch are as expected.

daserra23 commented 2 years ago

Regarding the reliability, I noticed it will only give consistent readings if powered on in a "fresh" room, after which you close the windows, as explained in the meagre instructions.

daserra23 commented 2 years ago

Thanks for the tip about how to reduce the spamming.