Open vfontes opened 5 months ago
I think I may have found why it doesn't work: this device uses Tuya local protocol version 3.4
:
[5/31/2024, 2:02:25 PM] [homebridge-tuya-platform-local] Discovered Escritorio Occupancy-local (eb9b1d79e56183587aaded) identified as OccupancySensor (3.4)
[Tuya] Changing ping gap for Escritorio Occupancy-local to 9s
[Tuya DEBUG] reconnect called for Escritorio Occupancy-local
[5/31/2024, 2:02:25 PM] [homebridge-tuya-platform-local] Connected to Escritorio Occupancy-local
[Tuya] Sending first query to Escritorio Occupancy-local (3.4)
[Tuya] Disconnected from Escritorio Occupancy-local
[Tuya] Closed connection with Escritorio Occupancy-local
[TuyaDiscovery] UDP from 192.168.1.21:6667 0x000055aa...0x0000aa55
Another project called localtuya has implemented 3.4 support, this may be useful: https://github.com/rospogrigio/localtuya/blob/d2fa4dc2a0306a9721c5660f163a3bf84b075f28/custom_components/localtuya/pytuya/__init__.py#L885
Oh wow, I got it working almost fully! Presence is correctly detected, but illuminance stays at 0,0001.
This is what I did:
TuyaAccessory.js
with https://github.com/iRayanKhan/homebridge-tuya/blob/main/lib/TuyaAccessory.jsI'm no developer, but I'll give it a shot and try to create a pull request.
Describe your device ZG-205W is a human presence sensor, on the
hps
category.It's very similar in functionality to the ZY-M100, but unfortunately the ZG-205W doesn't work with this plugin.
https://www.aliexpress.com/item/1005005951586853.html?spm=a2g0o.order_list.order_list_main.124.4d191802iS9vfz
Partial Support? No
Device Schema Here's all the data I gathered from the iot.tuya.com API that I believe is relevant; feel free to ask me for anything else!
Get the specifications and properties of the device:
Get the instruction set of the device:
Get the status of a single device:
Query Things Data Model
Query Device Details
Query Properties: