Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS0601 _TZE204_sxm7l9xa defined but shows as not supported #17483

Closed
programmieramt opened this issue Apr 28, 2023 · 131 comments
Closed

TS0601 _TZE204_sxm7l9xa defined but shows as not supported #17483

programmieramt opened this issue Apr 28, 2023 · 131 comments
Labels
problem Something isn't working

Comments

@programmieramt
Copy link

What happened?

I have the tuya human presence sensor but with another manufacturer id.

_TZE204_sxm7l9xa is the one I have

Zigbee2MQTT Version [1.30.3]

Same as in Koenkk/zigbee-herdsman-converters#4940

What did you expect to happen?

The device with the new manufacturer ID workes loke the others.

How to reproduce it (minimal and precise)

Add the device

Zigbee2MQTT version

1.30.3

Adapter firmware version

6.10.3.0 build 297

Adapter

home assistant yellow

Debug log

No response

@programmieramt programmieramt added the problem Something isn't working label Apr 28, 2023
@Koenkk
Copy link
Owner

Koenkk commented Apr 28, 2023

Could you check if the issue is fixed with the following external converter: https://gist.github.com/Koenkk/9295fc8afcc65f36027f9ab4d319ce64

  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m, check if issue is fixed

@programmieramt
Copy link
Author

programmieramt commented Apr 30, 2023

Thanks for the quick answer:

I have now the lux working but get these errors:
Bildschirmfoto 2023-04-30 um 14 23 57

Here all the Infos in the log when adding the device

2023-04-30 14:31:02MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Presence1","ieee_address":"0xa4c138131d5c0e1d"},"type":"device_joined"}'
Info 2023-04-30 14:31:02Starting interview of 'Presence1'
Info 2023-04-30 14:31:03MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Presence1","ieee_address":"0xa4c138131d5c0e1d","status":"started"},"type":"device_interview"}'
Info 2023-04-30 14:31:03MQTT publish: topic 'zigbee2mqtt/Wohnzimmer Stecker Google', payload '{"current":0.02,"energy":1.02,"linkquality":132,"power":0,"state":"ON","voltage":248}'
Info 2023-04-30 14:31:04Successfully interviewed 'Presence1', device has successfully been paired
Info 2023-04-30 14:31:04Device 'Presence1' is supported, identified as: TuYa Smart Human presence sensor (TS0601_smart_human_presence_sensor)
Info 2023-04-30 14:31:05MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Smart Human presence sensor","exposes":[{"access":1,"description":"Measured illuminance in lux","name":"illuminance_lux","property":"illuminance_lux","type":"numeric","unit":"lx"},{"access":1,"description":"Indicates whether the device detected presence","name":"presence","property":"presence","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Distance to target","name":"target_distance","property":"target_distance","type":"numeric","unit":"m"},{"access":3,"description":"sensitivity of the radar","name":"radar_sensitivity","property":"radar_sensitivity","type":"numeric","value_max":9,"value_min":0,"value_step":1},{"access":3,"description":"Minimum range","name":"minimum_range","property":"minimum_range","type":"numeric","unit":"m","value_max":9.5,"value_min":0,"value_step":0.15},{"access":3,"description":"Maximum range","name":"maximum_range","property":"maximum_range","type":"numeric","unit":"m","value_max":9.5,"value_min":0,"value_step":0.15},{"access":3,"description":"Detection delay","name":"detection_delay","property":"detection_delay","type":"numeric","unit":"s","value_max":10,"value_min":0,"value_step":0.1},{"access":3,"description":"Fading time","name":"fading_time","property":"fading_time","type":"numeric","unit":"s","value_max":1500,"value_min":0,"value_step":1},{"access":1,"description":"Self_test, possible resuts: checking, check_success, check_failure, others, comm_fault, radar_fault.","name":"self_test","property":"self_test","type":"enum","values":["checking","check_success","check_failure","others","comm_fault","radar_fault"]},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"TS0601_smart_human_presence_sensor","options":[],"supports_ota":false,"vendor":"TuYa"},"friendly_name":"Presence1","ieee_address":"0xa4c138131d5c0e1d","status":"successful","supported":true},"type":"device_interview"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/illuminance_lux/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"device_class":"illuminance","enabled_by_default":true,"name":"Presence1 illuminance lux","state_class":"measurement","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_illuminance_lux_zigbee2mqtt","unit_of_measurement":"lx","value_template":"{{ value_json.illuminance_lux }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/binary_sensor/0xa4c138131d5c0e1d/presence/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"device_class":"presence","name":"Presence1 presence","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_presence_zigbee2mqtt","value_template":"{{ value_json.presence }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/target_distance/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":true,"name":"Presence1 target distance","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_target_distance_zigbee2mqtt","unit_of_measurement":"m","value_template":"{{ value_json.target_distance }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/radar_sensitivity/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":false,"name":"Presence1 radar sensitivity","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_radar_sensitivity_zigbee2mqtt","value_template":"{{ value_json.radar_sensitivity }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/number/0xa4c138131d5c0e1d/radar_sensitivity/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/Presence1/set/radar_sensitivity","device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"max":9,"min":0,"name":"Presence1 radar sensitivity","state_topic":"zigbee2mqtt/Presence1","step":1,"unique_id":"0xa4c138131d5c0e1d_radar_sensitivity_zigbee2mqtt","value_template":"{{ value_json.radar_sensitivity }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/minimum_range/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":false,"name":"Presence1 minimum range","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_minimum_range_zigbee2mqtt","unit_of_measurement":"m","value_template":"{{ value_json.minimum_range }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/number/0xa4c138131d5c0e1d/minimum_range/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/Presence1/set/minimum_range","device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"max":9.5,"min":0,"name":"Presence1 minimum range","state_topic":"zigbee2mqtt/Presence1","step":0.15,"unique_id":"0xa4c138131d5c0e1d_minimum_range_zigbee2mqtt","unit_of_measurement":"m","value_template":"{{ value_json.minimum_range }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/maximum_range/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":false,"name":"Presence1 maximum range","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_maximum_range_zigbee2mqtt","unit_of_measurement":"m","value_template":"{{ value_json.maximum_range }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/number/0xa4c138131d5c0e1d/maximum_range/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/Presence1/set/maximum_range","device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"max":9.5,"min":0,"name":"Presence1 maximum range","state_topic":"zigbee2mqtt/Presence1","step":0.15,"unique_id":"0xa4c138131d5c0e1d_maximum_range_zigbee2mqtt","unit_of_measurement":"m","value_template":"{{ value_json.maximum_range }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/detection_delay/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":false,"name":"Presence1 detection delay","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_detection_delay_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_delay }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/number/0xa4c138131d5c0e1d/detection_delay/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/Presence1/set/detection_delay","device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"max":10,"min":0,"name":"Presence1 detection delay","state_topic":"zigbee2mqtt/Presence1","step":0.1,"unique_id":"0xa4c138131d5c0e1d_detection_delay_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.detection_delay }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/fading_time/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":false,"name":"Presence1 fading time","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_fading_time_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.fading_time }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/number/0xa4c138131d5c0e1d/fading_time/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/Presence1/set/fading_time","device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"max":1500,"min":0,"name":"Presence1 fading time","state_topic":"zigbee2mqtt/Presence1","step":1,"unique_id":"0xa4c138131d5c0e1d_fading_time_zigbee2mqtt","unit_of_measurement":"s","value_template":"{{ value_json.fading_time }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/self_test/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":true,"name":"Presence1 self test","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_self_test_zigbee2mqtt","value_template":"{{ value_json.self_test }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'homeassistant/sensor/0xa4c138131d5c0e1d/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138131d5c0e1d"],"manufacturer":"TuYa","model":"Smart Human presence sensor (TS0601_smart_human_presence_sensor)","name":"Presence1"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"Presence1 linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/Presence1","unique_id":"0xa4c138131d5c0e1d_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Info 2023-04-30 14:31:05MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":1012,"linkquality":208,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Warning 2023-04-30 14:31:06fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,64]}}
Info 2023-04-30 14:31:06MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":1009,"linkquality":208,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Warning 2023-04-30 14:31:07fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,60]}}
Info 2023-04-30 14:31:08MQTT publish: topic 'zigbee2mqtt/Wohnzimmer Stecker Google', payload '{"current":0,"energy":1.02,"linkquality":140,"power":0,"state":"ON","voltage":248}'
Warning 2023-04-30 14:31:08fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 107 with data {"dp":107,"datatype":2,"data":{"type":"Buffer","data":[0,0,2,88]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 106 with data {"dp":106,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,7]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 108 with data {"dp":108,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,60]}}
Info 2023-04-30 14:31:09MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.5,"energy":95.94,"indicator_mode":"off/on","linkquality":244,"power":142,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 111 with data {"dp":111,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,1]}}
Info 2023-04-30 14:31:09MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.5,"energy":95.94,"indicator_mode":"off/on","linkquality":244,"power":142,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 110 with data {"dp":110,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,50]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,60]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 105 with data {"dp":105,"datatype":4,"data":{"type":"Buffer","data":[1]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 107 with data {"dp":107,"datatype":2,"data":{"type":"Buffer","data":[0,0,2,88]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 106 with data {"dp":106,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,7]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 108 with data {"dp":108,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,60]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 111 with data {"dp":111,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,1]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 110 with data {"dp":110,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,50]}}
Warning 2023-04-30 14:31:09fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,60]}}
Info 2023-04-30 14:31:10MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.5,"energy":95.94,"indicator_mode":"off/on","linkquality":248,"power":146,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:10MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":1011,"linkquality":204,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:11MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.52,"energy":95.94,"indicator_mode":"off/on","linkquality":248,"power":146,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:12MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":1027,"linkquality":208,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:13MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":1001,"linkquality":200,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:14MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":984,"linkquality":196,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:15MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.52,"energy":95.94,"indicator_mode":"off/on","linkquality":244,"power":159,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:15MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":967,"linkquality":200,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:15MQTT publish: topic 'zigbee2mqtt/Techniker Stecker', payload '{"current":0,"energy":27.76,"linkquality":255,"power":0,"state":"OFF","voltage":247}'
Info 2023-04-30 14:31:15MQTT publish: topic 'zigbee2mqtt/Wohnzimmer Stecker Google', payload '{"current":0.02,"energy":1.02,"linkquality":255,"power":0,"state":"ON","voltage":248}'
Info 2023-04-30 14:31:19MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":984,"linkquality":196,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:20MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.52,"energy":95.94,"indicator_mode":"off/on","linkquality":248,"power":170,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:21MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":967,"linkquality":196,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:22MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":960,"linkquality":200,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:23MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":983,"linkquality":196,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:24MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.58,"energy":95.94,"indicator_mode":"off/on","linkquality":248,"power":170,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:24MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":1003,"linkquality":196,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:24MQTT publish: topic 'zigbee2mqtt/Wohnzimmer Stecker Google', payload '{"current":0,"energy":1.02,"linkquality":255,"power":0,"state":"ON","voltage":248}'
Info 2023-04-30 14:31:25MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.58,"energy":95.94,"indicator_mode":"off/on","linkquality":248,"power":186,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:25MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":1010,"linkquality":196,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:29MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.64,"energy":95.94,"indicator_mode":"off/on","linkquality":244,"power":186,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:29MQTT publish: topic 'zigbee2mqtt/Wohnzimmer Stecker Google', payload '{"current":0.02,"energy":1.02,"linkquality":255,"power":0,"state":"ON","voltage":248}'
Info 2023-04-30 14:31:30MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.64,"energy":95.94,"indicator_mode":"off/on","linkquality":248,"power":211,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Info 2023-04-30 14:31:31MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":980,"linkquality":204,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Warning 2023-04-30 14:31:31fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,1,51]}}
Info 2023-04-30 14:31:32MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":950,"linkquality":200,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Info 2023-04-30 14:31:33MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":966,"linkquality":204,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Warning 2023-04-30 14:31:33fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,1,44]}}
Info 2023-04-30 14:31:34MQTT publish: topic 'zigbee2mqtt/Wohnzimmer Stecker Google', payload '{"current":0,"energy":1.02,"linkquality":255,"power":0,"state":"ON","voltage":248}'
Warning 2023-04-30 14:31:34fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,1,27]}}
Info 2023-04-30 14:31:35MQTT publish: topic 'zigbee2mqtt/Waschmachine', payload '{"child_lock":"UNLOCK","current":1.64,"energy":95.94,"indicator_mode":"off/on","linkquality":248,"power":224,"power_outage_memory":"restore","state":"ON","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null,"voltage":248}'
Warning 2023-04-30 14:31:36fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,64]}}
Info 2023-04-30 14:31:37MQTT publish: topic 'zigbee2mqtt/Presence1', payload '{"detection_delay":null,"fading_time":null,"illuminance_lux":974,"linkquality":204,"maximum_range":null,"minimum_range":null,"presence":null,"radar_sensitivity":null,"self_test":null,"target_distance":null}'
Warning 2023-04-30 14:31:38fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP 109 with data {"dp":109,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,95]}}`

@Koenkk
Copy link
Owner

Koenkk commented Apr 30, 2023

To figure out what these datpoints mean (e.g. 109) you need a TuYa bridge: https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html

@programmieramt
Copy link
Author

ok thank you. Very sad. Then I have to think about investing 20more euros into that :-)

@dengi76
Copy link

dengi76 commented May 2, 2023

I join The same problem!

@programmieramt
Copy link
Author

I join The same problem!

Just ordered the tuya box in china. Perhabs we find a solution as soon as we find the datapoints

@dengi76
Copy link

dengi76 commented May 2, 2023

Огромное спасибо !!! Буду ждать с нетерпением !

@nicolacavallo84
Copy link

same problem for me too

@mephistolein
Copy link

same problem here, i have no tuya bridge

@RamonSmit
Copy link

I've got a bridge and today I've got four of those sensors. I'm going to try to check it out.

@programmieramt
Copy link
Author

programmieramt commented May 3, 2023

I've got a bridge and today I've got four of those sensors. I'm going to try to check it out.

Sound good, you also have the ones with the id: _TZE204_sxm7l9xa ?
Really looking forward to use these devices

@RamonSmit
Copy link

RamonSmit commented May 3, 2023

This is what I've found:
Editted

104 - Lux
105 - Presence
106 - Motion sensitivity 
107 - Max detection distance
108 - Min detection distance
109 - Target distance
110 - Detection delay
111 - Fading time

@programmieramt
Copy link
Author

This is what I've found:

104 - Lux
105 - Presence
106 - Motion sensitivity 
107 - Max detection distance
108 - Min detection distance
109 - Target distance
110 - No delay time?
111 - Someone set the time? 

I found this doku: https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html#_3-understanding-tuya-datapoints

But not sure what to add to the external converter(https://gist.github.com/Koenkk/9295fc8afcc65f36027f9ab4d319ce64)

@RamonSmit
Copy link

RamonSmit commented May 3, 2023

I'll think there need to be a meta block something like this, I'm going to test it locally :-) :

 meta: {
        tuyaDatapoints: [
            [104, 'illuminance', tuya.valueConverter.raw],
            [105, 'presence', tuya.valueConverter.boolean],
            [106, 'radar_sensitivity', tuya.valueConverter.raw],
            [107, 'maximum_range', tuya.valueConverter.raw],
            [108, 'minimum_range', tuya.valueConverter.raw],
            [109, 'target_distance', tuya.valueConverter.raw],
            [110, 'detection_delay', tuya.valueConverter.raw],
            [111, 'fading_time', tuya.valueConverter.raw],
        ],
    },

I'm not really familiar with the systems yet.

@programmieramt
Copy link
Author

I'll think there need to be a meta block something like this, I'm going to test it locally :-) :

 meta: {
        tuyaDatapoints: [
            [104, 'illuminance', tuya.valueConverter.raw],
            [105, 'presence', tuya.valueConverter.boolean],
            [106, 'radar_sensitivity', tuya.valueConverter.raw],
            [107, 'maximum_range', tuya.valueConverter.raw],
            [108, 'minimum_range', tuya.valueConverter.raw],
            [109, 'target_distance', tuya.valueConverter.raw],
            [110, 'detection_delay', tuya.valueConverter.raw],
            [111, 'fading_time', tuya.valueConverter.raw],
        ],
    },

I'm not really familiar with the systems yet.

hey thank you, I thought the same. But at the moment I still get the same errors as before.

@RamonSmit
Copy link

RamonSmit commented May 3, 2023

I've got it some kind of working with https://gist.github.com/RamonSmit/157f08633b8a05feb8e845d34872999f, need to finetune it obviously a bit more :-). It's a nice way of learning hehe.

@programmieramt
Copy link
Author

I've got it some kind of working with https://gist.github.com/RamonSmit/157f08633b8a05feb8e845d34872999f, need to finetune it obviously a bit more :-). It's a nice way of learning hehe.

I found some examples where it was not boolean but trueFalse1 but don't know

@RamonSmit
Copy link

Feel free to collaborate, I'm new in here 😄

@programmieramt
Copy link
Author

programmieramt commented May 3, 2023

Feel free to collaborate, I'm new in here 😄

Yeah, I already trying:
Bildschirmfoto 2023-05-03 um 16 47 00

this is how it looks like

with:
meta: { tuyaDatapoints: [ [104, 'illuminance', tuya.valueConverter.raw], [105, 'presence', tuya.valueConverter.trueFalse1], [106, 'radar_sensitivity', tuya.valueConverter.raw], [107, 'maximum_range', tuya.valueConverter.raw], [108, 'minimum_range', tuya.valueConverter.raw], [109, 'target_distance', tuya.valueConverter.raw], [110, 'detection_delay', tuya.valueConverter.raw], [111, 'fading_time', tuya.valueConverter.raw], ],

Has to be cm instead of m I think :-)

@RamonSmit
Copy link

RamonSmit commented May 3, 2023

Hahaha, good catch! My house is not that big indeed hehe. I also think that illuminance should be illuminance_lux?

in the TuYa development portal its reported as 0.60M, so there has to be a conversion somewhere.
Found it: https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/fromZigbee.js#L8114

@programmieramt
Copy link
Author

programmieramt commented May 3, 2023

Hahaha, good catch! My house is not that big indeed hehe. I also think that illuminance should be illuminance_lux?

in the TuYa development portal its reported as 0.60M, so there has to be a conversion somewhere. Found it: https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/fromZigbee.js#L8114

Do i have to remove and readd the device after changing the converter?

funny think I ordered 4 devices 2 came with : _TZE204_ztc6ggyl and 2 with _TZE204_sxm7l9xa

@Koenkk the _TZE204_ztc6ggyl is working without an external converter I removed it from the file and worked just as a short remark

@RamonSmit you are right the one without the need of an external converter show 0,6m

@RamonSmit
Copy link

> Do i have to remove and readd the device after changing the converter?

As far as I know, not. I've only needed to restart the system a couple of times

@ecenshu
Copy link

ecenshu commented May 4, 2023

I've managed to get mine working with the following:

meta: {
        tuyaDatapoints: [
            [104, 'illuminance_lux', tuya.valueConverter.raw],
            [105, 'presence', tuya.valueConverter.trueFalse1],
            [106, 'radar_sensitivity', tuya.valueConverter.raw],
            [107, 'maximum_range', tuya.valueConverter.divideBy100],
            [108, 'minimum_range', tuya.valueConverter.divideBy100],
            [109, 'target_distance', tuya.valueConverter.divideBy100],
            [110, 'detection_delay', tuya.valueConverter.raw],
            [111, 'fading_time', tuya.valueConverter.raw]
        ],
    },

@ecenshu
Copy link

ecenshu commented May 4, 2023

illuminance_lux and presence seems to be working however any attempts at setting the state for radar_sensitivity, maximum_range, minimum_range, detection_delay or fading_time gives an error log entry like the one below:

No converter available for 'detection_delay' (6.1)

@programmieramt
Copy link
Author

illuminance_lux and presence seems to be working however any attempts at setting the state for radar_sensitivity, maximum_range, minimum_range, detection_delay or fading_time gives an error log entry like the one below:

No converter available for 'detection_delay' (6.1)

Thanks for the input. I have the same problem changing values

@RamonSmit
Copy link

It has something to do with the toZigbee converters I think. Issue 15729 looks like our issue for this device

@anhnt3
Copy link

anhnt3 commented May 5, 2023

Here working ext_converter.js:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: [
        { modelID: 'TS0601', manufacturerName: '_TZE204_sxm7l9xa' }
    ],
    model: 'TS0601_smart_human_presence_sensor',
    vendor: 'TuYa',
    description: 'Smart Human presence sensor',
    fromZigbee: [{
        cluster: 'manuSpecificTuya',
        type: ['commandDataResponse', 'commandDataReport'],
        convert: (model, msg, publish, options, meta) => {
            const dpValue = tuya.firstDpValue(msg, meta, 'tuya_smart_human_presense_sensor');
            const dp = dpValue.dp;
            const value = tuya.getDataValue(dpValue);
            let result = null;
            switch (dp) {
                case 105://tuya.dataPoints.tshpsPresenceState:
                    result = { presence: { 0: false, 1: true }[value] };
                    break;
                case 106://tuya.dataPoints.tshpscSensitivity:
                    result = { radar_sensitivity: value };
                    break;
                case 108://tuya.dataPoints.tshpsMinimumRange:
                    result = { minimum_range: value / 100 };
                    break;
                case 107://tuya.dataPoints.tshpsMaximumRange:
                    result = { maximum_range: value / 100 };
                    break;
                case 109://tuya.dataPoints.tshpsTargetDistance:
                    result = { target_distance: value / 100 };
                    break;
                case 110://tuya.dataPoints.tshpsDetectionDelay:
                    result = { detection_delay: value / 10 };
                    break;
                case 111://tuya.dataPoints.tshpsFadingTime:
                    result = { fading_time: value / 10 };
                    break;
                case 104://tuya.dataPoints.tshpsIlluminanceLux:
                    result = { illuminance_lux: value };
                    break;
                case tuya.dataPoints.tshpsCLI: // not recognize
                    result = { cli: value };
                    break;
                case tuya.dataPoints.tshpsSelfTest:
                    result = { self_test: tuya.tuyaHPSCheckingResult[value] };
                    break;
                default:
                    meta.logger
                        .warn(`fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP ${dp} with data ${JSON.stringify(dpValue)}`);
            }
            return result;
        },
    }],
    toZigbee: [{
        key: ['radar_sensitivity', 'minimum_range', 'maximum_range', 'detection_delay', 'fading_time'],
        convertSet: async (entity, key, value, meta) => {
            switch (key) {
                case 'radar_sensitivity':
                    //await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpscSensitivity, value);
                    await tuya.sendDataPointValue(entity, 106, value);
                    break;
                case 'minimum_range':
                    //await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMinimumRange, value * 100);
                    await tuya.sendDataPointValue(entity, 108, value * 100);
                    break;
                case 'maximum_range':
                    //await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMaximumRange, value * 100);
                    await tuya.sendDataPointValue(entity, 107, value * 100);
                    break;
                case 'detection_delay':
                    //await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsDetectionDelay, value * 10);
                    await tuya.sendDataPointValue(entity, 110, value * 10);
                    break;
                case 'fading_time':
                    //await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsFadingTime, value * 10);
                    await tuya.sendDataPointValue(entity, 111, value * 10);
                    break;
                default: // Unknown Key
                    meta.logger.warn(`toZigbee.tuya_smart_human_presense_sensor: Unhandled Key ${key}`);
            }
        },
    }],
    exposes: [
        e.illuminance_lux(), e.presence(),
        exposes.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('m'),
        exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1)
            .withDescription('sensitivity of the radar'),
        exposes.numeric('minimum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
            .withDescription('Minimum range').withUnit('m'),
        exposes.numeric('maximum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
            .withDescription('Maximum range').withUnit('m'),
        exposes.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1)
            .withDescription('Detection delay').withUnit('s'),
        exposes.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(1500).withValueStep(1)
            .withDescription('Fading time').withUnit('s'),
        // exposes.text('cli', ea.STATE).withDescription('not recognize'),
        exposes.enum('self_test', ea.STATE, Object.values(tuya.tuyaHPSCheckingResult))
            .withDescription('Self_test, possible resuts: checking, check_success, check_failure, others, comm_fault, radar_fault.'),
    ],
    // meta: {
    //     tuyaDatapoints: [
    //         [104, 'illuminance', tuya.valueConverter.raw],
    //         [105, 'presence', tuya.valueConverter.trueFalse1],
    //         [106, 'radar_sensitivity', tuya.valueConverter.raw],
    //         [107, 'maximum_range', tuya.valueConverter.raw],
    //         [108, 'minimum_range', tuya.valueConverter.raw],
    //         [109, 'target_distance', tuya.valueConverter.raw],
    //         [110, 'detection_delay', tuya.valueConverter.raw],
    //         [111, 'fading_time', tuya.valueConverter.raw]
    //     ],
    // }
};

module.exports = definition;

@tomiss288
Copy link

It's work. Many thx. Your great.

@harpreps
Copy link

harpreps commented Jul 4, 2023

Same here. Getting the errors for human presence sensors:

Zigbee2MQTT:debug 2023-07-03 23:39:41: Received Zigbee message from 'Living room presence sensor', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,0],"type":"Buffer"},"datatype":2,"dp":109}],"seq":6656}' from endpoint 1 with groupID 0
Zigbee2MQTT:error 2023-07-03 23:39:41: Exception while calling fromZigbee converter: tuya.firstDpValue is not a function}
Zigbee2MQTT:debug 2023-07-03 23:39:41: TypeError: tuya.firstDpValue is not a function
at Object.convert (/app/data/extension/externally-loaded.js:24:34)
at Receive.onDeviceMessage (/app/lib/extension/receive.ts:150:51)
at EventEmitter.emit (node:events:525:35)
at EventBus.emitDeviceMessage (/app/lib/eventBus.ts:102:22)
at Controller. (/app/lib/zigbee.ts:106:27)
at Controller.emit (node:events:513:28)
at Controller.selfAndDeviceEmit (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:515:14)
at Controller.onZclOrRawData (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:726:18)
at ZStackAdapter. (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:144:70)
at ZStackAdapter.emit (node:events:513:28)

Any way to fix this ? Thank you.

@Koenkk
Copy link
Owner

Koenkk commented Jul 4, 2023

The functions are now available in const legacy = require('zigbee-herdsman-converters/lib/legacy'); (e.g. legacy. getDataValue). Note it requires the dev branch currently. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

@tothgergely92
Copy link

tothgergely92 commented Jul 4, 2023

Thank you for your quick response and the fix in the code. As I see, we should wait until you update the zigbee-herdsman-converters version in the zigbee2mqtt package.json on the dev branch, right?

Edit: Now zigbee2mqtt dev branch updated and the external converter works again after changing tuya.getDataValue to legacy.getDataValue with the mentioned import. 👍

@sitmarc
Copy link

sitmarc commented Jul 5, 2023

The functions are now available in const legacy = require('zigbee-herdsman-converters/lib/legacy'); (e.g. legacy. getDataValue). Note it requires the dev branch currently. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Thank you, @Koenkk, it's work.

@awonglk
Copy link

awonglk commented Sep 25, 2023

I've just got my TS0601 Human Presence Sensor, and tried to pair it.. Looks like it's a different ID to the above:

warn 2023-09-25 12:21:22: Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_e5m9c5hl'

Is this a variation of the one above? Do I need to raise a new request for specific support of this variation?

It appears to be a 5.8GHZ mmWave / Zigbee / Wall mount version

@BenDavidson90
Copy link

BenDavidson90 commented Sep 26, 2023

I've just got my TS0601 Human Presence Sensor, and tried to pair it.. Looks like it's a different ID to the above:

warn 2023-09-25 12:21:22: Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_e5m9c5hl'

Is this a variation of the one above? Do I need to raise a new request for specific support of this variation?

It appears to be a 5.8GHZ mmWave / Zigbee / Wall mount version

Exact same problem here ! Received mine today, the 24G version (not the 5.8G), I didn't realise that it wasn't the same one...

Edit: I added the external converter of this link and replaced _TZE204_sxm7l9xa by _TZE204_ijxvkhd0, it is recognized but not all informations are displayed (like presence and target distance) and not all parameters too ("No converter available for 'minimum_range' (4.05)")
Edit 2: The same for all the settings displayed.
Only the lux is working.

@pascualps
Copy link

I've just got my TS0601 Human Presence Sensor, and tried to pair it.. Looks like it's a different ID to the above:
warn 2023-09-25 12:21:22: Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_e5m9c5hl'
Is this a variation of the one above? Do I need to raise a new request for specific support of this variation?
It appears to be a 5.8GHZ mmWave / Zigbee / Wall mount version

Exact same problem here ! Received mine today, the 24G version (not the 5.8G), I didn't realise that it wasn't the same one...

Edit: I added the external converter of this link and replaced _TZE204_sxm7l9xa by _TZE204_ijxvkhd0, it is recognized but not all informations are displayed (like presence and target distance) and not all parameters too ("No converter available for 'minimum_range' (4.05)") Edit 2: The same for all the settings displayed. Only the lux is working.

Can you be more specific on the external converted used please?

@BenDavidson90
Copy link

I've just got my TS0601 Human Presence Sensor, and tried to pair it.. Looks like it's a different ID to the above:
warn 2023-09-25 12:21:22: Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_e5m9c5hl'
Is this a variation of the one above? Do I need to raise a new request for specific support of this variation?
It appears to be a 5.8GHZ mmWave / Zigbee / Wall mount version

Exact same problem here ! Received mine today, the 24G version (not the 5.8G), I didn't realise that it wasn't the same one...
Edit: I added the external converter of this link and replaced _TZE204_sxm7l9xa by _TZE204_ijxvkhd0, it is recognized but not all informations are displayed (like presence and target distance) and not all parameters too ("No converter available for 'minimum_range' (4.05)") Edit 2: The same for all the settings displayed. Only the lux is working.

Can you be more specific on the external converted used please?

Sorry, it was a bad link. I updated my comment with the good link.

@chinswain
Copy link

Same issue - just added a _TZE204_ijxvkhd0, was not recognised.

Replaced _TZE204_sxm7l9xa with _TZE204_e5m9c5hl in here, but not entities working.

5.8GHZ mmWave / Zigbee / Wall mount version

@marciej123
Copy link

I think I bought the same:

Zigbee Model
TS0601
Zigbee Manufacturer
_TZE204_mtoaryre
Support status
Not supported

I bought this one: 5,8g ceiling mount.
https://a.aliexpress.com/_EHPbWeJ

It has a 16A relay as well, any clue how to get this working?

@OakfieldDrive
Copy link

OakfieldDrive commented Oct 29, 2023

Hi community,
same problem here. bought the same device as @marciej123, i.e., the _TZE204_mtoaryre TS0601, tried to use this converter (changing the device name) but no luck. Anyone working on that?

@marciej123
Copy link

marciej123 commented Oct 29, 2023

@OakfieldDrive,

I managed to get it working via this converter:


const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const e = exposes.presets;
const ea = exposes.access;


const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key, 'radar_sensitivity', 'entry_sensitivity', 'illumin_threshold', 'detection_range','shield_range','entry_distance_indentation','entry_filter_time','departure_delay','block_time', 'breaker_polarity', 'status_indication','breaker_mode','se sensor']
}

const definition = {
        fingerprint: tuya.fingerprint('TS0601', ['_TZE204_mtoaryre']),
        model: 'TS0601',
        vendor: 'Tuya',
        description: '5.8G human presence sensor with relay',
        configure: tuya.configureMagicPacket,
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
        exposes: [
            e.presence(), e.illuminance_lux(),
            e.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('cm'),
            e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Sensitivity of the radar'),
            e.numeric('entry_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1).withDescription('Entry sensitivity'),
            e.numeric('illumin_threshold', ea.STATE_SET).withValueMin(0).withValueMax(420).withValueStep(0.1).withUnit('lx')
                .withDescription('Illumination threshold for switching on'),
            e.numeric('detection_range', ea.STATE_SET).withValueMin(240).withValueMax(1250).withValueStep(10)
                .withUnit('cm').withDescription('Detection range'),
            e.numeric('shield_range', ea.STATE_SET).withValueMin(30).withValueMax(1240).withValueStep(10).withUnit('cm')
                .withDescription('Shield range of the radar'),
            e.numeric('entry_distance_indentation', ea.STATE_SET).withValueMin(0).withValueMax(1220).withValueStep(10).withUnit('cm')
                .withDescription('Entry distance indentation'),
            e.numeric('entry_filter_time', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s')
                .withDescription('Entry filter time'),
            e.numeric('departure_delay', ea.STATE_SET).withValueMin(2).withValueMax(1500).withValueStep(1).withUnit('s').
                withDescription('Turn off delay'),
            e.numeric('block_time', ea.STATE_SET).withValueMin(1.5).withValueMax(60).withValueStep(0.1).withUnit('s').withDescription('Block time'),
            e.binary('breaker_status', ea.STATE_SET, 'ON', 'OFF').withDescription('Breaker status changes with breaker_mode->standard'),
            e.enum('breaker_mode', ea.STATE_SET, ['standard', 'local']).withDescription('Status Breaker mode'),
            e.enum('status_indication', ea.STATE_SET, ['ON', 'OFF']).withDescription('Led backlight when triggered'),
			e.enum('sensor', ea.STATE_SET, ['turn_on', 'turn_off', 'occupied', 'unoccupied']).withDescription('The radar sensor can be set in four states: turn on, turn off, occupied, and unoccupied. For example, if occupied is set up, it will continue to maintain a presence regardless of whether someone present or not. If unoccupied is set, the unoccupied state will be maintained continuously.'),	
        ],
        meta: {
            tuyaDatapoints: [
                [1, 'presence', tuya.valueConverter.trueFalse1],
                [2, 'radar_sensitivity', tuya.valueConverter.raw],
                [3, 'shield_range', tuya.valueConverter./*divideBy100*/raw], 
                [4, 'detection_range', tuya.valueConverter./*divideBy100*/raw],
                [6, 'equipment_status', tuya.valueConverter.raw],
                [9, 'target_distance', tuya.valueConverter./*divideBy100*/raw],
                [101, 'entry_filter_time', tuya.valueConverter.divideBy10],
                [102, 'departure_delay', tuya.valueConverter.raw],
                [103, 'cline', tuya.valueConverter.raw],
                [104, 'illuminance_lux', tuya.valueConverter.divideBy10],
                [105, 'entry_sensitivity', tuya.valueConverter.raw],
                [106, 'entry_distance_indentation', tuya.valueConverter./*divideBy100*/raw],
			    [107, 'breaker_mode', tuya.valueConverterBasic.lookup({'standard': tuya.enum(0), 'local': tuya.enum(1)})],
                [108, 'breaker_status', tuya.valueConverterBasic.lookup({'ON': tuya.enum(1), 'OFF': tuya.enum(0)})],
                [109, 'status_indication', tuya.valueConverterBasic.lookup({'ON': tuya.enum(1), 'OFF': tuya.enum(0)})],
                [110, 'illumin_threshold', tuya.valueConverter.divideBy10],
                [112, 'block_time', tuya.valueConverter.divideBy10],
                [113, 'parameter_setting_result', tuya.valueConverter.raw],
                [114, 'factory_parameters', tuya.valueConverter.raw],
                [115, 'sensor', tuya.valueConverterBasic.lookup({'turn_on': tuya.enum(0), 'turn_off': tuya.enum(1), 'occupied': tuya.enum(2), 'unoccupied': tuya.enum(3)})], 
            ],
        },
    icon: 'data:image/png;base64,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',
    };
	
module.exports = definition;

@OakfieldDrive
Copy link

Hi @marciej123 thanks so much for sharing. I tried but with no joy. To be sure I did it right. I created a new script file within the zigbee2mqtt section, close to the configuration.yaml file, called TZE204_mtoaryre.js and pasted your code inside.

couple of months ago, had the same issue with the 24G sensor, did this same thing and it worked. this one, unfortunately, doesn't. am I doing something wrong?

@chinswain
Copy link

This one works for me:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key,  'far_detection', 'near_detection', ]
}



const definition = [
    {
        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE204_e5m9c5hl'}],
        model: 'WZ-M100-Z',
        vendor: 'Wenzhi',
        description: 'Human presence sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
    		onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    		configure: tuya.configureMagicPacket,
        exposes: [
            e.enum('presence_state', ea.STATE, ['none', 'presence']).withDescription('presence_state'),
            //e.illuminance_lux(), 	
            e.numeric('illuminance_lux', ea.STATE).withValueMin(0).withValueMax(2000).withDescription('illuminance_lux').withValueStep(1).withUnit('lux'),
            e.numeric('sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('sensitivity of the radar'),
            e.numeric('distance', ea.STATE).withValueMin(0).withValueMax(10).withDescription('target distance').withValueStep(0.01).withUnit('m'),
            e.numeric('fading_time', ea.STATE_SET).withValueMax(1500).withValueMin(5).withValueStep(5).withUnit('s').withDescription('presence timeout'),
        		e.numeric('far_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('maximum detection range').withValueStep(0.1).withUnit('m'),
       			e.numeric('near_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('minimum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s').withDescription('detection delay'),
            
        ],
        meta: {
            tuyaDatapoints: [
                [105, 'presence_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'presence': tuya.enum(1)})],
                [104, 'illuminance_lux', tuya.valueConverter.raw],
                [106, 'sensitivity', tuya.valueConverter.raw],
                [109, 'distance', tuya.valueConverter.divideBy100],
								[110, 'fading_time', tuya.valueConverter.divideBy10],
								[107, 'far_detection', tuya.valueConverter.divideBy100],
								[108, 'near_detection', tuya.valueConverter.divideBy100],
								[111, 'detection_delay', tuya.valueConverter.divideBy10],
            ],
        },

    },
];

module.exports = definition;

Did you update here and restart?

image

image

@OakfieldDrive
Copy link

Hi @chinswain that was the trick, I had not updated and restarted. done it now and it works nicely. Thanks to both @chinswain and @marciej123

@Adaaks
Copy link

Adaaks commented Oct 29, 2023

This one works for me:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key,  'far_detection', 'near_detection', ]
}



const definition = [
    {
        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE204_e5m9c5hl'}],
        model: 'WZ-M100-Z',
        vendor: 'Wenzhi',
        description: 'Human presence sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
    		onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    		configure: tuya.configureMagicPacket,
        exposes: [
            e.enum('presence_state', ea.STATE, ['none', 'presence']).withDescription('presence_state'),
            //e.illuminance_lux(), 	
            e.numeric('illuminance_lux', ea.STATE).withValueMin(0).withValueMax(2000).withDescription('illuminance_lux').withValueStep(1).withUnit('lux'),
            e.numeric('sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('sensitivity of the radar'),
            e.numeric('distance', ea.STATE).withValueMin(0).withValueMax(10).withDescription('target distance').withValueStep(0.01).withUnit('m'),
            e.numeric('fading_time', ea.STATE_SET).withValueMax(1500).withValueMin(5).withValueStep(5).withUnit('s').withDescription('presence timeout'),
        		e.numeric('far_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('maximum detection range').withValueStep(0.1).withUnit('m'),
       			e.numeric('near_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('minimum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s').withDescription('detection delay'),
            
        ],
        meta: {
            tuyaDatapoints: [
                [105, 'presence_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'presence': tuya.enum(1)})],
                [104, 'illuminance_lux', tuya.valueConverter.raw],
                [106, 'sensitivity', tuya.valueConverter.raw],
                [109, 'distance', tuya.valueConverter.divideBy100],
								[110, 'fading_time', tuya.valueConverter.divideBy10],
								[107, 'far_detection', tuya.valueConverter.divideBy100],
								[108, 'near_detection', tuya.valueConverter.divideBy100],
								[111, 'detection_delay', tuya.valueConverter.divideBy10],
            ],
        },

    },
];

module.exports = definition;

Did you update here and restart?

image

image

i have the same device as you, it works for me this BUTT when i try to make a automation, the presence entity does not show up for me, is this the same case for you? (the presence enitity exists and updates but cant find it when making automations)

image
image

@BenDavidson90
Copy link

This one works for me:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key,  'far_detection', 'near_detection', ]
}



const definition = [
    {
        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE204_e5m9c5hl'}],
        model: 'WZ-M100-Z',
        vendor: 'Wenzhi',
        description: 'Human presence sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
    		onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    		configure: tuya.configureMagicPacket,
        exposes: [
            e.enum('presence_state', ea.STATE, ['none', 'presence']).withDescription('presence_state'),
            //e.illuminance_lux(), 	
            e.numeric('illuminance_lux', ea.STATE).withValueMin(0).withValueMax(2000).withDescription('illuminance_lux').withValueStep(1).withUnit('lux'),
            e.numeric('sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('sensitivity of the radar'),
            e.numeric('distance', ea.STATE).withValueMin(0).withValueMax(10).withDescription('target distance').withValueStep(0.01).withUnit('m'),
            e.numeric('fading_time', ea.STATE_SET).withValueMax(1500).withValueMin(5).withValueStep(5).withUnit('s').withDescription('presence timeout'),
        		e.numeric('far_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('maximum detection range').withValueStep(0.1).withUnit('m'),
       			e.numeric('near_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('minimum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s').withDescription('detection delay'),
            
        ],
        meta: {
            tuyaDatapoints: [
                [105, 'presence_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'presence': tuya.enum(1)})],
                [104, 'illuminance_lux', tuya.valueConverter.raw],
                [106, 'sensitivity', tuya.valueConverter.raw],
                [109, 'distance', tuya.valueConverter.divideBy100],
								[110, 'fading_time', tuya.valueConverter.divideBy10],
								[107, 'far_detection', tuya.valueConverter.divideBy100],
								[108, 'near_detection', tuya.valueConverter.divideBy100],
								[111, 'detection_delay', tuya.valueConverter.divideBy10],
            ],
        },

    },
];

module.exports = definition;

Did you update here and restart?

image

image

Do you have a TZE204_ijxvkhd0 like me? I tried your converter but basically it doesn't work, I had to replace the _TZE204_e5m9c5hl model code in it with _TZE204_ijxvkhd0. It works but it's not great, the brightness in lux works, but the presence changes once in a while and most of the parameters don't work...

@stolevegen
Copy link

stolevegen commented Nov 12, 2023

https://gist.githubusercontent.com/Koenkk/9295fc8afcc65f36027f9ab4d319ce64/raw/0253131a3e7928dca084085cbe879833870c8b97/ext.js

I get the following error when using the above external converter, any ideas what could cause this?
I've been troubleshooting for quite some time now.

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'datapoints' of undefined

@pantherale0
Copy link

This one works for me:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key,  'far_detection', 'near_detection', ]
}



const definition = [
    {
        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE204_e5m9c5hl'}],
        model: 'WZ-M100-Z',
        vendor: 'Wenzhi',
        description: 'Human presence sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
    		onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
    		configure: tuya.configureMagicPacket,
        exposes: [
            e.enum('presence_state', ea.STATE, ['none', 'presence']).withDescription('presence_state'),
            //e.illuminance_lux(), 	
            e.numeric('illuminance_lux', ea.STATE).withValueMin(0).withValueMax(2000).withDescription('illuminance_lux').withValueStep(1).withUnit('lux'),
            e.numeric('sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('sensitivity of the radar'),
            e.numeric('distance', ea.STATE).withValueMin(0).withValueMax(10).withDescription('target distance').withValueStep(0.01).withUnit('m'),
            e.numeric('fading_time', ea.STATE_SET).withValueMax(1500).withValueMin(5).withValueStep(5).withUnit('s').withDescription('presence timeout'),
        		e.numeric('far_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('maximum detection range').withValueStep(0.1).withUnit('m'),
       			e.numeric('near_detection', ea.SET).withValueMin(0).withValueMax(9.5).withDescription('minimum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s').withDescription('detection delay'),
            
        ],
        meta: {
            tuyaDatapoints: [
                [105, 'presence_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'presence': tuya.enum(1)})],
                [104, 'illuminance_lux', tuya.valueConverter.raw],
                [106, 'sensitivity', tuya.valueConverter.raw],
                [109, 'distance', tuya.valueConverter.divideBy100],
								[110, 'fading_time', tuya.valueConverter.divideBy10],
								[107, 'far_detection', tuya.valueConverter.divideBy100],
								[108, 'near_detection', tuya.valueConverter.divideBy100],
								[111, 'detection_delay', tuya.valueConverter.divideBy10],
            ],
        },

    },
];

module.exports = definition;

This works for me, is there a PR open to add support for this device? If not would you mind if I use this as a base to add native support?

@arough007
Copy link

i have the same device as you, it works for me this BUTT when i try to make a automation, the presence entity does not show up for me, is this the same case for you? (the presence enitity exists and updates but cant find it when making automations)

I have the same problem. With the config right above my reply, the presence state isn't usable in any motion-related automation.

@Almaz7791
Copy link

i have the same device as you, it works for me this BUTT when i try to make a automation, the presence entity does not show up for me, is this the same case for you? (the presence enitity exists and updates but cant find it when making automations)

I have the same problem. With the config right above my reply, the presence state isn't usable in any motion-related automation.

The same thing. It is impossible to create automation of turning on the light when motion is detected. When creating automation, there is no motion detection object.

@pantherale0
Copy link

The presence sensor is incorrect in that config, it exposes the entity as a text based enum rather than an actual presence binary sensor.. I updated my converter so it is as follows which is working perfect for me:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key,  'far_detection', 'near_detection', ]
}

const definition = [
    {
        fingerprint: tuya.fingerprint('TS0601', ['_TZE204_e5m9c5hl']),
        model: 'WZ-M100-Z',
        vendor: 'Wenzhi',
        description: 'Human presence sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
        onEvent: tuya.onEventSetTime,
        configure: tuya.configureMagicPacket,
        exposes: [
            e.illuminance_lux(), e.presence(),
            e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1),
            e.numeric('distance', ea.STATE).withValueMin(0).withValueMax(10)
                .withDescription('target distance').withValueStep(0.01).withUnit('m'),
            e.numeric('fading_time', ea.STATE_SET).withValueMax(1500).withValueMin(5).withValueStep(5).withUnit('s')
                .withDescription('presence timeout'),
            e.numeric('far_detection', ea.SET).withValueMin(0).withValueMax(9.5)
                .withDescription('maximum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('near_detection', ea.SET).withValueMin(0).withValueMax(9.5)
                .withDescription('minimum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s')
                .withDescription('detection delay'),
        ],
        meta: {
            tuyaDatapoints: [
                [105, 'presence', tuya.valueConverter.trueFalse1],
                [104, 'illuminance_lux', tuya.valueConverter.raw],
                [106, 'radar_sensitivity', tuya.valueConverter.raw],
                [109, 'distance', tuya.valueConverter.divideBy100],
                [110, 'fading_time', tuya.valueConverter.divideBy10],
                [107, 'far_detection', tuya.valueConverter.divideBy100],
                [108, 'near_detection', tuya.valueConverter.divideBy100],
                [111, 'detection_delay', tuya.valueConverter.divideBy10],
            ]
        }
    },
];

module.exports = definition;

image

image

@arough007
Copy link

Yes! This one works.
After using your code I could change the type to Motion via the entities settings in Home Assistant and then use it in the built-in motion-activated light blueprint.

Thanks very much!

@Almaz7791
Copy link

The presence sensor is incorrect in that config, it exposes the entity as a text based enum rather than an actual presence binary sensor.. I updated my converter so it is as follows which is working perfect for me:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const tzDatapoints = {
    ...tuya.tz.datapoints,
    key: [...tuya.tz.datapoints.key,  'far_detection', 'near_detection', ]
}

const definition = [
    {
        fingerprint: tuya.fingerprint('TS0601', ['_TZE204_e5m9c5hl']),
        model: 'WZ-M100-Z',
        vendor: 'Wenzhi',
        description: 'Human presence sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tzDatapoints],
        onEvent: tuya.onEventSetTime,
        configure: tuya.configureMagicPacket,
        exposes: [
            e.illuminance_lux(), e.presence(),
            e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1),
            e.numeric('distance', ea.STATE).withValueMin(0).withValueMax(10)
                .withDescription('target distance').withValueStep(0.01).withUnit('m'),
            e.numeric('fading_time', ea.STATE_SET).withValueMax(1500).withValueMin(5).withValueStep(5).withUnit('s')
                .withDescription('presence timeout'),
            e.numeric('far_detection', ea.SET).withValueMin(0).withValueMax(9.5)
                .withDescription('maximum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('near_detection', ea.SET).withValueMin(0).withValueMax(9.5)
                .withDescription('minimum detection range').withValueStep(0.1).withUnit('m'),
            e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1).withUnit('s')
                .withDescription('detection delay'),
        ],
        meta: {
            tuyaDatapoints: [
                [105, 'presence', tuya.valueConverter.trueFalse1],
                [104, 'illuminance_lux', tuya.valueConverter.raw],
                [106, 'radar_sensitivity', tuya.valueConverter.raw],
                [109, 'distance', tuya.valueConverter.divideBy100],
                [110, 'fading_time', tuya.valueConverter.divideBy10],
                [107, 'far_detection', tuya.valueConverter.divideBy100],
                [108, 'near_detection', tuya.valueConverter.divideBy100],
                [111, 'detection_delay', tuya.valueConverter.divideBy10],
            ]
        }
    },
];

module.exports = definition;

image

image

After replacing the external converter specified by pantherale0, everything worked.
Many thanks to pantherale0

@nortuzar
Copy link

Had the exact same problem with the TS0601, manufacturer _TZE204_e5m9c5hl, with the code from @Almaz7791 I was able to add it. At this time I would hope this was already included officially, do we need to open a ticket for this?
Thanks to all the people how help on this thread!

@Vladyno
Copy link

Vladyno commented Dec 2, 2023

Hi @OakfieldDrive ,

Please can you put your code for "_TZE204_mtoaryre" here. Thanks

@charlnm
Copy link

charlnm commented Dec 6, 2023

I've just got my TS0601 Human Presence Sensor, and tried to pair it.. Looks like it's a different ID to the above:

warn 2023-09-25 12:21:22: Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_e5m9c5hl'

Is this a variation of the one above? Do I need to raise a new request for specific support of this variation?

It appears to be a 5.8GHZ mmWave / Zigbee / Wall mount version

Hi, did you finally get this to work? Got a few of this last week and struggling to get them to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests