zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
723 stars 670 forks source link

[BUG / Device Support Request] Smart Air House keeper TS0601 _TZE200_dwcarsat v2 #1406

Closed JoryHogeveen closed 1 year ago

JoryHogeveen commented 2 years ago

See https://github.com/zigpy/zha-device-handlers/issues/1313 for technical info

The current implementation isn't 100%. It assumes it's the same as the _TZE200_ryfmq5rl and _TZE200_yvx5lh6k devices but it isn't.

The _TZE200_dwcarsat actually has six sensors.

Most of the above are visible, however, incorrect:

JoryHogeveen commented 2 years ago

More info on the MQTT implementation here: https://github.com/Koenkk/zigbee-herdsman-converters/pull/3745/files

budcalloway commented 2 years ago

Hi Jory, I have the same concerns with this exact same device :)

ajpalm commented 2 years ago

Can confirm under ZHA I'm seeing similar issues with the TZE200_dwcarsat TS0601 device not showing all the sensors and the data being mismatched.

LittleFox94 commented 2 years ago

I actually have this same problem with a device shown as _TZE200_ryfmq5rl

Formaldehyde being at 378ppm right now, CO2 at 2ppm, VOC 1µg/m³. Temperature and humidity look plausible. No PM2.5 sensor on this one, it only has five sensors.

This is on the current dev branch of this repo, commit e3fa034284437595d1997326a8597086d623f413

device signature ```json { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0100", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x0402", "0x0405", "0x040d", "0x042b", "0x042e", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] }, "242": { "profile_id": 41440, "device_type": "0x0061", "in_clusters": [], "out_clusters": [ "0x0021" ] } }, "manufacturer": "_TZE200_ryfmq5rl", "model": "TS0601", "class": "zhaquirks.tuya.air.ts0601_air_quality.TuyaCO2SensorGPP" } ```
JoryHogeveen commented 2 years ago

@LittleFox94 Thanks for this, if even the 5 sensor model is showing inaccurate then I assume the whole integration for all smart air models is incorrect.

@MattWestb Do you have more information on how the sensor params are linked to the actual HA params? Besides the values being reported, was it tested that the values we're linked correctly?

LittleFox94 commented 2 years ago

I just noticed the values don't even change a lot after having the window open for half an hour

The original values in the comment above were before letting fresh air in after the night (bedroom+home office), only difference is formaldehyde now being at 368ppm - but Hass history suggests the 378ppm in the comment above were a typo (it shows constant 368ppm)

This could be the sensor of course, but might also point at a problem in the integration

(I'm using a USB dongle presenting an UART (EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis) as coordinator and it's connected directly to that)

JoryHogeveen commented 2 years ago

Hi @LittleFox94 A Formaldehype value above 100 ppm would be deadly ;). The exposure limit is 8 hours for 0.75 ppm and 15 minutes for 2 ppm (on the workfloor).

Your Formaldehype value probably stands for CO2 which is a normal "daily" value. Hence opening a window won't change it very much.

LittleFox94 commented 2 years ago

Yep, I'm aware that formaldehyde value being true would mean I'm dead ^^'

But shouldn't CO2 change when opening the window, by letting CO2 out? I thought it concentrates in rooms from .. breathing it out?

JoryHogeveen commented 2 years ago

Hi @LittleFox94 If your usual value is around 350 then it means your house is "breathing naturally" so that's a good sign :) Of course this would depend on the isolation of your house and the room size but just from breathing this difference wouldn't be very large and very local in your room.

MattWestb commented 2 years ago

@JoryHogeveen I think all magic is being made in the INIT https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/air/__init__.py and i also think the DPs from some one that is having tuya integration and have looking in tuya dev for getting the information what its function liked to the device but its not 110% sure is correct.

JoryHogeveen commented 2 years ago

@MattWestb Yep looks like it's handled there. Also looks like this is an issue that is also happening at Zigbee2MQTT: https://github.com/Koenkk/zigbee2mqtt/issues/11033

MattWestb commented 2 years ago

We have founding that many tuya device need some "tuya magic" being casting on them then joining (first was TS004F) but we have not getting it implanted in ZHA but HB and Z2M have getting it working and we need reading and writing attributes very early (or kicking the device so it rejoining) then the device is paring for getting it working. Then we can getting it working in quirks we can fixing nearly 10 bad devices and perhaps i can helping in this case 2 but we cant testing it for the moment.

Bad things is missing endpoints (2 devices), Not reporting attributes and having connecting problems / stooping committing or falling in sleep or cant getting time synced.

LittleFox94 commented 2 years ago

just for completeness, my sensor doesn't seem to actually send any updated data - it's not shown as connected in ZigBee visualization and all data is last updated "Yesterday" and right now there is a lot of Isopropanol in the air it should probably pick up as VOC ^^'

Edit: it's now updating regularly after I reconnected it

stephenjamieson commented 2 years ago

Can confirm that I'm having the same issues with this device. watching

JoryHogeveen commented 2 years ago

Maybe related error logs:


Source: /usr/local/lib/python3.9/site-packages/zhaquirks/tuya/__init__.py:1295
First occurred: 6:09:32 PM (2 occurrences)
Last logged: 6:09:36 PM

[0x4093:1:0xef00] No 'handle_set_data_response' tuya handler found for [TuyaCommand(status=0, tsn=1, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]
[0x4093:1:0xef00] No 'handle_set_data_response' tuya handler found for [TuyaCommand(status=0, tsn=3, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'\x00\x00\x00\x00', *payload=0))]```
budcalloway commented 2 years ago

I have to add that this device is sending a huge amount of messages everyday. About 15,000-20,000 entries for some sensors and linkquality each day. Is it normal ?

maxperron commented 2 years ago

I just bought this device and have the same issues as described above. Is there any unofficial quirk we can download?

sj3fk3 commented 2 years ago

Seeing the same issues.. Deadly Formaldehyde Concentration (about 300 ppm) and strange CO2 levels (either around 8 or 40.000)? Temp and Hum seem ok, no PM2.5 and VOC also looks kinda okish.

Sesshoumaru-sama commented 2 years ago

I also died of Formaldehyde several times over, if the value would be correct and PM2.5 is missing. Fix would be greatly appreciated.

AssetBurned commented 2 years ago

Isn't this a pretty similar unit compared to the _TZE200_yvx5lh6k in https://github.com/dresden-elektronik/deconz-rest-plugin/issues/4990 ?

Also to link the topics https://github.com/dresden-elektronik/deconz-rest-plugin/issues/5733

arohl commented 2 years ago

Can confirm under ZHA I'm seeing similar issues with the TZE200_dwcarsat TS0601 device not showing all the sensors and the data being mismatched.

I have the same model and only see one sensor - Voc_level - any idea why I can't even see temperature and humidity?

gudvinr commented 2 years ago

So, I have this sensor too and also didn't have anything other than VOC right after it is paired.

Other sensors appeared only after HA restart and CO₂/HCHO sensors are swapped. PM2.5 is missing as well.

chaples55 commented 2 years ago

I have several of these TZE200_dwcarsat TS0601 and can confirm the behavior that several others have reported. Would love to see these supported! For the time being, I have them integrated via Tuya, though even that isn't perfect since the temperature units use a weird ° character that isn't recognized. Here's how that shows up: Screenshot_2022-07-29-20-18-00-90_c3a231c25ed346e59462e84656a70e50

Except for the wonky temperature unit, this does correspond with what is shown in the Smart Life app: Screenshot_2022-07-29-20-22-20-05_a3b3f7ff182fbca1933b088238f0f0da

chaples55 commented 2 years ago

Just updated HA Core from 6.6 to 8.0 and the temperature reading shows up correctly in °F now via the Tuya integration.

arohl commented 1 year ago

Just updated HA Core from 6.6 to 8.0 and the temperature reading shows up correctly in °F now via the Tuya integration.

@chaples55 Doing it via the Tuya integration means you need a Tuya hub? Looks like it works in zigbee2mqtt but not ZHA.

chaples55 commented 1 year ago

@arohl Yeah, I'm still using 5 of these things via a Tuya hub. I have a 6th one connected via ZHA to keep tabs on whether it is fully supported yet, but unfortunately that still is not the case.

I have a second ZigBee dongle coming soon so I can use both z2m and ZHA and ditch the Tuya hub entirely.

arohl commented 1 year ago

@chaples55 My SkyConnect arrived on Friday so I guess I can use my old dongle to run z2m - why didn't I think of that :-)

marinswk commented 1 year ago

Having the same exact issues with the same model and ZHA with Skyconnect on homeassistant OS. Mismatched sensors values and missing pm2.5 sensor report. Any update here? any way to fix it? :)

n00b001 commented 1 year ago

I'm also having this exact same issue

jdopson0624 commented 1 year ago

Same issue here...

fhaust commented 1 year ago

It's a bit strange ... the sensors come up after a home assistant restart. But CO2 and CH2O (Formaldehyde) seems to be switched? (But even then the CH20 level is higher than safe standard).

Am Do., 16. Feb. 2023 um 21:51 Uhr schrieb Jason Dopson < @.***>:

Same issue here...

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/1406#issuecomment-1433698059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYR6P6YDACZQ6LPEVKSOEDWX2HLZANCNFSM5PZ5S4HA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

gudvinr commented 1 year ago

Don't bother to make it make sense. HCHO and CO2 values are artificial and just calculated from VOC sensor data inside box.

fhaust commented 1 year ago

@gudvinr Is that so? So the "4 in 1" and "6 in 1" sensors are basically the same, just with some more code?

Walmtech commented 1 year ago

Well nothing suprise me with these cheap sensors. I took a look inside and can confirm in my 6in1 there are only 3 sensors.

PXL_20230217_200805988

Walmtech commented 1 year ago

That MP501sensor for VOC only has 4 levels of output not very useful really

image

chaples55 commented 1 year ago

Can confirm that the HCHO, CO2, and VOC values are complete garbage. Bought some proper sensors from Airthings and the values are completely different. The CO2 level on the Airthings reads 2-3x higher and actually changes in response to room occupancy and ventilation, unlike these cheap multi-sensors.

tobixen commented 1 year ago

Bought a heap of cheap tuya airsensors a while ago - _TZE200_yvx5lh6k - using ZHA and they are only reporting VOC (varying between 20 and 50 micrgram / cubic metre.

The layout looks different from what's posted above, but I can recognize the MP501 gas sensor, the AHT20 temperature/humidity sensor and I also have that ZT3L-chip (EDIT: that's the zigbee interface).

Even just the information from the humidity/temperature sensor would be useful for me.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

pwnorbitals commented 9 months ago

Bump ! Thank you :)

shaman007 commented 5 months ago

Bought a heap of cheap tuya airsensors a while ago - _TZE200_yvx5lh6k - using ZHA and they are only reporting VOC (varying between 20 and 50 micrgram / cubic metre.

The layout looks different from what's posted above, but I can recognize the MP501 gas sensor, the AHT20 temperature/humidity sensor and I also have that ZT3L-chip (EDIT: that's the zigbee interface).

Even just the information from the humidity/temperature sensor would be useful for me.

Same thing for me.