make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.01k stars 405 forks source link

ZY-M100-WIFI24G - not recognized as ZY-M100 in tuya local #1913

Open Motya-HA opened 2 weeks ago

Motya-HA commented 2 weeks ago

This form is for reporting bugs. If you have encountered a bug, you should generally have some log messages or device diagnostics to show something is going wrong. If your problem is more of a question or a request for help, then Discussions is probably a more suitable venue.

Describe the bug For some reason Tuya presence sensor ZY-M100-WIFI is not recognized as such during new device addition

To Reproduce During "add device" process, ZY-M100-WIFI24G presence sensor device has following options:

Screenshot 2024-05-12 at 4 19 57 PM

Expected behavior Expected device been recognized as ZY-M100_WIFI

Additional context Parameters results from Tuya IoT platform

{ "result": [ { "active_time": 1715474703, "bind_space_id": "166925674", "category": "hps", "create_time": 1715474703, "custom_name": "Laundry Entry Presence Sensor ", "icon": "smart/icon/ay15431316572284AcPZ/bc0c8e066c89476de379df5cf1538fee.png", "id": "ebed371ad78c7473e84uu4", "ip": "xxxxxxxxxx", "is_online": true, "lat": "", "local_key": "xxxxxxxxxxxx", "lon": "", "model": "1.0.1", "name": "ZY-M100-WIFI24G存在传感器", "product_id": "4cjzlliucdjaanvl", "product_name": "ZY-M100-WIFI24G存在传感器", "sub": false, "time_zone": "-07:00", "update_time": 1715474751, "uuid": "11a9664989c658a4" } ], "success": true, "t": 1715555227412, "tid": "5aafb1a110b411efa6ed16994efa91b4" }

If the bug involves a device, then please include device diagnostics from Settings / Devices & Services / Tuya Local (your device) / "1 device"

Please check if there are messages from Tuya Local in the Home Assistant log (Settings / System / Logs), and include those too.

If applicable, add screenshots to help explain your problem.

make-all commented 2 weeks ago

I cannot diagnose the issue without logs or diagnostics

Motya-HA commented 2 weeks ago

But I can't get logs or diagnostics if I can't add the device? What you would suggest to do?

Motya-HA commented 2 weeks ago

Ok Found something:

2024-05-12 15:29:07.365 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches yueqingcombo_yet848pc_curtain with quality of 33%. DPS: {"updated_at": 1715552943.5815408, "1": "none", "2": 4, "3": 150, "4": 300, "9": 27, "102": 6, "103": 1, "104": "nobody", "105": 20} 2024-05-12 15:29:07.365 WARNING (MainThread) [custom_components.tuya_local.config_flow] Report this to https://github.com/make-all/tuya-local/issues/

Motya-HA commented 2 weeks ago

this is another log:This error originated from a custom integration.

Logger: custom_components.tuya_local.config_flow Source: custom_components/tuya_local/config_flow.py:103 integration: Tuya Local (documentation, issues) First occurred: 3:29:07 PM (3 occurrences) Last logged: 4:19:37 PM

Report this to https://github.com/make-all/tuya-local/issues/

make-all commented 2 weeks ago

This device does not appear to be compatible with the existing config for a device with a similar name.

Please also provide the details of the dps mappings from iot.tuya.com (the QueryThingsDataModel API result for your device)

Motya-HA commented 2 weeks ago

{ "result": { "model": "{\"modelId\":\"f2pb7w\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":1,\"accessMode\":\"ro\",\"code\":\"presence_state\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-renxingyidong\",\"attribute\":\"1664\"},\"name\":\"感应状态\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"none\",\"presence\",\"move\"]}},{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"sensitivity\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1152\"},\"name\":\"运动灵敏度\",\"typeSpec\":{\"type\":\"value\",\"max\":10,\"min\":1,\"scale\":0,\"step\":1,\"unit\":\"\"}},{\"abilityId\":3,\"accessMode\":\"rw\",\"code\":\"near_detection\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-gongneng\",\"attribute\":\"1152\"},\"name\":\"最近检测距离\",\"typeSpec\":{\"type\":\"value\",\"max\":900,\"min\":150,\"scale\":2,\"step\":75,\"unit\":\"M\"}},{\"abilityId\":4,\"accessMode\":\"rw\",\"code\":\"far_detection\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-gongneng\",\"attribute\":\"1152\"},\"name\":\"最远检测距离\",\"typeSpec\":{\"type\":\"value\",\"max\":975,\"min\":150,\"scale\":2,\"step\":75,\"unit\":\"M\"}},{\"abilityId\":9,\"accessMode\":\"ro\",\"code\":\"target_dis_closest\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_direction\",\"attribute\":\"1152\"},\"name\":\"目标距离\",\"typeSpec\":{\"type\":\"value\",\"max\":100,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"M\"}},{\"abilityId\":102,\"accessMode\":\"rw\",\"code\":\"presence_sensitivity\",\"description\":\"\",\"name\":\"静止灵敏度\",\"typeSpec\":{\"type\":\"value\",\"max\":10,\"min\":1,\"scale\":0,\"step\":1,\"unit\":\"\"}},{\"abilityId\":103,\"accessMode\":\"ro\",\"code\":\"illuminance_value\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-liangdu\",\"attribute\":\"4096\"},\"name\":\"光照度\",\"typeSpec\":{\"type\":\"value\",\"max\":10000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"lux\"}},{\"abilityId\":104,\"accessMode\":\"ro\",\"code\":\"man_state\",\"description\":\"\",\"name\":\"有无人状态\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"nobody\",\"exist\"]}},{\"abilityId\":105,\"accessMode\":\"rw\",\"code\":\"delay_time\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time3\",\"attribute\":\"4096\"},\"name\":\"无人延迟时间\",\"typeSpec\":{\"type\":\"value\",\"max\":15000,\"min\":5,\"scale\":0,\"step\":1,\"unit\":\"S\"}}]}]}" }, "success": true, "t": 1715636215990, "tid": "eb9a50e6117011efa6a242e5904d8239" }

I hope this is what you need

Motya-HA commented 2 weeks ago

is anything still required from my side? I am just wondering what the next step will be

make-all commented 2 weeks ago

No, nothing further is currently required, but don't expect too quick a response, as the queue is currently long and I do not have a lot of time to work on this.