tinytuya
tinytuya copied to clipboard
DPS query code present in mapping from devices.json but not returned by tinytuya server /device/<DeviceID>
Hi Jason,
I have a problem with this hardware (Open DIN switch) and tinytuta server https://www.amazon.fr/gp/product/B09FPD3LMZ/
From devices.json : "category": "dlq", "product_name": "breaker", "product_id": "hz2o2tnezttmmx15", "biz_type": 18, "model": "ZC01W",
Device version as returned by tinytuya server command /device/<deviceID> is 3.3
The problem : DPS 6 code "phase_a" is present in mapping but not returned by tinytuya server /status/<deviceID> command This DPS contains Voltage, Current and Load encoded in a raw bitmap. The only way I found to access this DPS 6 code "phase_a" i is python code like :
d = tinytuya.OutletDevice(PLUGID, PLUGIP, PLUGKEY) d.set_version(PLUGVERS) data = d.turn_on() print('Received Payload: %r' % data)
==> How can I access this DPS 6 code "phase_a" from a tinytuya server ?
Thanks for help
Jean-Régis
Hi @JRB202 - you are right, the server I rather opinionated about which devices it supports. We need an abstraction API to make it easier to mange these less standard devices. I'll leave this issue open as an enhancement to add something, more low level, for these types.
Thanks for answer Keep me informed about next progress on this subject
I won't have time to work on this anytime soon, so you or anyone in the community are free to try to update the code and submit a PR. 😁