Bonjour à tous,
TL;DR : En effet, le plugin Brother en v9 et inférieures n’est pas compatible avec Debian 12.
Je viens de faire un fresh install de Debian 12.5 en VM sur ESXi,
Puis d’installer Jeedom v4.4.7 avec la procédure habituelle ici,
Et enfin d’installer le plugin Brother via le Market.
Après activation, l’installation des dépendances se passent bien :
0000|================================================================================
0001|== Jeedom 4.4.7 diy in Debian GNU/Linux 12 (bookworm) on x86_64/amd64/64bits
0002|== Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
0003|== brother v9 (2024-03-18 00:01:12) branch:stable
0004|======================================================================
0005|== 15/06/2024 15:04:21 == Dependencies installation for brother
0006|======================================================================
0007|[ 0% ] : Synchronize the package index...
0008|[ 9% ] : Synchronize the package index : [ OK ]
0009|[ 10% ] : Purge dynamic contents...
0010|[ 29% ] : Purge dynamic contents : [ OK ]
0011|[ 30% ] : Install python3 venv and pip debian packages...
0012|[ 49% ] : Install python3 venv and pip debian packages : [ OK ]
0013|[ 50% ] : Create a python3 Virtual Environment...
0014|[ 69% ] : Create a python3 Virtual Environment : [ OK ]
0015|[ 70% ] : Install required python3 libraries in venv...
0016|[ 99% ] : Install required python3 libraries in venv : [ OK ]
0017|[100% ] : Finished !
0018|======================================================================
0019|== OK == Installation Successful
0020|======================================================================
L’interface est fonctionnelle et je lance un refresh de l’imprimante :
0013|[2024-06-15 15:04:21][INFO] : Installation des dépendances, voir log dédié (brother_dep)
0014|[2024-06-15 15:04:22][DEBUG] : Dépendances en cours d'installation... (30%)
0015|[2024-06-15 15:04:22][DEBUG] : Dépendances en cours d'installation... (30%)
0016|[2024-06-15 15:04:28][DEBUG] : Dépendances installées.
0017|[2024-06-15 15:06:09][DEBUG] : #[root][2d-printer][Rafraichir]# Command executed
0018|[2024-06-15 15:06:09][DEBUG] : #[root][2d-printer]# Running script: LOGFILE=/var/www/html/log/brother LOGLEVEL=debug CALLBACK='http://localhost:80/plugins/brother/core/php/callback.php?apikey=xyz&eqId=1' /var/www/html/plugins/brother/resources/venv/bin/python3 /var/www/html/plugins/brother/resources/jeeBrother.py '[root][2d-printer]' 2d-printer.local laser >/dev/null &
Mais lors du refresh, il y a en effet un problème avec la bibliothèque pysnmp
:
0000|Traceback (most recent call last):
0001|File "/var/www/html/plugins/brother/resources/jeeBrother.py", line 3, in <module>
0002|from brother import Brother, SnmpError, UnsupportedModel
0003|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/brother/__init__.py", line 10, in <module>
0004|import pysnmp.hlapi.asyncio as hlapi
0005|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/pysnmp/hlapi/asyncio/__init__.py", line 12, in <module>
0006|from pysnmp.hlapi.asyncio.transport import *
0007|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/pysnmp/hlapi/asyncio/transport.py", line 9, in <module>
0008|from pysnmp.carrier.asyncio.dgram import udp, udp6
0009|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/pysnmp/carrier/asyncio/dgram/udp.py", line 35, in <module>
0010|from pysnmp.carrier.asyncio.dgram.base import DgramAsyncioProtocol
0011|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/pysnmp/carrier/asyncio/dgram/base.py", line 36, in <module>
0012|from pysnmp.carrier.asyncio.base import AbstractAsyncioTransport
0013|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/pysnmp/carrier/asyncio/base.py", line 33, in <module>
0014|from pysnmp.carrier.asyncio.dispatch import AsyncioDispatcher
0015|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/pysnmp/carrier/asyncio/dispatch.py", line 46, in <module>
0016|class AsyncioDispatcher(AbstractTransportDispatcher):
0017|File "/var/www/html/plugins/brother/resources/venv/lib/python3.11/site-packages/pysnmp/carrier/asyncio/dispatch.py", line 57, in AsyncioDispatcher
0018|@asyncio.coroutine
0019|^^^^^^^^^^^^^^^^^
0020|AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
30 secondes de recherche sur Google plus tard et effectivement, c’est un problème connu dans pysnmp
qui ne sera pas corrigé, car pysnmp
n’est plus maintenu.
J’ai du aller un peu vite lors des tests sur Debian12 pour la sortie de la version 8 du plugin.
Et il faudra donc que je passe sur un PyEnv pour supporter Debian 12 :
@ngrataloup, peux-tu modifier l’autre sujet et marquer Brother v9 non compatible avec Debian 12 ?
La prochaine version sera compatible, certainement avant la fin du mois.
Avec toutes mes excuses,
Bad