Are they still working? Can’t get my Woox R7049 (smoke detectors ) to work with ZHA , tried numerous Quirks with no success. Pairing always works, after pairing nothing else will be received …
Unit reports as _TZE200_aycxwiau
There are numerous devices described in this thread, and I am not sure everyone is talking about the same device.
They are still working fine. Switched to Zigbee2mqtt a couple of weeks ago, that works fine as well. Actually triggered the alarm on ZHA a couple times while cooking, automations ran fine. Om Z2M you get a couple more options as well, like testing the alarm. It shows up under the same modelname as yours, should work fine with ZHA without any quirks…
…you get a couple more options as well, like testing the alarm…
Dummy me !!!
I assumed that hitting the test button would equal a real smoke alarm.
When I tested with some smoldering paper the alarm did show up in ZHA.
I guess that somewhat makes sense, since we do not want automated calls to fire station when somebody hits the test button…
Let me just conclude my journey with the Woox R7049. So I would clearly consult against using these together with ZHA. So even with my fix, I miss some basic functionality like battery level, apart from that, smoke alarm is identified and can be handled as a sensor.
The main problem, when connecting the R7049 to your HA is, that you dont get any sensor data. You simply can connect it, but having no data point to identify a smoke alarm.
Then I implemented a custom quirk with the following steps:
Activate custom quirks by adding the following to configuration.yaml:
zha:
custom_quirks_path: /config/custom_zha_quirks/
once done, create the folder /config/custom_zha_quirks/ and within that, create the file ts0601_smoke.py and put the following content into that file:
"""Smoke Sensor."""
import logging
import zigpy.profiles.zha
from zigpy.quirks import CustomCluster, CustomDevice
import zigpy.types as t
from zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time
from zigpy.zcl.clusters.security import IasZone
from zhaquirks import Bus
from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
ZONE_STATUS,
ZONE_TYPE,
)
from zhaquirks.tuya import TuyaManufCluster, TuyaManufClusterAttributes
_LOGGER = logging.getLogger(__name__)
TUYA_SMOKE_DETECTED_ATTR = 0x0401 # [0]/[1] [Detected]/[Clear]!
class TuyaSmokeDetectorCluster(TuyaManufClusterAttributes):
"""Manufacturer Specific Cluster of the TS0601 smoke detector."""
attributes = {
TUYA_SMOKE_DETECTED_ATTR: ("smoke_detected", t.uint8_t, True),
}
def _update_attribute(self, attrid, value):
super()._update_attribute(attrid, value)
if attrid == TUYA_SMOKE_DETECTED_ATTR:
if value == 0:
self.endpoint.device.ias_bus.listener_event(
"update_zone_status", IasZone.ZoneStatus.Alarm_1
)
else:
self.endpoint.device.ias_bus.listener_event("update_zone_status", 0)
else:
_LOGGER.warning(
"[0x%04x:%s:0x%04x] unhandled attribute: 0x%04x",
self.endpoint.device.nwk,
self.endpoint.endpoint_id,
self.cluster_id,
attrid,
)
class TuyaIasZone(CustomCluster, IasZone):
"""IAS Zone."""
_CONSTANT_ATTRIBUTES = {ZONE_TYPE: IasZone.ZoneType.Fire_Sensor}
def __init__(self, *args, **kwargs):
"""Init."""
super().__init__(*args, **kwargs)
self.endpoint.device.ias_bus.add_listener(self)
def update_zone_status(self, value):
"""Update IAS status."""
super()._update_attribute(ZONE_STATUS, value)
class TuyaSmokeDetector0601(CustomDevice):
"""TS0601 Smoke detector quirk."""
def __init__(self, *args, **kwargs):
"""Init."""
self.ias_bus = Bus()
super().__init__(*args, **kwargs)
signature = {
MODELS_INFO: [
("_TZE200_bxdyeaa9", "TS0601"),
("_TZE200_dq1mfjug", "TS0601"),
("_TZE200_m9skfctm", "TS0601"),
("_TZE200_ntcy3xu1", "TS0601"),
("_TZE200_vzekyi4c", "TS0601"),
("_TZE204_ntcy3xu1", "TS0601"),
],
ENDPOINTS: {
1: {
PROFILE_ID: zigpy.profiles.zha.PROFILE_ID,
DEVICE_TYPE: zigpy.profiles.zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaManufCluster.cluster_id,
],
OUTPUT_CLUSTERS: [
Time.cluster_id,
Ota.cluster_id,
],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zigpy.profiles.zha.PROFILE_ID,
DEVICE_TYPE: zigpy.profiles.zha.DeviceType.IAS_ZONE,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaIasZone,
TuyaSmokeDetectorCluster,
],
OUTPUT_CLUSTERS: [
Time.cluster_id,
Ota.cluster_id,
],
},
},
}
Once done, delete existing devices out ZHA. Restart HA and add the Smoke detector once more. After that, you should see the sensor “Smoke”. Please be aware, that sensor is only switched on real smoke alarm. Test mode will not trigger that zigbee signal. Hope that helps someone saving some valuable time.
Hi all
I use several WOOX “R7049” Smoke Detectors and they work as expected.
They are reported as _TZE200_aycxwiau inside ZHA.
I got 2 new ones but it turned out this is a newer version “R7049-V2”. They are reported as _TZE200_ft523twt. The new devices could be paired over zha but there is no sensor after pairing.
The only information i see is “LQI” and “RSSI”.
What do you think, should i create a bug entry on github?
Yes, not sure whether in ha or zigpy. Seems to work the same [New device support]: Detect _TZE200_ft523twt as Woox R7049 (aka V2) · Issue #21583 · Koenkk/zigbee2mqtt · GitHub
I tried the solution from myworld. (Thanks!)
I’ve got a WOOX R7049-V2 and the original file ts0601_smoke.pyts0601_smoke.py does not
include the identifier “_TZE200_ft523twt”, which was seen in Home Assistant.
No sensor was shown.
However, after adding the line
("_TZE200_ft523twt", "TS0601"),
after the line
("_TZE200_ntcy3xu1", "TS0601"),
(and after necessary restarts etc)
a sensor was shown in HA. In my particular installation (run in a Docker container),
I could see that the smoke sensor detected smoke, when I sprayed the WOOX with
smoke detector test spray. It remains to see if it will work again, and if it will operate
without faults in the long run.