Replies: 1 comment 3 replies
-
|
Hi @balocon , sorry for the late reply. Can you post a debug output of a successful child Although that response looks like it's from a v3.3 device, I'm wondering if it needs a v3.4 payload... |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have some TRVs (boiler valves) connected to a zeegbe gateway. I also have some other tuya smart devices but my problem is about child devices when I try to send them a command.
I have a dict with info of all devices (dev_id, cid, local_key, address, ... )
To conect with them I use this:
d = tinytuya.OutletDevice(dev_id=devMetaData['dev_id'],
address=devMetaData['address'],
local_key=devMetaData['local_key'],
dev_type=devMetaData['dev_type'],
version=devMetaData['version'],
persist=devMetaData['persist'],
cid=devMetaData['cid'],
parent=_parent
)
_parent contains a parent OutletDevice Object if device is a child, or just None Object if device it is a parent level device.
.. and then I can read all type of devices, parent and also child using for example this:
d.status()
or
d.status()['dps'][str(_dps)]
But if I try to use this to change state of a valve:
d.set_value(str(_dps),_value,nwait)
only works with parent devices. When I send it to a child devices (using parameter parent=), it say this:
...
DEBUG:payload encrypted=b'000055aa000000010000000d00000097332e330000000000000000000000001eab37ac367b02eaebe96a2cb23709a3b42fe4b44ee23c19d9a215cbbb181d216fc8df9ba616fb1ff2363cebdd4a0fa64bbaeb0d5b6f406b3348f1752c2a578a4f37dd803cfcf372ff3f96368fe0c666e7b3d7f61993bfcec39f5d6aa2021052a97d5b792dcbc359001858935957f97ae240055663001e4c128d1259b536983912f5d30c0000aa55'
DEBUG:received data=b'000055aa000000010000000d0000002c00000001d1447f7526016154a39c8ec934b091757164df49bc8b6764362b2eab77ac32c8ca0b5e210000aa55'
DEBUG:received message=TuyaMessage(seqno=1, cmd=13, retcode=1, payload=b'\xd1D\x7fu&\x01aT\xa3\x9c\x8e\xc94\xb0\x91uqd\xdfI\xbc\x8bgd6+.\xabw\xac2\xc8', crc=3389742625, crc_good=True, prefix=21930, iv=None)
DEBUG:raw unpacked message = TuyaMessage(seqno=1, cmd=13, retcode=1, payload=b'\xd1D\x7fu&\x01aT\xa3\x9c\x8e\xc94\xb0\x91uqd\xdfI\xbc\x8bgd6+.\xabw\xac2\xc8', crc=3389742625, crc_good=True, prefix=21930, iv=None)
DEBUG:decode payload=b'\xd1D\x7fu&\x01aT\xa3\x9c\x8e\xc94\xb0\x91uqd\xdfI\xbc\x8bgd6+.\xabw\xac2\xc8'
DEBUG:decrypting=b'\xd1D\x7fu&\x01aT\xa3\x9c\x8e\xc94\xb0\x91uqd\xdfI\xbc\x8bgd6+.\xabw\xac2\xc8'
DEBUG:decrypted 3.x payload=b'data format error'
DEBUG:payload type = <class 'bytes'>
DEBUG:decoded results='data format error'
DEBUG:ERROR Invalid JSON Response from Device - 900 - payload: "data format error"
DEBUG:Recieved async update for wrong CID None while looking for CID xxxxmyOneChildDevicexxxx, trying again
....
Child devices has not IP address. I send the info to child (reporting its parent), but it seems like parent want respond but not translate the question correctly.
I am quite sure it is my fault, but need some help please.
Beta Was this translation helpful? Give feedback.
All reactions