Ayant récupéré une Smart (Recovery fraichement fait Stretch 9.4 / Mise à jour en 4.0.61 et seulement le plugin KLF200 installé en plus des plugins installés par défaut sur la Smart), je viens de faire le test.
Voici ce que cela donne :
# sudo pip3 install 'pyvlx=0.2.16'
Invalid requirement: 'pyvlx=0.2.16'
= is not a valid operator. Did you mean == ?
En remplacant avec le double == comme suggéré :
sudo pip3 install 'pyvlx==0.2.16'
Collecting pyvlx==0.2.16
Downloading https://files.pythonhosted.org/packages/d4/52/94a3b7ee75057128a444bd7abe1b1b8733e60fbd68972ead679432a72e48/pyvlx-0.2.16.tar.gz
Requirement already satisfied: PyYAML in /usr/local/lib/python3.5/dist-packages (from pyvlx==0.2.16)
Building wheels for collected packages: pyvlx
Running setup.py bdist_wheel for pyvlx ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-8h6unz6l/pyvlx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmph72gqmbdpip-wheel- --python-tag cp35:
/usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for pyvlx
Running setup.py clean for pyvlx
Failed to build pyvlx
Installing collected packages: pyvlx
Found existing installation: pyvlx 0.2.17
Uninstalling pyvlx-0.2.17:
Successfully uninstalled pyvlx-0.2.17
Running setup.py install for pyvlx ... done
Successfully installed pyvlx-0.2.16
Il y a une erreur mais l’installation se fait quand même.
Le KLF est maintenant trouvé et la connexion se fait mais il y a ensuite une autre erreur « Unable enable house status monitor. »:
[2020-10-30 16:03:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:03:03][DEBUG] : Result
[2020-10-30 16:03:43][INFO] : Arrêt du service klf200
[2020-10-30 16:03:43][INFO] : Lancement démon klf200 : /usr/bin/python3 /var/www/html/plugins/klf200/resources/klf200d.py 192.168.0.118 PASSWORD
[2020-10-30 16:03:43][ERROR] : KLF200 has been restarted after found not responding
Connecting to KLF 200.
Connected to: KLF 200: Software version: 0.2.0.0.71.0, hardware version: 6, protocol version: 3.14
Traceback (most recent call last):
File "/var/www/html/plugins/klf200/resources/klf200d.py", line 233, in <module>
LOOP.run_until_complete(init_pyvlx_connection(LOOP))
File "/usr/lib/python3.5/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/var/www/html/plugins/klf200/resources/klf200d.py", line 22, in init_pyvlx_connection
await pyvlx.load_nodes()
File "/usr/local/lib/python3.5/dist-packages/pyvlx/pyvlx.py", line 85, in load_nodes
await self.nodes.load(node_id)
File "/usr/local/lib/python3.5/dist-packages/pyvlx/nodes.py", line 70, in load
await self._load_all_nodes()
File "/usr/local/lib/python3.5/dist-packages/pyvlx/nodes.py", line 86, in _load_all_nodes
await get_all_nodes_information.do_api_call()
File "/usr/local/lib/python3.5/dist-packages/pyvlx/api_event.py", line 21, in do_api_call
await self.send_frame()
File "/usr/local/lib/python3.5/dist-packages/pyvlx/api_event.py", line 33, in send_frame
await self.pyvlx.send_frame(self.request_frame())
File "/usr/local/lib/python3.5/dist-packages/pyvlx/pyvlx.py", line 75, in send_frame
await house_status_monitor_enable(pyvlx=self)
File "/usr/local/lib/python3.5/dist-packages/pyvlx/house_status_monitor.py", line 57, in house_status_monitor_enable
raise PyVLXException("Unable enable house status monitor.")
pyvlx.exception.PyVLXException: <PyVLXException description="Unable enable house status monitor." />
En revanche, après un redémarrage forcé du KLF, cela semble bon maintenant :
[2020-10-30 16:04:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:04:03][DEBUG] : Result
[2020-10-30 16:04:43][INFO] : Arrêt du service klf200
[2020-10-30 16:04:43][INFO] : Lancement démon klf200 : /usr/bin/python3 /var/www/html/plugins/klf200/resources/klf200d.py 192.168.0.118 PASSWORD
[2020-10-30 16:04:43][ERROR] : KLF200 has been restarted after found not responding
Connecting to KLF 200.
Connected to: KLF 200: Software version: 0.2.0.0.71.0, hardware version: 6, protocol version: 3.14
[2020-10-30 16:05:03][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:05:03][DEBUG] : Result {"result": "ok", "devices": []}
[2020-10-30 16:06:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:06:02][DEBUG] : Result {"result": "ok", "devices": []}
[2020-10-30 16:07:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:07:02][DEBUG] : Result {"result": "ok", "devices": []}
[2020-10-30 16:08:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:08:02][DEBUG] : Result {"result": "ok", "devices": []}
[2020-10-30 16:09:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:09:02][DEBUG] : Result {"result": "ok", "devices": []}
[2020-10-30 16:10:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:10:02][DEBUG] : Result {"result": "ok", "devices": []}
[2020-10-30 16:11:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:11:02][DEBUG] : Result {"result": "ok", "devices": []}
[2020-10-30 16:12:02][DEBUG] : Send http://localhost:9123/devices
[2020-10-30 16:12:02][DEBUG] : Result {"result": "ok", "devices": []}
Et le Démon tourne bien :