tinytuya icon indicating copy to clipboard operation
tinytuya copied to clipboard

DPS query code present in mapping from devices.json but not returned by tinytuya server /device/<DeviceID>

Open JRB202 opened this issue 1 year ago • 3 comments

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

JRB202 avatar Dec 08 '23 11:12 JRB202

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.

jasonacox avatar Dec 09 '23 05:12 jasonacox

Thanks for answer Keep me informed about next progress on this subject

JRB202 avatar Dec 16 '23 18:12 JRB202

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. 😁

jasonacox avatar Dec 17 '23 15:12 jasonacox