Module pour périphériques Tuya et/ou Smart Life

Coucou @Pti_Nico

On avance je sens, mais ça ne fonctionne toujours pas pour moi ;o)
Donc, re testé avec la branche develop, j’ai maintenant ces logs qui en ressortent :

2019-03-25-09:26:40 0|gladys | Tuya - Device: {“id”:“03200172************”,“key”:“537bfc71f1******”,“name”:“Plug2”,“type”:“plug”}
2019-03-25-09:26:40 0|gladys | Tuya - TuyaDevice: {“domain”:null,"_events":{},"_eventsCount":0,“device”:{“id”:“03200172************”, “key”:“537bfc71f1******”,“version”:3.1,“cipher”:{“cipher”:{“algorithm”:{“name”:“AES-ECB”,“mode”:{“name”:“ECB”,“cipher”:{},“blockSize”:16,"_ints" :4,"_inBlock":[null,null,null,null],"_outBlock":[null,null,null,null]},"_init":true,"_w":[892548962,1717778225,1714513461,1717973045,121086289,1 632933472,124121173,1627635808,2123198910,534374366,414979979,2042615787,1921226760,1834647510,1978034269,207208374,-1316235530,-590239456,-1455 963779,-1519485237,1048103408,-492216112,1268687277,-286204058,-1830356264,1884264968,1003568037,-719199037,797955291,1606438611,1678865782,-132 2217035,-1425145581,-187805760,-1864418634,569355011,1869380334,-1683868370,192745368,714253467,371551755,-1920509147,-2030414659,-1402408922]}, “mode”:{“name”:“ECB”,“cipher”:{},“blockSize”:16,"_ints":4,"_inBlock":[null,null,null,null],"_outBlock":[null,null,null,null]},“blockSize”:16,"_f inish":false,"_input":null,“output”:null,"_decrypt":false},“decipher”:{“algorithm”:{“name”:“AES-ECB”,“mode”:{“name”:“ECB”,“cipher”:{},“blockSize “:16,”_ints”:4,"_inBlock":[null,null,null,null],"_outBlock":[null,null,null,null]},"_init":true,"_w":[371551755,-1402408922,-2030414659,-1920509 147,2117951114,-1677129963,1602781876,1320723568,471647092,-1014921823,288368324,814086906,366128067,-760110235,565566526,748239246,301389156,-2 17809061,221046192,961253965,-373432117,-30893333,879196157,683493161,-2011899043,-900731626,484061396,-1056921630,1256940194,-694821438,-572877 002,1226079423,2019888942,189745908,-1798378615,67051037,1394175716,-1618894467,-1758333548,2073694515,892548962,1717973045,1714513461,171777822 5]},“mode”:{“name”:“ECB”,“cipher”:{},“blockSize”:16,"_ints":4,"_inBlock":[null,null,null,null],"_outBlock":[null,null,null,null]},“blockSize”:16 ,"_finish":false,"_input":null,“output”:null,"_decrypt":true},“version”:3.1},“port”:6668,“gwID”:“03200172************”},“foundDevices”:[],"_conn ected":false,"_responseTimeout":5,"_connectTimeout":5,"_pingPongPeriod":10}
2019-03-25-09:26:50 0|gladys | Tuya - Error, undefined device!
2019-03-25-09:26:50 0|gladys | Sending 500 (“Server Error”) response:
2019-03-25-09:26:50 0|gladys | Error: find() timed out. Is the device powered on and the ID or IP correct?
2019-03-25-09:26:50 0|gladys | at timeout (/home/pi/gladys/api/hooks/tuya/node_modules/tuyapi/index.js:614:13)
2019-03-25-09:26:50 0|gladys | at Timeout.setTimeout [as _onTimeout] (/home/pi/gladys/api/hooks/tuya/node_modules/p-timeout/index.js:19:13)
2019-03-25-09:26:50 0|gladys | at ontimeout (timers.js:475:11)
2019-03-25-09:26:50 0|gladys | at tryOnTimeout (timers.js:310:5)
2019-03-25-09:26:50 0|gladys | at Timer.listOnTimeout (timers.js:270:5)
2019-03-25-09:26:50 0|gladys | Server Error:
2019-03-25-09:26:50 0|gladys | Error: find() timed out. Is the device powered on and the ID or IP correct?
2019-03-25-09:26:50 0|gladys | at timeout (/home/pi/gladys/api/hooks/tuya/node_modules/tuyapi/index.js:614:13)
2019-03-25-09:26:50 0|gladys | at Timeout.setTimeout [as _onTimeout] (/home/pi/gladys/api/hooks/tuya/node_modules/p-timeout/index.js:19:13)
2019-03-25-09:26:50 0|gladys | at ontimeout (timers.js:475:11)
2019-03-25-09:26:50 0|gladys | at tryOnTimeout (timers.js:310:5)
2019-03-25-09:26:50 0|gladys | at Timer.listOnTimeout (timers.js:270:5)

ps : Dans le doute, j’ai testé un coup avec le port 6668 ouvert sur ma box, un coup sans. Résultat identique.

Apparemment, il y a une issue en cours qui correspond à ton problème :

Peut-être pourrais tu y apporter ta pierre ?

Avis aux possesseurs de périphériques compatibles Tuya (voir liste sur mon repo).
Une nouvelle version du module est présente sur mon repo :

Pour le moment seul la partie “curtain” (volet roulant) est active, car c’est le seul périphériques que j’ai chez moi :smile:
Si vous avez d’autres types de périphériques et que vous voulez participer au développement du module, tous les testeurs sont les bienvenus :wink: