Pb prise aqara Zigbee chinoise plugin Xiaomihome

Non même pas ! :frowning:

Log Jeedom Test sur refresh et status-on mi plug Zigbee (Marche pas) :

[2021-04-26 18:16:57][DEBUG] : execute : action aquara refresh
[2021-04-26 18:16:57][DEBUG] : Envoi : {"apikey":"#API#","type":"aquara","model":"read","cmd":"refresh","dest":"192.168.1.XX","password":"#PASS#","sidG":"286c0785915c","sid":"158d000153e3e8"}
[2021-04-26 18:16:57.778][DEBUG] : Client connected to [127.0.0.1:33960]
[2021-04-26 18:16:57.779][DEBUG] : Message read from socket: b'{"apikey":"#API#","type":"aquara","model":"read","cmd":"refresh","dest":"192.168.1.XX","password":"#PASS#","sidG":"286c0785915c","sid":"158d000153e3e8"}'
[2021-04-26 18:16:57.779][DEBUG] : Client disconnected from [127.0.0.1:33960]
[2021-04-26 18:16:57.899][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 18:16:57.900][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-04-26 18:16:57.900][DEBUG] : SOCKET-READ------Refreshing : read
[2021-04-26 18:16:57.900][DEBUG] : executing {'apikey': '#API#', 'type': 'aquara', 'model': 'read', 'cmd': 'refresh', 'dest': '192.168.1.XX', 'password': '#PASS#', 'sidG': '286c0785915c', 'sid': '158d000153e3e8'}
[2021-04-26 18:16:57.900][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 18:16:59][DEBUG] : execute : action aquara status-on
[2021-04-26 18:16:59][DEBUG] : Envoi : {"apikey":"#API#","type":"aquara","cmd":"send","dest":"192.168.1.XX","password":"#PASS#","model":"plug","sidG":"286c0785915c","sid":"158d000153e3e8","short_id":"12096","switch":"status","request":"on","vol":""}
[2021-04-26 18:16:59.826][DEBUG] : Client connected to [127.0.0.1:33962]
[2021-04-26 18:16:59.827][DEBUG] : Message read from socket: b'{"apikey":"#API#","type":"aquara","cmd":"send","dest":"192.168.1.XX","password":"#PASS#","model":"plug","sidG":"286c0785915c","sid":"158d000153e3e8","short_id":"12096","switch":"status","request":"on","vol":""}'
[2021-04-26 18:16:59.827][DEBUG] : Client disconnected from [127.0.0.1:33962]
[2021-04-26 18:17:00.007][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 18:17:00.008][DEBUG] : SOCKET-READ------Received command from jeedom : send
[2021-04-26 18:17:00.010][DEBUG] : SOCKET-READ------Executing action on : plug
[2021-04-26 18:17:00.012][DEBUG] : executing {'apikey': '#API#', 'type': 'aquara', 'cmd': 'send', 'dest': '192.168.1.XX', 'password': '#PASS#', 'model': 'plug', 'sidG': '286c0785915c', 'sid': '158d000153e3e8', 'short_id': '12096', 'switch': 'status', 'request': 'on', 'vol': ''}
[2021-04-26 18:17:00.014][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long

Log Jeedom Prod sur refresh et status-on mi plug zigbee (Marche) :

[2021-04-26 18:16:33][DEBUG] : execute : action aquara refresh
[2021-04-26 18:16:42][DEBUG] : execute : action aquara status-on
[2021-04-26 18:16:44][DEBUG] : execute : action aquara refresh

C’est un peu léger comme log non ? (Pourtant ca marche)

En tout cas ça semble mal parti pour les Debian x64 buster (Freebox_delta) :

copying src/cryptography/py.typed -> build/lib.linux-aarch64-3.7/cryptography
running build_ext
generating cffi module 'build/temp.linux-aarch64-3.7/_padding.c'
creating build/temp.linux-aarch64-3.7
generating cffi module 'build/temp.linux-aarch64-3.7/_openssl.c'
running build_rust
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation.html#rust
5) If you are experiencing issues with Rust for *this release only* you may
set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
=============================DEBUG ASSISTANCE=============================
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
This package requires Rust >=1.41.0.
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-a9b2lb9y/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tcmipf5j/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-a9b2lb9y/cryptography/
Invalid requirement: '_thread'
Traceback (most recent call last):

Visiblement pas encore pris en charge :
https://cryptography.io/en/latest/installation/#supported-platforms

Mais bon même avec une crypto v3, les erreurs étaient là… mais je ne vais pas pouvoir tester sur mon jeedom_delta du coup :frowning:

@Poumi, toi aussi tu testais sur une Delta ?

J’ai testé sur : debian-10.9.0-amd64-netinst

Pour ça que tu as encore une crypto v2 ! Tu n’as pas eu des erreurs avec l’installation des dep ?

Si, voila les log :

Non, sur un nuc installé avec l’iso Officielle.

Mais si le soucis est sur cryptography a l’installation des dépendances pour tout le monde, on avance au moins :grin:

Bon bin, je viens de me rendre compte, même après que la mise à jour se soit déroulé apparemment sans encombres, que ma gateway ne fonctionne plus aussi. Ça m’embête, surtout que je l’utilise souvent. Espérons qu’on puisse trouver une solution sans tout réinstaller.

Merci mais j’ai déjà fait un retour en arrière. est ce que je dois quand même appliquer cette commande.

La commande
pip3 list | grep cryptography
permet juste d’afficher la version du module python3 cryptography.

akenad :slight_smile:

merci, donc je pense avoir une vielle version.
cryptography 2.6.1

Idem en 2.6.1

Jeedom Prod (fonctionne) :

www-data  1842     1  3 19:50 ?        00:01:15 /usr/bin/python /var/www/html/plugins/xiaomihome/resources/xiaomihomed/xiaomihomed.py --loglevel debug --socketport 55019 --callback http://127.0.0.1:80/plugins/xiaomihome/core/php/jeeXiaomiHome.php --apikey #API# --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid

Jeedom Test (fonctionne pas) :

www-data  7222     1  2 17:38 ?        00:04:17 /usr/bin/python3 /var/www/html/plugins/xiaomihome/resources/xiaomihomed/xiaomihomed.py --loglevel debug --socketport 55019 --callback http://127.0.0.1:80/plugins/xiaomihome/core/php/jeeXiaomiHome.php --apikey #API# --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid

Comment faire pointer sur usr/bin/python et non usr/bin/python3 ?

1 « J'aime »

Je serait curieux de connaître les conf des personnes qui ont testé la bêta justement pour comparer leur version d’os, python, pip et crypto.
Et biensur s’ils avaient des devices qui actuellement bug…
S’ils pouvaient se manifester merci :wink:

2 « J'aime »

J’ai une VM qui fonctionne et une qui ne fonctionne pas on peut peu être comparer.

Jeedom Test (NOK) :

root@Jeedom3:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

root@Jeedom3:~# /usr/bin/python -V
Python 2.7.16

root@Jeedom3:~# /usr/bin/python3 -V
Python 3.7.3

root@Jeedom3:~# /usr/bin/pip -V
pip 18.1 from /usr/lib/python2.7/dist-packages/pip (python 2.7)

root@Jeedom3:~# pip3 list | grep cryptography
cryptography        2.6.1

root@Jeedom3:~# ps -ef | grep xiaomihomed
www-data  7222     1  2 17:38 ?        00:05:04 /usr/bin/python3 /var/www/html/plugins/xiaomihome/resources/xiaomihomed/xiaomihomed.py --loglevel debug --socketport 55019 --callback http://127.0.0.1:80/plugins/xiaomihome/core/php/jeeXiaomiHome.php --apikey #API# --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid
root     13877 12919  0 20:56 pts/0    00:00:00 grep xiaomihomed

Jeedom Prod (OK) :

root@Jeedom2:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

root@Jeedom2:~# /usr/bin/python -V
Python 2.7.16

root@Jeedom2:~# /usr/bin/python3 -V
Python 3.7.3

root@Jeedom2:~# /usr/bin/pip -V
pip 18.1 from /usr/lib/python2.7/dist-packages/pip (python 2.7)

root@Jeedom2:~# pip3 list | grep cryptography
cryptography        2.6.1

root@Jeedom2:~# ps -ef | grep xiaomihomed
www-data  1842     1  3 19:50 ?        00:02:22 /usr/bin/python /var/www/html/plugins/xiaomihome/resources/xiaomihomed/xiaomihomed.py --loglevel debug --socketport 55019 --callback http://127.0.0.1:80/plugins/xiaomihome/core/php/jeeXiaomiHome.php --apikey #API# --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid
root     14793 29786  0 20:55 pts/0    00:00:00 grep xiaomihomed

Merci @blusy38 pour ta solution alternative, au top! Je test ce soir.
Mis à part ça, j’avoue être quand même légèrement agacé par certains dev de plugins. Pas de MAJ changelog ou de doc, des réponses parfois froides, a la limite de l’ignorance, voir d’être méprisant. Pour des plugins qui ont rapporté de l’argent au dev et qu’on a payé par reconnaissance en partie et pour le travail effectué, c’est vraiment pas cool… Bref, ce n’est ni le lieu ni le moment, mais, il fallait que je le place…

5 « J'aime »

j’ai testé le plugin-xiaomihome en beta le 3 février, uniquemement avec 2 gateway Xiaomi wifi/Zigbee et 13 capteurs Zigbee d’ouverture, l’ouverture et la fermeture des capteurs remontaient.

  • Version OS (page santé Jeedom) : Linux jeedom9 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux [10.7]
  • python3 --version : 3.7.3
  • pip3 --version : pip 20.2.4 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
  • pip3 list | grep cryptography : 3.4.6

akenad :slight_smile:

Cool, du coup tu as une idée du problème ?
Pourquoi celui qui fonctionne pointe dur python et celui qui ne fonctionne pas sur python3 ?