-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Labels
tuya_deviceSupport for specific Tuya DevicesSupport for specific Tuya Devices
Description
Hi,
I'm trying to get temp, humidity out of a ZY-TH02 sensor locally, It's correctly configured with the smart app, I've got the localkey,
but I'm not able to communicate with the sensor:
- It broadcasts the "discovery" UDP packet for some time when I power it up (by placing the batteries) and then go idle.
Unknown v3.4 Device Product ID = x3o8epevyeo3z3oa [Valid Broadcast]:
Address = 192.168.0.110 Device ID = bf76b1b98633be00c0zre6 (len:22) Local Key = Version = 3.4 Type = default, MAC =
No Stats for 192.168.0.110: DEVICE KEY required to poll for status
- During that time I try to get the status with:
while(True):
d = tinytuya.OutletDevice('bf76b1b98633be00c0zre6', '192.168.0.110', 'xxx')
d.set_version(3.4)
data = d.status()
print(data)
data = d.status()
print (data)
At the first round it get "json obj data unvalid" and switch to device22:
DEBUG:decrypted 3.x payload=b'json obj data unvalid'
DEBUG:payload type = <class 'bytes'>
DEBUG:'data unvalid' error detected: switching to dev_type 'device22'
The next rounds it keeps timeouting waiting for replies:
DEBUG:final payload: b'3.4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00{"devId":"bf76b1b98633be00c0zre6","uid":"bf76b1b98633be00c0zre6","t":"1738028383","dps":{"1":null}}'
DEBUG:payload encrypted=b'000055aa000000060000000d000000a4e4c324393ba5b22ca63886763b3a7abfbd19a19f393870e47b686b2ccc5ab30ea373a7ac56258c6082d62d9ad46aa31106bae1c08d35739d35dde516429a204d06d0497c253bcb5f2f5134e6b0ca172a3828b10cceaee16823907cacfcf42f8f897a3124d6205d97887fa653d453e4255d965acdfccaf6314d1221e44cd7737d303036811af30f966af166d7dfb9dcd1a8ecccb18cbac1cf6064567545d962f40000aa55'
DEBUG:Timeout in _send_receive() - retry 1 / 5
Also it seems like that kind of device have been successfully used with LocalTuya here.
Do I miss anything here? Does somebody got any success with those devices?
Best Regards,
Metadata
Metadata
Assignees
Labels
tuya_deviceSupport for specific Tuya DevicesSupport for specific Tuya Devices