Air Monitor CGS1: tuple index out of range

Salut

Pas d’affichage, voila plusieurs jours que je tourne en rond.

am1

J’ouvre un nouveau sujet vu que personne n’a réagi sur le topic déjà ouvert.
Voir ici

Merci!

Bonjour @rootard,

Il n’est pas aberrant que personne ne réagisse dans un topic ouvert et parlant d’un sujet autre que le tien (il s’agissait d’un retour sur la configuration d’un équipement mais pas d’un problème avec l’équipement).

Pour faire simple reprend les infos et ajoute les ici (c’est plus simple que les aller-retour entre topics et cela permettra de fermer le bon topic une fois la solution trouvée).

Et puis ensuite un peu de patience car peut-être que personne n’a déjà rencontré le problème.

Bonne journée

ok revoici donc mon problème: l’heure de dernière communication est bonne dans la santé xiaomihome mais rien ne remonte.

J’ai commencé par modifier le niveau de python pour en arriver la car ca plantait (Exception socket read).
J’ai ensuite suivi les instructions ici : modif co2 dans airmonitorb1.json mais je n’obtiens toujours pas de valeurs :grimacing:

Voila la log:


[2021-06-14 15:30:26][INFO] : Lancement démon xiaomihome : /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 Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-14 15:30:29.219][INFO] : Start xiaomihomed
[2021-06-14 15:30:29.220][INFO] : Log level : debug
[2021-06-14 15:30:29.220][INFO] : Socket port : 55019
[2021-06-14 15:30:29.221][INFO] : Socket host : 127.0.0.1
[2021-06-14 15:30:29.221][INFO] : PID file : /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-14 15:30:29.221][INFO] : Apikey : Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn
[2021-06-14 15:30:29.221][INFO] : Callback : http://127.0.0.1:80/plugins/xiaomihome/core/php/jeeXiaomiHome.php
[2021-06-14 15:30:29.222][INFO] : Cycle : 0.05
[2021-06-14 15:30:29.222][DEBUG] : Writing PID 9321 to /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-14 15:30:29.224][DEBUG] : Init request module v2.12.4
[2021-06-14 15:30:29.262][DEBUG] : Starting new HTTP connection (1): 127.0.0.1
[2021-06-14 15:30:29][DEBUG] : Format Invalide
[2021-06-14 15:30:29.289][DEBUG] : http://127.0.0.1:80 "GET /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn HTTP/1.1" 200 0
[2021-06-14 15:30:29.294][DEBUG] : Socket interface started
[2021-06-14 15:30:29.296][DEBUG] : LoopNetServer Thread started
[2021-06-14 15:30:29.296][INFO] : Start listening...
[2021-06-14 15:30:29.297][DEBUG] : Listening on: [127.0.0.1:55019]
[2021-06-14 15:30:29.300][DEBUG] : Read Socket Thread Launched
[2021-06-14 15:30:29.301][DEBUG] : Aquara Thread Launched
[2021-06-14 15:31:03][DEBUG] : execute : action wifi refresh
[2021-06-14 15:31:04][DEBUG] : Envoi : {"apikey":"Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn","type":"wifi","cmd":"refresh","model":"airmonitorb1","dest":"192.168.1.4","token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","devtype":"08f3","serial":"00df"}
[2021-06-14 15:31:04.356][DEBUG] : Client connected to [127.0.0.1:42282]
[2021-06-14 15:31:04.357][DEBUG] : Message read from socket: {"apikey":"Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn","type":"wifi","cmd":"refresh","model":"airmonitorb1","dest":"192.168.1.4","token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","devtype":"08f3","serial":"00df"}
[2021-06-14 15:31:04.358][DEBUG] : Client disconnected from [127.0.0.1:42282]
[2021-06-14 15:31:04.453][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-06-14 15:31:04.454][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-06-14 15:31:04.454][DEBUG] : SOCKET-READ------Refreshing : airmonitorb1
[2021-06-14 15:31:04.462][DEBUG] : {"params": [], "id": 46908, "method": "get_air_data"}
[2021-06-14 15:31:09.466][ERROR] : SOCKET-READ------Exception on socket : tuple index out of range
[2021-06-14 15:35:05][DEBUG] : Rafraîchissement de XiaomiWifi : Air Monitor
[2021-06-14 15:35:05][DEBUG] : Envoi : {"apikey":"Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn","type":"wifi","cmd":"refresh","model":"airmonitorb1","dest":"192.168.1.4","token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","devtype":"08f3","serial":"00df"}
[2021-06-14 15:35:05.752][DEBUG] : Client connected to [127.0.0.1:42794]
[2021-06-14 15:35:05.753][DEBUG] : Message read from socket: {"apikey":"Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn","type":"wifi","cmd":"refresh","model":"airmonitorb1","dest":"192.168.1.4","token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","devtype":"08f3","serial":"00df"}
[2021-06-14 15:35:05.754][DEBUG] : Client disconnected from [127.0.0.1:42794]
[2021-06-14 15:35:05.912][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-06-14 15:35:05.912][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-06-14 15:35:05.913][DEBUG] : SOCKET-READ------Refreshing : airmonitorb1
[2021-06-14 15:35:05.917][DEBUG] : {"params": [], "id": 54304, "method": "get_air_data"}
[2021-06-14 15:35:10.923][ERROR] : SOCKET-READ------Exception on socket : tuple index out of range

[EDIT] d’après mes recherches sur le forum ca pourrait être un pb de token invalide mais je suis sûr de mon token pour 2 raisons:
d’abord parce que le bouton « récupérer les infos » me renvoie une clé de 32 caractères hexa
ensuite parce que je suis allé lire les datas stockées dans le backup de mon iPad avec cette méthode et que la clé est identique.

J’ai bien sûr refait les dépendances et redémarré plusieurs fois…
Je suis en v3.3.35, dernier niveau de plugin et mon CGS1 est au dernier niveau de fw 3.4.5_0168

Une suggestion?

Bonjour @rootard,
Il y a plusieurs méthodes indiquées dans ton lien pour le token. Attention la méthode « récupérer les infos » ne semble pas fonctionner donc (si c’est le cas tu ne peux pas te fier au résultat)

Ensuite essaye peut-être avec le airmonitorb1.json d’origine pour voir si à l’exception du CO2 le reste ne fonctionne pas.

Bon courage

merci pour tes suggestions @FBAF
comme je l’ai dit je suis quasi-sûr du token vu que le bouton me le remplit ET je suis allé le lire dans mon backup d’iPad, ils sont identiques. Auparavant j’avais essayé avec un sniffeur https comme pour les Lywsd03 mais je n’ai pas réussi à le trouver dans les logs. Je n’ai pas d’Android donc pas d’autre alternative…
J’avais également essayé avant de modifier le cO2.
Il est possible que le format du json ait changé avec le nouveau FW QingPing. Quand j’ai un moment je vais essayer de mettre des traces

Je continue mes investigations. La lib python-miio ne s’est pas installée correctement au refresh du plugin, c’est peut être la cause de mon problème. Le souci c’est que ma version de python est trop basse:

root@rpi> pip3 install python-miio
Collecting python-miio
  Using cached python_miio-0.5.0.1-py3-none-any.whl (202 kB)
ERROR: Package 'python-miio' requires a different Python: 3.5.3 not in '>=3.6'
WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

root@rpi> pip3 --version
pip 20.0.2 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)
root@rpi> whereis pip3
pip3: /usr/bin/pip3 /usr/local/bin/pip3.5 /usr/local/bin/pip3 /usr/share/man/man1/pip3.1.gz

J’ai peur de casser ma machine de prod si j’upgrade… des suggestions?

Suite du feuilleton:
j’ai essayé une reinstall sur ma v4.1.23 de dev avec le dernier niveau de plugin xiaomihome
1ere remarque: tout s’installe mais j’ai encore des erreurs au niveau des dépendances:

********************************************************
*             Installation des dépendances             *
********************************************************
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [376 kB]
Fetched 408 kB in 1s (277 kB/s)
Reading package lists...

Reading package lists...
Building dependency tree...
Reading state information...
libffi-dev is already the newest version (3.2.1-9).
python3-cryptography is already the newest version (2.6.1-3+deb10u2).
python3-dev is already the newest version (3.7.3-1).
libssl-dev is already the newest version (1.1.1d-0+deb10u6+rpt1).
python3-pip is already the newest version (18.1-5+rpt1).
The following packages were automatically installed and are no longer required:
  libncurses5 raspi-gpio
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting construct
  Using cached https://www.piwheels.org/simple/construct/construct-2.10.67-py3-none-any.whl
Installing collected packages: construct
Successfully installed construct-2.10.67
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyudev
  Downloading https://www.piwheels.org/simple/pyudev/pyudev-0.22.0-py3-none-any.whl (63kB)
Collecting six (from pyudev)
  Downloading https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Installing collected packages: six, pyudev
Successfully installed pyudev-0.22.0 six-1.16.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting requests
  Downloading https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl (61kB)
Collecting certifi>=2017.4.17 (from requests)
  Downloading https://files.pythonhosted.org/packages/05/1b/0a0dece0e8aa492a6ec9e4ad2fe366b511558cdc73fd3abc82ba7348e875/certifi-2021.5.30-py2.py3-none-any.whl (145kB)
Collecting idna<3,>=2.5 (from requests)
  Downloading https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl (58kB)
Collecting urllib3<1.27,>=1.21.1 (from requests)
  Downloading https://files.pythonhosted.org/packages/0c/cd/1e2ec680ec7b09846dc6e605f5a7709dfb9d7128e51a026e7154e18a234e/urllib3-1.26.5-py2.py3-none-any.whl (138kB)
Collecting chardet<5,>=3.0.2 (from requests)
  Downloading https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl (178kB)
Installing collected packages: certifi, idna, urllib3, chardet, requests
Successfully installed certifi-2021.5.30 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.5
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyserial
  Downloading https://files.pythonhosted.org/packages/07/bc/587a445451b253b285629263eb51c2d8e9bcea4fc97826266d186f96f558/pyserial-3.5-py2.py3-none-any.whl (90kB)
Installing collected packages: pyserial
Successfully installed pyserial-3.5
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting future
  Using cached https://www.piwheels.org/simple/future/future-0.18.2-py3-none-any.whl
Installing collected packages: future
Successfully installed future-0.18.2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pycrypto
  Downloading https://www.piwheels.org/simple/pycrypto/pycrypto-2.6.1-cp37-cp37m-linux_armv7l.whl (525kB)
Installing collected packages: pycrypto
Successfully installed pycrypto-2.6.1
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting enum34
  Using cached https://files.pythonhosted.org/packages/63/f6/ccb1c83687756aeabbf3ca0f213508fcfb03883ff200d201b3a4c60cedcc/enum34-1.1.10-py3-none-any.whl
Installing collected packages: enum34
Successfully installed enum34-1.1.10
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting enum-compat
  Using cached https://files.pythonhosted.org/packages/55/ae/467bc4509246283bb59746e21a1a2f5a8aecbef56b1fa6eaca78cd438c8b/enum_compat-0.0.3-py3-none-any.whl
Installing collected packages: enum-compat
Successfully installed enum-compat-0.0.3
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.36.2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting yeelight
  Using cached https://files.pythonhosted.org/packages/e3/fd/142e3084cb6827de8e486216d7703a6d7acd420704f02d1e86035c60c74e/yeelight-0.6.3-py3-none-any.whl
Collecting ifaddr (from yeelight)
  Using cached https://files.pythonhosted.org/packages/92/0f/a577a724c03982b800232713874e805c8fcc14f4a2c3060902ed20b50da8/ifaddr-0.1.7-py2.py3-none-any.whl
Collecting future (from yeelight)
  Using cached https://www.piwheels.org/simple/future/future-0.18.2-py3-none-any.whl
Installing collected packages: ifaddr, future, yeelight
Successfully installed future-0.18.2 ifaddr-0.1.7 yeelight-0.6.3
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting python-miio
  Using cached https://files.pythonhosted.org/packages/25/0d/c64cd4c85e27eed0bfd950dee8f5c0fc1b0627750b78f447f4c75efc08d1/python_miio-0.5.6-py3-none-any.whl
Collecting click<8,>=7 (from python-miio)
  Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
Collecting appdirs<2,>=1 (from python-miio)
  Using cached https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl
Collecting pytz (from python-miio)
  Using cached https://files.pythonhosted.org/packages/70/94/784178ca5dd892a98f113cdd923372024dc04b8d40abe77ca76b5fb90ca6/pytz-2021.1-py2.py3-none-any.whl
Collecting croniter<1,>=0 (from python-miio)
  Using cached https://files.pythonhosted.org/packages/05/e5/1d2b7e3c36c444e78a31d7f0b8a1799acf4f8d869693f2232a3555a5dc6f/croniter-0.3.37-py2.py3-none-any.whl
Collecting attrs (from python-miio)
  Using cached https://files.pythonhosted.org/packages/20/a9/ba6f1cd1a1517ff022b35acd6a7e4246371dfab08b8e42b829b6d07913cc/attrs-21.2.0-py2.py3-none-any.whl
Collecting defusedxml<0.7,>=0.6 (from python-miio)
  Using cached https://files.pythonhosted.org/packages/06/74/9b387472866358ebc08732de3da6dc48e44b0aacd2ddaa5cb85ab7e986a2/defusedxml-0.6.0-py2.py3-none-any.whl
Collecting tqdm<5,>=4 (from python-miio)
  Downloading https://files.pythonhosted.org/packages/b4/20/9f1e974bb4761128fc0d0a32813eaa92827309b1756c4b892d28adfb4415/tqdm-4.61.1-py2.py3-none-any.whl (75kB)
Collecting PyYAML<6,>=5 (from python-miio)
  Using cached https://www.piwheels.org/simple/pyyaml/PyYAML-5.4.1-cp37-cp37m-linux_armv7l.whl
Collecting netifaces<1,>=0 (from python-miio)
  Using cached https://www.piwheels.org/simple/netifaces/netifaces-0.11.0-cp37-cp37m-linux_armv7l.whl
Collecting construct<3.0.0,>=2.10.56 (from python-miio)
  Using cached https://www.piwheels.org/simple/construct/construct-2.10.67-py3-none-any.whl
Collecting importlib_metadata<2,>=1; python_version <= "3.7" (from python-miio)
  Using cached https://files.pythonhosted.org/packages/8e/58/cdea07eb51fc2b906db0968a94700866fc46249bdc75cac23f9d13168929/importlib_metadata-1.7.0-py2.py3-none-any.whl
Collecting zeroconf<1,>=0 (from python-miio)
  Using cached https://files.pythonhosted.org/packages/36/d4/cf3952bf4ed616e0fce6864894696b367a4a984c8de9ea7ff007ee0e55ee/zeroconf-0.31.0-py3-none-any.whl
Collecting cryptography<4,>=3 (from python-miio)
  Using cached https://www.piwheels.org/simple/cryptography/cryptography-3.4.7-cp37-cp37m-linux_armv7l.whl
Collecting android_backup<1,>=0 (from python-miio)
  Using cached https://www.piwheels.org/simple/android-backup/android_backup-0.2.0-py3-none-any.whl
Collecting python-dateutil (from croniter<1,>=0->python-miio)
  Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting natsort (from croniter<1,>=0->python-miio)
  Using cached https://files.pythonhosted.org/packages/63/23/8b6acd2e9c0b427802dd45aacf0b2a0250893c3b26c7b1340589a588cc2a/natsort-7.1.1-py3-none-any.whl
Collecting zipp>=0.5 (from importlib_metadata<2,>=1; python_version <= "3.7"->python-miio)
  Using cached https://files.pythonhosted.org/packages/0f/8c/715c54e9e34c0c4820f616a913a7de3337d0cd79074dd1bed4dd840f16ae/zipp-3.4.1-py3-none-any.whl
Collecting ifaddr>=0.1.7 (from zeroconf<1,>=0->python-miio)
  Using cached https://files.pythonhosted.org/packages/92/0f/a577a724c03982b800232713874e805c8fcc14f4a2c3060902ed20b50da8/ifaddr-0.1.7-py2.py3-none-any.whl
Collecting cffi>=1.12 (from cryptography<4,>=3->python-miio)
  Using cached https://www.piwheels.org/simple/cffi/cffi-1.14.5-cp37-cp37m-linux_armv7l.whl
Collecting six>=1.5 (from python-dateutil->croniter<1,>=0->python-miio)
  Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.12->cryptography<4,>=3->python-miio)
  Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
Installing collected packages: click, appdirs, pytz, six, python-dateutil, natsort, croniter, attrs, defusedxml, tqdm, PyYAML, netifaces, construct, zipp, importlib-metadata, ifaddr, zeroconf, pycparser, cffi, cryptography, android-backup, python-miio
Successfully installed PyYAML-5.4.1 android-backup-0.2.0 appdirs-1.4.4 attrs-21.2.0 cffi-1.14.5 click-7.1.2 construct-2.10.67 croniter-0.3.37 cryptography-3.4.7 defusedxml-0.6.0 ifaddr-0.1.7 importlib-metadata-1.7.0 natsort-7.1.1 netifaces-0.11.0 pycparser-2.20 python-dateutil-2.8.1 python-miio-0.5.6 pytz-2021.1 six-1.16.0 tqdm-4.61.1 zeroconf-0.31.0 zipp-3.4.1
Invalid requirement: '_thread'
Traceback (most recent call last):
  File "/usr/share/python-wheels/packaging-19.0-py2.py3-none-any.whl/packaging/requirements.py", line 93, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1632, in parseString
    raise exc
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1622, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3395, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3717, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3378, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 2689, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/req/constructors.py", line 253, in install_req_from_line
    req = Requirement(req)
  File "/usr/share/python-wheels/packaging-19.0-py2.py3-none-any.whl/packaging/requirements.py", line 97, in __init__
    requirement_string[e.loc : e.loc + 8], e.msg
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'_thread'": Expected W:(abcd...)

********************************************************
*             Installation terminée                    *
********************************************************

Ensuite je retombe sur le même problème qu’en v3 documenté ici:

[2021-06-15 19:55:05][INFO] : Lancement démon xiaomihome : /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 Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-15 19:55:06.830][INFO] : Start xiaomihomed
[2021-06-15 19:55:06.831][INFO] : Log level : debug
[2021-06-15 19:55:06.831][INFO] : Socket port : 55019
[2021-06-15 19:55:06.831][INFO] : Socket host : 127.0.0.1
[2021-06-15 19:55:06.831][INFO] : PID file : /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-15 19:55:06.831][INFO] : Apikey : Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn
[2021-06-15 19:55:06.832][INFO] : Callback : http://127.0.0.1:80/plugins/xiaomihome/core/php/jeeXiaomiHome.php
[2021-06-15 19:55:06.832][INFO] : Cycle : 0.05
[2021-06-15 19:55:06.832][DEBUG] : Writing PID 12519 to /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-15 19:55:06.834][DEBUG] : Init request module v2.25.1
[2021-06-15 19:55:06.847][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-06-15 19:55:06][DEBUG] : Format Invalide
[2021-06-15 19:55:06.878][DEBUG] : http://127.0.0.1:80 "GET /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn HTTP/1.1" 200 0
[2021-06-15 19:55:06.881][DEBUG] : Socket interface started
[2021-06-15 19:55:06.882][DEBUG] : LoopNetServer Thread started
[2021-06-15 19:55:06.883][INFO] : Start listening...
[2021-06-15 19:55:06.883][DEBUG] : Listening on: [127.0.0.1:55019]
[2021-06-15 19:55:06.885][DEBUG] : Read Socket Thread Launched
[2021-06-15 19:55:06.886][DEBUG] : Aquara Thread Launched
[2021-06-15 19:55:43.796][DEBUG] : Signal 15 caught, exiting...
[2021-06-15 19:55:43.797][DEBUG] : Shutdown
[2021-06-15 19:55:43.797][DEBUG] : Removing PID file /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-15 19:55:44][ERROR] : Erreur sur la fonction deamon_start du plugin : Vous devez attendre au moins 45 secondes entre deux lancements du démon. Dernier lancement : 2021-06-15 19:55:05
[2021-06-15 19:55:57][INFO] : Lancement démon xiaomihome : /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 Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-15 19:55:58.283][INFO] : Start xiaomihomed
[2021-06-15 19:55:58.284][INFO] : Log level : debug
[2021-06-15 19:55:58.284][INFO] : Socket port : 55019
[2021-06-15 19:55:58.284][INFO] : Socket host : 127.0.0.1
[2021-06-15 19:55:58.284][INFO] : PID file : /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-15 19:55:58.284][INFO] : Apikey : Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn
[2021-06-15 19:55:58.284][INFO] : Callback : http://127.0.0.1:80/plugins/xiaomihome/core/php/jeeXiaomiHome.php
[2021-06-15 19:55:58.285][INFO] : Cycle : 0.05
[2021-06-15 19:55:58.285][DEBUG] : Writing PID 13937 to /tmp/jeedom/xiaomihome/deamon.pid
[2021-06-15 19:55:58.286][DEBUG] : Init request module v2.25.1
[2021-06-15 19:55:58.297][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-06-15 19:55:58][DEBUG] : Format Invalide
[2021-06-15 19:55:58.319][DEBUG] : http://127.0.0.1:80 "GET /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn HTTP/1.1" 200 0
[2021-06-15 19:55:58.322][DEBUG] : Socket interface started
[2021-06-15 19:55:58.323][DEBUG] : LoopNetServer Thread started
[2021-06-15 19:55:58.323][INFO] : Start listening...
[2021-06-15 19:55:58.323][DEBUG] : Listening on: [127.0.0.1:55019]
[2021-06-15 19:55:58.324][DEBUG] : Read Socket Thread Launched
[2021-06-15 19:55:58.325][DEBUG] : Aquara Thread Launched
[2021-06-15 20:00:07][DEBUG] : Rafraîchissement de XiaomiWifi : Air Monitor
[2021-06-15 20:00:07][DEBUG] : Envoi : {"apikey":"Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn","type":"wifi","cmd":"refresh","model":"airmonitorb1","dest":"192.168.1.4","token":"4679485476396574306b7970636b7a7a","devtype":"","serial":""}
[2021-06-15 20:00:07.169][DEBUG] : Client connected to [127.0.0.1:58750]
[2021-06-15 20:00:07.170][DEBUG] : Message read from socket: b'{"apikey":"Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn","type":"wifi","cmd":"refresh","model":"airmonitorb1","dest":"192.168.1.4","token":"4679485476396574306b7970636b7a7a","devtype":"","serial":""}'
[2021-06-15 20:00:07.171][DEBUG] : Client disconnected from [127.0.0.1:58750]
[2021-06-15 20:00:07.387][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-06-15 20:00:07.389][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-06-15 20:00:07.389][DEBUG] : SOCKET-READ------Refreshing : airmonitorb1
[2021-06-15 20:00:07.390][ERROR] : SOCKET-READ------Exception on socket : 'str' object has no attribute 'decode'

Et enfin si je corrige j’ai cette erreur, le plugin ne se lance même pas!

[2021-06-15 19:45:59][INFO] : Lancement démon xiaomihome : /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 Zdtny1Yvn2gfvVT1QbwCs9QXHC3lGcxn --cycle 0.05 --pid /tmp/jeedom/xiaomihome/deamon.pid
Traceback (most recent call last):
  File "/var/www/html/plugins/xiaomihome/resources/xiaomihomed/xiaomihomed.py", line 26, in <module>
    import globals
  File "/var/www/html/plugins/xiaomihome/resources/xiaomihomed/globals.py", line 3, in <module>
    from devices.yeelight.flow import *
  File "/var/www/html/plugins/xiaomihome/resources/xiaomihomed/devices/yeelight/__init__.py", line 7, in <module>
    from .main import Bulb, BulbException, discover_bulbs
  File "/var/www/html/plugins/xiaomihome/resources/xiaomihomed/devices/yeelight/main.py", line 10, in <module>
    from future.utils import raise_from
ImportError: No module named future.utils
[2021-06-15 19:46:29][ERROR] : Impossible de lancer le démon xiaomihomed. Vérifiez le log.

GRRR Je suis maudit :imp: :imp: :imp:
[EDIT] en listant le post plus haut jusqu’au bout j’en déduit qu’il faut installer la beta pour que ca marche c’est bien ca??

@lunarok pour info je viens d’ouvrir un ticket
Merci!

Bonjour,

juste qq pistes car j’ai eu les mêmes soucis de tuple out of range avec mon aspi xiaomi et c’était un pb de token:

  • si tu reset ton equipement, le token change donc celui de ton Ipad n’est peut etre plus le bon
  • et « récupérer les infos » sur mon aspi me renvoyait un token qui n’était pas bon non plus

à creuser … sachant que je n’ai pas de Air Monitor.

Merci @Djelau
Oui je pense que ca n’a rien a voir avec les spécificités de ce device qui est tres proche du airmonitorb1
J’ai pourtant refait un backup de mon iPad pour vérifier et le token n’a pas changé. Il faudrait que je trouve une autre méthode pour le vérifier
Petite question: est ce que tu dois déconnecter l’app Xiaomi Home pour que ca fonctionne ou pas?

Hello,

Voici une méthode ultra simple pour récupérer tes token, il s’agit d’un utilitaire qui tourne sous Windows ou MAC OS

@BorisTS merci beaucoup pour ton lien!
Grâce à lui j’ai pu vérifier que c’était bien un problème de token, ca fonctionne maintenant sur ma v3

Par contre je n’ai pas réussi à comprendre pourquoi la méthode du backup iOS +sqlite n’a pas fonctionné mais l’essentiel c’est que ca marche

1 « J'aime »

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.