zha-device-handlers
zha-device-handlers copied to clipboard
[Device Support Request] TY0201 - Temperature + Humdity Sensor
Problem description
This device is recognized and temperature is working, but the device also supports humidity which is unfortunately not working, It is missing.
Solution description
Support for retrieving and displaying the humidity from this device
Screenshots/Video
Screenshots/Video
Device signature
Device signature
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": "0x0104",
"device_type": "0x0302",
"input_clusters": [
"0x0000",
"0x0001",
"0x0003",
"0x0402",
"0x0405"
],
"output_clusters": [
"0x0019"
]
}
},
"manufacturer": "_TZ3000_zl1kmjqx",
"model": "TY0201",
"class": "zigpy.device.Device"
}
Diagnostic information
Diagnostic information
{
"home_assistant": {
"installation_type": "Home Assistant Container",
"version": "2023.12.0",
"dev": false,
"hassio": false,
"virtualenv": false,
"python_version": "3.11.6",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Amsterdam",
"os_name": "Linux",
"os_version": "6.6.7-arch1-1",
"run_as_root": true
},
"custom_components": {
"hacs": {
"version": "1.33.0",
"requirements": [
"aiogithubapi>=22.10.1"
]
}
},
"integration_manifest": {
"domain": "zha",
"name": "Zigbee Home Automation",
"after_dependencies": [
"onboarding",
"usb"
],
"codeowners": [
"@dmulcahey",
"@adminiuga",
"@puddly",
"@TheJulianJES"
],
"config_flow": true,
"dependencies": [
"file_upload"
],
"documentation": "https://www.home-assistant.io/integrations/zha",
"iot_class": "local_polling",
"loggers": [
"aiosqlite",
"bellows",
"crccheck",
"pure_pcapy3",
"zhaquirks",
"zigpy",
"zigpy_deconz",
"zigpy_xbee",
"zigpy_zigate",
"zigpy_znp",
"universal_silabs_flasher"
],
"requirements": [
"bellows==0.37.1",
"pyserial==3.5",
"pyserial-asyncio==0.6",
"zha-quirks==0.0.107",
"zigpy-deconz==0.22.0",
"zigpy==0.60.0",
"zigpy-xbee==0.20.0",
"zigpy-zigate==0.12.0",
"zigpy-znp==0.12.0",
"universal-silabs-flasher==0.0.15",
"pyserial-asyncio-fast==0.11"
],
"usb": [
{
"vid": "10C4",
"pid": "EA60",
"description": "*2652*",
"known_devices": [
"slae.sh cc2652rb stick"
]
},
{
"vid": "1A86",
"pid": "55D4",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus v2"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*zigstar*",
"known_devices": [
"ZigStar Coordinators"
]
},
{
"vid": "1CF1",
"pid": "0030",
"description": "*conbee*",
"known_devices": [
"Conbee II"
]
},
{
"vid": "0403",
"pid": "6015",
"description": "*conbee*",
"known_devices": [
"Conbee III"
]
},
{
"vid": "10C4",
"pid": "8A2A",
"description": "*zigbee*",
"known_devices": [
"Nortek HUSBZB-1"
]
},
{
"vid": "0403",
"pid": "6015",
"description": "*zigate*",
"known_devices": [
"ZiGate+"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*zigate*",
"known_devices": [
"ZiGate"
]
},
{
"vid": "10C4",
"pid": "8B34",
"description": "*bv 2010/10*",
"known_devices": [
"Bitron Video AV2010/10"
]
}
],
"zeroconf": [
{
"type": "_esphomelib._tcp.local.",
"name": "tube*"
},
{
"type": "_zigate-zigbee-gateway._tcp.local.",
"name": "*zigate*"
},
{
"type": "_zigstar_gw._tcp.local.",
"name": "*zigstar*"
},
{
"type": "_uzg-01._tcp.local.",
"name": "uzg-01*"
},
{
"type": "_slzb-06._tcp.local.",
"name": "slzb-06*"
}
],
"is_built_in": true
},
"data": {
"ieee": "**REDACTED**",
"nwk": 29150,
"manufacturer": "_TZ3000_zl1kmjqx",
"model": "TY0201",
"name": "_TZ3000_zl1kmjqx TY0201",
"quirk_applied": false,
"quirk_class": "zigpy.device.Device",
"quirk_id": null,
"manufacturer_code": 4417,
"power_source": "Battery or Unknown",
"lqi": 160,
"rssi": -60,
"last_seen": "2023-12-20T10:09:32",
"available": true,
"device_type": "EndDevice",
"signature": {
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": "0x0104",
"device_type": "0x0302",
"input_clusters": [
"0x0000",
"0x0001",
"0x0003",
"0x0402",
"0x0405"
],
"output_clusters": [
"0x0019"
]
}
},
"manufacturer": "_TZ3000_zl1kmjqx",
"model": "TY0201"
},
"active_coordinator": false,
"entities": [
{
"entity_id": "button.tz3000_zl1kmjqx_ty0201_identify",
"name": "_TZ3000_zl1kmjqx TY0201"
},
{
"entity_id": "sensor.tz3000_zl1kmjqx_ty0201_battery",
"name": "_TZ3000_zl1kmjqx TY0201"
},
{
"entity_id": "sensor.tz3000_zl1kmjqx_ty0201_temperature",
"name": "_TZ3000_zl1kmjqx TY0201"
}
],
"neighbors": [],
"routes": [],
"endpoint_names": [
{
"name": "TEMPERATURE_SENSOR"
}
],
"user_given_name": null,
"device_reg_id": "5190e0943137e250176e100e0ade7369",
"area_id": "attic",
"cluster_details": {
"1": {
"device_type": {
"name": "TEMPERATURE_SENSOR",
"id": 770
},
"profile_id": 260,
"in_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {
"0x0004": {
"attribute_name": "manufacturer",
"value": "_TZ3000_zl1kmjqx"
},
"0x0005": {
"attribute_name": "model",
"value": "TY0201"
}
},
"unsupported_attributes": {}
},
"0x0001": {
"endpoint_attribute": "power",
"attributes": {
"0x0021": {
"attribute_name": "battery_percentage_remaining",
"value": 200
},
"0x0020": {
"attribute_name": "battery_voltage",
"value": 32
}
},
"unsupported_attributes": {
"0x0031": {
"attribute_name": "battery_size"
},
"0x0033": {
"attribute_name": "battery_quantity"
}
}
},
"0x0003": {
"endpoint_attribute": "identify",
"attributes": {},
"unsupported_attributes": {}
},
"0x0402": {
"endpoint_attribute": "temperature",
"attributes": {
"0x0000": {
"attribute_name": "measured_value",
"value": 1743
}
},
"unsupported_attributes": {}
},
"0x0405": {
"endpoint_attribute": "humidity",
"attributes": {
"0x0000": {
"attribute_name": "measured_value",
"value": 5401
}
},
"unsupported_attributes": {
"0x0000": {
"attribute_name": "measured_value"
}
}
}
},
"out_clusters": {
"0x0019": {
"endpoint_attribute": "ota",
"attributes": {},
"unsupported_attributes": {}
}
}
}
}
}
}
Logs
Logs
[Paste the logs here]
Custom quirk
Custom quirk
[Paste your custom quirk here]
Additional information
The details of this device are: Model RSH-HS06 manufactured by Tuya Zigbee ID: TY0201 by _TZ3000_zl1kmjqx
The device seems (from physical aspect, description and the id code) as the fully supported device: Model IH-K009 manufactured by Tuya Zigbee ID: TS0201 | _TZ3000_dowj6gyi | _TZ3000_8ybe88nf Maybe it is the newer version of this one and the solution for the humidity can be re-used
I have the same device with the same issue. However, if I run the Sonoff Bridge Pro (Tasmota) in non TCP mode (zha), Tasmota sees temperature, signal, battery and humidity properly.
I tried the quirk file in https://github.com/zigpy/zha-device-handlers/issues/2862#issuecomment-1975062539 and it seems to work for me.
My device is reported as manufacturer: "_TZ3000_zl1kmjqx", model: "", so I changed the file to have that model too:
signature = {
MODELS_INFO: [("_TZ3000_bjawzodf", "TY0201")],
...
}
to:
signature = {
MODELS_INFO: [
("_TZ3000_bjawzodf", "TY0201"),
("_TZ3000_zl1kmjqx", ""),
],
...
}
For the original reporter, it seems to be model "TY0201", so you could probably add your model too and it should work:
signature = {
MODELS_INFO: [
("_TZ3000_bjawzodf", "TY0201"),
("_TZ3000_zl1kmjqx", "TY0201"),
("_TZ3000_zl1kmjqx", ""),
],
...
}
It took adding and removing a few times, and I also tried reading the value manually from the device via the "Manage Zigbee device". I don't know it is so flaky but I eventually got it working:
Hope it helps!
This is working for me :) Needed some reloading, restarting and reconnecting of the device, but finally it seems to be working! Thx @llucax
@llucax that seems to be working for one of mine. I'm not sure what started it working for it, but I have several others that are not working still. Same manufacturer as yours. However, it seems that if this quirk applies, I get "Firmware: 0x10013001".
I also have some units that identify as TS0201 (instead of TY) and have the manufacturer "_TZ3000_dowj6gyi" and they just work without needing this quirk added. They look identical to these.
@llucax that seems to be working for one of mine. I'm not sure what started it working for it, but I have several others that are not working still. Same manufacturer as yours. However, it seems that if this quirk applies, I get "Firmware: 0x10013001".
I also have some units that identify as TS0201 (instead of TY) and have the manufacturer "_TZ3000_dowj6gyi" and they just work without needing this quirk added. They look identical to these.
OK, I actually got it to work? Kinda?
The key for me was to have it exactly like this, like you said (but I misunderstood and kept adding "TY0201" to the second model information:
signature = { MODELS_INFO: [ ("_TZ3000_bjawzodf", "TY0201"), ("_TZ3000_zl1kmjqx", ""), ],
Also, I was wrong about the firmware thing I think. I needed to go to Zigbee Info and identify the Quirk: ty0201.TemperatureHumiditySensorWithScreen line instead.
I have five of these sensors. I thought I got them all running great but then discovered last night that only one of them is reporting. They are all reporting that they are using the quirk.