make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.23k stars 490 forks source link

Request support for Human presence sensor Tuya ZG-205W #1195

Closed jnasserifar closed 10 months ago

jnasserifar commented 11 months ago

Could You please add the followingg device to the support of Tuya_local?

Intelligent Human Detection Sensor, Siren Alarm, Millimeter Wave Radar Motion Sensor, Lighting Monitoring, Human Motion Detection and Static Presence, Remote Monitoring

Product details:

"model": "ZG-205W", "name": "Human presence sensor", "product_id": "qbapy7r4deyp6zbx", "product_name": "中冠-人体存在传感器",

DPS details:

  {

"result": { "properties": [ { "code": "presence_state", "custom_name": "", "dp_id": 1, "time": 1697743661756, "value": "none" }, { "code": "sensitivity", "custom_name": "", "dp_id": 2, "time": 1695744204530, "value": 8 }, { "code": "near_detection", "custom_name": "", "dp_id": 3, "time": 1695744204282, "value": 900 }, { "code": "far_detection", "custom_name": "", "dp_id": 4, "time": 1695744205117, "value": 600 }, { "code": " ", "custom_name": "", "dp_id": 101, "time": 1697743230118, "value": 865 }, { "code": "sensitivity_cz", "custom_name": "", "dp_id": 102, "time": 1695744205539, "value": 8 }, { "code": "led_onoff", "custom_name": "", "dp_id": 103, "time": 1695744203451, "value": true }, { "code": "mode", "custom_name": "", "dp_id": 104, "time": 1695744203275, "value": "disarm" }, { "code": "wd_detection", "custom_name": "", "dp_id": 105, "time": 1695744204843, "value": 600 }, { "code": "sensitivity_wd", "custom_name": "", "dp_id": 106, "time": 1695744204871, "value": 8 }, { "code": "alarm_volume", "custom_name": "", "dp_id": 107, "time": 1695744203697, "value": "low" }, { "code": "pir_delay", "custom_name": "", "dp_id": 108, "time": 1695744204129, "value": 60 }, { "code": "alarm_time", "custom_name": "", "dp_id": 109, "time": 1695744203858, "value": 2 }, { "code": "mov_min_detection", "custom_name": "", "dp_id": 110, "time": 1695744206898, "value": 0 }, { "code": "micro_min_detection", "custom_name": "", "dp_id": 111, "time": 1695744207049, "value": 0 }, { "code": "bre_min_detection", "custom_name": "", "dp_id": 112, "time": 1695744207293, "value": 0 }, { "code": "study_timer", "custom_name": "", "dp_id": 113, "time": 1695744205790, "value": 300 }, { "code": "start_study", "custom_name": "", "dp_id": 114, "time": 1695744206038, "value": false }, { "code": "reset_setting", "custom_name": "", "dp_id": 115, "time": 1694114711528, "value": false }, { "code": "mov_status", "custom_name": "", "dp_id": 116, "time": 1697743662079, "value": "none" }, { "code": "small_mov_start", "custom_name": "", "dp_id": 117, "time": 1695744206204, "value": false }, { "code": "breathe_start", "custom_name": "", "dp_id": 118, "time": 1695744206452, "value": false }, { "code": "false_alarm", "custom_name": "", "dp_id": 119, "time": 1695744206472, "value": 1 }, { "code": "false_breath", "custom_name": "", "dp_id": 120, "time": 1695744206638, "value": false } ] }, "success": true, "t": 1697743671534, "tid": "981a26b06eb511ee88d87e68e426c0a4"

Screenshot from a Zigbee version: image

blakadder commented 11 months ago

already existst as custom_components/tuya_local/devices/zg205w_mmWave_presence_sensor.yaml

make-all commented 11 months ago

I think there were both Wifi and Zigbee versions of this sensor, and the Wifi version had an option to be powered from USB, or by battery. When the Wifi version is powered by battery it generally won't work for local use, only cloud.

jnasserifar commented 11 months ago

when I add the device i get the curtain device loratap_curtain_switch:

2023-10-19 17:26:34.266 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches loratap_curtain_switch with quality of 33%. DPS: {"updated_at": 1697761593.1697657, "1": "none", "101": 42, "116": "none"} image

blakadder commented 11 months ago

whats the link to the device?

jnasserifar commented 11 months ago

https://vi.aliexpress.com/item/1005005780858603.html?spm=a2g0o.productlist.main.3.f18e416bpphFv5&algo_pvid=48535c43-da62-4979-8bed-3a9682268ffb&algo_exp_id=48535c43-da62-4979-8bed-3a9682268ffb-1&pdp_npi=4%40dis%21CAD%2149.77%2125.38%21%21%2135.45%21%21%402101ec1f16978172083172014e1870%2112000035215544432%21sea%21CA%213911176806%21&curPageLogUid=apCsNA7xZovW

blakadder commented 11 months ago

you've linked 3 devices. i just tried readding my square one on a fresh HA instance and it was recongnised as the only device

MaximeNagel commented 11 months ago

Yes I can confirm it's the same product as mine. I check the product id given and the one I have on the tuya iot plateform. (mine is a wifi version) I have a strange behavior recently. It seems that the product do not send all it's DPI if they didn't change recently. I have also open a discussion about that because it break the config part of the device.

blakadder commented 11 months ago

I think it's best to split this into two devices if it's causing issues