Bonjour à tous,
Je vous propose aujourd’hui un nouveau plugin qui vous permet de récupérer les informations de votre imprimante Brother (jet d’encre ou laser).
Votre imprimante doit être connectée à votre réseau local et avoir le protocole SNMP activé (si il ne l’est pas par défaut, connectez-vous à l’interface de votre imprimante pour le configurer).
Le plugin se repose sur une librairie Python installée en dépendance.
Le plugin est particulièrement intéressant pour récupérer les niveaux d’encres:
Plus d’infos dans la documentation : Plugin Brother
Le plugin est en beta pour l’instant et peut également être installé directement depuis GitHub :
Les commentaires et contributions sont les bienvenues !
Je cherche notamment à avoir des retours de personnes avec une imprimante différente de la mienne (DCP-375CW) afin de oir comment le plugin se comporte et si d’autres informations intéressants peuvent être récupérées.
Passage en stable d’ici quelques jours.
HugoKs3.
2 « J'aime »
olive
Février 6, 2022, 8:59
2
Salut Hugo
Merci
Ras, je suis sur une Brother MFC-L3730CDN laser couleur
bonne soirée
Bonsoir,
Je ne sais pas encore si cela va vraiment me servir, mais j’ai vu ce plugin par hasard, alors j’ai testé!
Le niveau d’encre remonte bien sur une MFC-J880DW !
Merci
Ah s j’ai une erreur dans le log!
File "/var/www/html/plugins/brother/core/class/../../resources/jeeBrother.py", line 30, in main
mypath = argv[3]
IndexError: list index out of range
[2022-02-06 22:42:25][ERROR] : [Aucun][MFC-J880DW] file content empty
DEBUG:asyncio:Using selector: EpollSelector
Bonjour
Fonctionnelle pour une Laser 9020CDW, dommage que le plugin ne soit pas compatible sur un jeedom 4.1.2
@Alan328 , @olive , @domoggvad merci pour vos retours rapides!
Pouvez-vous me faire parvenir vos logs en mode debug ? Cela me permettra de :
comprendre l’erreur de @Alan328
voir si vos imprimantes retournent d’autres infos interessantes
@domoggvad , le plugin utilise la nouvelle gestion des dépendances qui n’est disponible qu’en 4.2.
olive
Février 7, 2022, 8:25
7
salut @hugoKs3
pas en debug au moment ou mais ça l’est maintenant
brother.txt (37,5 Ko)
Brother_package
0000|+ echo '*******************Begin of package installation******************'
0001|*******************Begin of package installation******************
0002|+ touch /tmp/jeedom_install_in_progress_brother
0003|+ echo 1
0004|+ echo 2
0005|+ sudo apt update
0006|WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0007|Hit:1 http://ftp.fr.debian.org/debian buster InRelease
0008|Get:2 http://ftp.fr.debian.org/debian buster-updates InRelease [51.9 kB]
0009|Get:3 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
0010|Hit:4 http://phoscon.de/apt/deconz buster InRelease
0011|Hit:5 https://deb.nodesource.com/node_14.x buster InRelease
0012|Fetched 117 kB in 2s (48.3 kB/s)
0013|Reading package lists...
0014|Building dependency tree...
0015|Reading state information...
0016|3 packages can be upgraded. Run 'apt list --upgradable' to see them.
0017|+ echo 3
0018|+ sudo pip3 install --upgrade brother
0019|/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
0020|from cryptography.utils import int_from_bytes
0021|/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
0022|from cryptography.utils import int_from_bytes
0023|Collecting brother
0024|Downloading brother-1.0.2-py3-none-any.whl (11 kB)
0025|Collecting pysnmp
0026|Downloading pysnmp-4.4.12-py2.py3-none-any.whl (296 kB)
0027|Requirement already satisfied: pycryptodomex in /usr/local/lib/python3.7/dist-packages (from pysnmp->brother) (3.10.1)
0028|Collecting pysmi
0029|Downloading pysmi-0.3.4-py2.py3-none-any.whl (80 kB)
0030|Collecting pyasn1>=0.2.3
0031|Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
0032|Collecting ply
0033|Downloading ply-3.11-py2.py3-none-any.whl (49 kB)
0034|Installing collected packages: ply, pysmi, pyasn1, pysnmp, brother
0035|Successfully installed brother-1.0.2 ply-3.11 pyasn1-0.4.8 pysmi-0.3.4 pysnmp-4.4.12
0036|WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
0037|WARNING: You are using pip version 21.3.1; however, version 22.0.2 is available.
0038|You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
0039|+ echo 4
0040|+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end brother
0041|+ rm /tmp/jeedom_install_in_progress_brother
0042|+ echo '*******************End of package installation******************'
0043|*******************End of package installation******************
1 « J'aime »
voilà
+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_brother
+ echo 1
+ echo 2
+ sudo apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease
Hit:3 http://deb.debian.org/debian buster-backports InRelease
Hit:4 http://security.debian.org buster/updates InRelease
Hit:5 https://deb.nodesource.com/node_12.x buster InRelease
Hit:6 http://armbian.site-meganet.com/apt buster InRelease
Reading package lists...
Building dependency tree...
Reading state information...
146 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ echo 3
+ sudo pip3 install --upgrade brother
Collecting brother
Downloading https://files.pythonhosted.org/packages/ae/db/da8c726d157a9f2cb8ccba1c5702db6e5607f206851a70ddd631ae3e1a6a/brother-1.0.2-py3-none-any.whl
Collecting pysnmp (from brother)
Downloading https://files.pythonhosted.org/packages/25/7e/1e17facea54dd21c6a72db6ae57a5bfdd56edd54b8c4850668b554bdddba/pysnmp-4.4.12-py2.py3-none-any.whl (296kB)
Collecting pysmi (from pysnmp->brother)
Downloading https://files.pythonhosted.org/packages/1f/fc/02361d1c2b247de73070c457c4da98c448693154894c14f2d7b48dfabf7e/pysmi-0.3.4-py2.py3-none-any.whl (80kB)
Collecting pycryptodomex (from pysnmp->brother)
Downloading https://files.pythonhosted.org/packages/24/40/e249ac3845a2333ce50f1bb02299ffb766babdfe80ca9d31e0158ad06afd/pycryptodomex-3.14.1.tar.gz (3.4MB)
Collecting pyasn1>=0.2.3 (from pysnmp->brother)
Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
Collecting ply (from pysmi->pysnmp->brother)
Downloading https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl (49kB)
Building wheels for collected packages: pycryptodomex
Running setup.py bdist_wheel for pycryptodomex: started
Running setup.py bdist_wheel for pycryptodomex: still running...
Running setup.py bdist_wheel for pycryptodomex: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/74/6d/cb/b929b0a26cb187bb29efbedd432c4eebf93b05fd391b91e7c0
Successfully built pycryptodomex
Installing collected packages: ply, pysmi, pycryptodomex, pyasn1, pysnmp, brother
Successfully installed brother-1.0.2 ply-3.11 pyasn1-0.4.8 pycryptodomex-3.14.1 pysmi-0.3.4 pysnmp-4.4.12
+ echo 4
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end brother
+ rm /tmp/jeedom_install_in_progress_brother
+ echo '*******************End of package installation******************'
*******************End of package installation******************
brother.txt (52,0 Ko)
Log passé en debug, en attendant voilà le log depuis l’install hier !
brother.txt (43,8 Ko)
Salut @hugoKs3 !
J’ai une DCP-L2530DW (laser noir et blanc) et le plugin marche pour le moment au top (toutes les commandes fonctionnent)
J’ai bien sûr un message pour me dire que chaque info des couleurs sont vides ce qui est normal vu que j’ai une noir et blanc.
Mais pour le moment, c’est impec
Merci @Alan328 . Il semble que votre erreur m’apparaisse plus…
Merci @MonsieurFlal .
Il faudrait peut-etre que je rajoute une option dans l’equipement pour choisir couleur ou b/w. Cela eviterait d’avoir des des commandes et logs inutiles.
Comment se comporte le widget dans votre cas ? Pouvez-vous partager un screenshot ?
Merci.
Bonjour,
Il serait intéressant de récupérer également le nombre de pages faites ainsi que le pourcentage d’usure du tambour pour les laser.
Merci en tout cas pour le plugin
1 « J'aime »
Merci pour le feedback @cob94440 .
Pour le nombre de pages faites, c’est deja recupere via deux commandes (dans la derniere beta):
le nombre total de pages imprimees depuis « l’existence » de l’imprimante
le nombre de pages imprimees depuis la derniere recuperation des donnees (commande calculee par le plugin).
Pensais-tu a autre chose ?
Pour ce qui est du pourcentage d’usure du toner, sais-tu quel attribut correspond a ca (voir logs en mode debug) ?
Pas le toner mais le Tambour.
Je n’ai pas encore installé le plugin
Je ne le vois pas dans les plugins beta
Le lien est dans le post initial.
Etes-vous bien en Jeedom 4.2.8 minimum ?
Le plugin nécessite la 4.2 car il utilise la nouvelle gestion des dépendances.