Add support for v3.2 protocol
See original GitHub issueBonjour,
J’obtiens cette erreur au demarrage de gladys:
TypeError: Cannot read property '1' of undefined 0|gladys | at _send.then.data (/home/pi/gladys/api/hooks/tuya/node_modules/tuyapi/index.js:123:41) 0|gladys | at <anonymous> 0|gladys | at process._tickDomainCallback (internal/process/next_tick.js:228:7)
et des que j’actionne le device:
0|gladys | (node:18902) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property '1' of undefined 0|gladys | Tuya - Error, undefined device! 0|gladys | Sending 500 ("Server Error") response: 0|gladys | Error: find() timed out. Is the device powered on and the ID or IP correct? 0|gladys | at pTimeout (/home/pi/gladys/api/hooks/tuya/node_modules/tuyapi/index.js:593:19) 0|gladys | at Timeout.setTimeout [as _onTimeout] (/home/pi/gladys/api/hooks/tuya/node_modules/p-timeout/index.js:20:13) 0|gladys | at ontimeout (timers.js:475:11) 0|gladys | at tryOnTimeout (timers.js:310:5) 0|gladys | at Timer.listOnTimeout (timers.js:270:5) 0|gladys | Server Error: 0|gladys |
ligne 123 de tuyapi/index.js:
resolve(data.dps['1']);
J’utilise un smart switch: SCW NF101
avec wireshark, je recupere:
ip":"192.168.1.xx","gwId":"bfx9268f215ecx78cdkpiv","active":2,"ablilty":0,"encrypt":true,"productKey":"zWxOK04ovOjw0Pxw","version":"3.2"}.B0
Mes identifinats sont de cette forme:
[ { id: 'bfx9268f215ecx78cdkpiv', key: 'b6a93451d8f07ga2' } ]
des idees?
Issue Analytics
- State:
- Created 4 years ago
- Comments:65 (13 by maintainers)
Top GitHub Comments
Hm … ok, but what I saw is that they just had kind of a clone of tinytuya lib in their files … and yes without 3.2 and 3.4 support … but tuyapi is not supported … So in fact they need to update the python stuff
Yes, as expected, thank you. Sofor me this would be “kind of fixed” 😃
I will bring this together with the protocol 3.4 changes as a PR