Page 3 sur 4
Re: Qui connait OxaOxe
Publié : 23 sept. 2019, 22:41
par papoo
j'ai acheté deux prises simple
l'une fonctionne correctement avec l'appli
l'autre s'allume et s’éteint sans aucune possibilité de réinitialisation
Re: Qui connait OxaOxe
Publié : 23 sept. 2019, 22:44
par xavierlp
Essaie donc deja avec la première prise
Re: Qui connait OxaOxe
Publié : 23 sept. 2019, 23:05
par papoo
bon j'ai récupéré la clé mais le plugin ne fonctionne pas pour moi non plus
2019-09-23 23:05:18.991 Error: (tuya) 'onConnect' failed 'ValueError':'AES key must be either 16, 24, or 32 bytes long'.
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 530 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onConnect
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 400 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onConnect
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 271 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function __command_to_execute
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 228 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function generate_payload
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 64 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function encrypt
2019-09-23 23:05:18.992 Error: (tuya) ----> Line 94 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function new
2019-09-23 23:05:18.992 Error: (tuya) ----> Line 59 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function __init__
2019-09-23 23:05:18.992 Error: (tuya) ----> Line 141 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/blockalgo.py', function __init__
2019-09-23 23:05:38.948 Error: (tuya) 'onHeartbeat' failed 'ValueError':'AES key must be either 16, 24, or 32 bytes long'.
2019-09-23 23:05:38.948 Error: (tuya) ----> Line 546 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onHeartbeat
2019-09-23 23:05:38.948 Error: (tuya) ----> Line 496 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onHeartbeat
2019-09-23 23:05:38.948 Error: (tuya) ----> Line 271 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function __command_to_execute
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 228 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function generate_payload
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 64 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function encrypt
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 94 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function new
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 59 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function __init__
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 141 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/blockalgo.py', function __init__
Re: Qui connait OxaOxe
Publié : 23 sept. 2019, 23:57
par xavierlp
Je viens ENFIN de tout faire fonctionner de mon côté !!!!
Re: Qui connait OxaOxe
Publié : 23 sept. 2019, 23:57
par xavierlp
papoo a écrit : 23 sept. 2019, 23:05
bon j'ai récupéré la clé mais le plugin ne fonctionne pas pour moi non plus
2019-09-23 23:05:18.991 Error: (tuya) 'onConnect' failed 'ValueError':'AES key must be either 16, 24, or 32 bytes long'.
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 530 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onConnect
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 400 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onConnect
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 271 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function __command_to_execute
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 228 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function generate_payload
2019-09-23 23:05:18.991 Error: (tuya) ----> Line 64 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function encrypt
2019-09-23 23:05:18.992 Error: (tuya) ----> Line 94 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function new
2019-09-23 23:05:18.992 Error: (tuya) ----> Line 59 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function __init__
2019-09-23 23:05:18.992 Error: (tuya) ----> Line 141 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/blockalgo.py', function __init__
2019-09-23 23:05:38.948 Error: (tuya) 'onHeartbeat' failed 'ValueError':'AES key must be either 16, 24, or 32 bytes long'.
2019-09-23 23:05:38.948 Error: (tuya) ----> Line 546 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onHeartbeat
2019-09-23 23:05:38.948 Error: (tuya) ----> Line 496 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onHeartbeat
2019-09-23 23:05:38.948 Error: (tuya) ----> Line 271 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function __command_to_execute
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 228 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function generate_payload
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 64 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py', function encrypt
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 94 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function new
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 59 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/AES.py', function __init__
2019-09-23 23:05:38.949 Error: (tuya) ----> Line 141 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/Crypto/Cipher/blockalgo.py', function __init__
Tu as bien ajouté le lien vers crypto lors du setup ?
Re: Qui connait OxaOxe
Publié : 24 sept. 2019, 20:23
par papoo
Oui mais impossible à désinstaller pour voir si une réinstallation règlerait le pb
Re: Qui connait OxaOxe
Publié : 24 sept. 2019, 22:01
par papoo
j'ai refais l'install complète de la bibliothèque pycrypto via la commande
sudo pip3 install -I pycrypto
et refais ensuite toute la procédure
j'ai toujours l'erreur suivante
Code : Tout sélectionner
2019-09-24 22:01:11.270 Error: (tuya) ----> Line 534 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onMessage
2019-09-24 22:01:11.270 Error: (tuya) ----> Line 442 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onMessage
le on/off fonctionne mais pas la remontée des infos de conso
Re: Qui connait OxaOxe
Publié : 25 sept. 2019, 11:00
par xavierlp
Bonjour
J'ai eu au départ exactement les mêmes messages.
Ce que j'ai vérifier dans le fichier __init__.py est si la gestion des versions 3.1 et3.3 est faite.
coté ligne 221
print ('version' , self.version)
if self.version == 3.3:
self.cipher = AESCipher(self.local_key) # expect to connect and then disconnect to set new
json_payload = self.cipher.encrypt(json_payload, False)
self.cipher = None
if command != STATUS:
Sinon il faut faire un git sur le fork de sincze.
Ensuite s'assurer que l'application est bien stoppée et a chaque modif supprimer les objets tuya créé par le plugin, le desactiver, faire un
sudo service domoticz.sh restart
puis reactiver le module avec le debug à 1
Verifier dans les logs que tu peux lire
b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\x9d\x00\x00\x00\x00{"devId":"55142707bcddc295f96a","dps":{"1":false,"2":false,"9":0,"10":0,"18":0,"19":0,"20":2278,"21":1,"22":609,"23":27297,"24":15519,"25":1340}}\xc5_\xed\xaa\x00\x00\xaaU'
apres le terme dps tu as toutes les infos a saisir dans les parametres du plugin.
Re: Qui connait OxaOxe
Publié : 25 sept. 2019, 18:17
par papoo
print ('version', self.version) ne fonctionne pas (aucun affichage dans les logs)
quand je mets autre chose que 1 dans le champs dps ça ne fonctionne pas, j'ai mis
Code : Tout sélectionner
"1":true,"9":0,"18":0,"19":0,"20":2402,"21":1,"22":616,"23":30176,"24":16915,"25":1230
pourrais tu stp me faire une capture d'ecran de ce que tu mets dans le champs dps stp?
mes logs avec données dps
Code : Tout sélectionner
2019-09-25 18:14:30.802 (Tuya) Pushing 'onMessageCallback' on to queue
2019-09-25 18:14:30.802 (Tuya) Processing 'onMessageCallback' message
2019-09-25 18:14:30.802 (Tuya) Calling message handler 'onMessage'.
2019-09-25 18:14:30.802 (Tuya) onMessage called: 192.168.1.12:6668 b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\x8b\x00\x00\x00\x00{"devId":"26160201b4e62d611a57","dps":{"1":true,"9":0,"18":0,"19":0,"20":2402,"21":1,"22":616,"23":30176,"24":16915,"25":1230}}\x04\xa0\x1c\x14\x00\x00\xaaU'
2019-09-25 18:14:30.802 Error: (Tuya) 'onMessage' failed 'KeyError'.
2019-09-25 18:14:30.802 Error: (Tuya) ----> Line 534 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onMessage
2019-09-25 18:14:30.802 Error: (Tuya) ----> Line 442 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onMessage
Re: Qui connait OxaOxe
Publié : 25 sept. 2019, 21:18
par xavierlp
J'ai resolu les messages d'erreur en redemarrant domoticz après avoir fermé les applications android et iphone.
pour ton message ce que je peux lire
"1":true,"9":0,"18":0,"19":0,"20":2402,"21":1,"22":616,"23":30176,"24":16915,"25":1230
tu as une prise allumée car 1 est à true
visiblement avec pas de consommation electrique derriere
ton voltage est de 240,.2 via 20
18 c'est amperage ici 0
19 c'est la conso

- capure.png (24.03 Kio) Consulté 3073 fois
Dans mon cas la prise est doucle donc j'ai 1;2 toi tu dois mettre 1 en DPS et rien dans group