SCE-Development / Quasar

How paper is printed at SCE.
MIT License
4 stars 0 forks source link

Monitor printer ink levels with SNMP #29

Open starphys opened 2 years ago

starphys commented 2 years ago

MacOS is able to show the esitmated ink levels of SCE printers when added through System Preferences. How does it work? Wireshark yielded the below result

image

SNMP! What is it? It looks like we can retrieve ink levels using the protocol SNMP docs.

We may be able to use a Node net-snmp library to talk to the printers to grab data on ink levels and other things.

game plan

evanugarte commented 2 years ago

HP p2015dn SNMP reference

starphys commented 2 years ago

First step merged in https://github.com/SCE-Development/Quasar/pull/31. Now that this functionality is exposed, there are two next steps: 1) Build a dashboard to monitor this data regularly (allowing us to anticipate the need to change ink before it becomes a problem.) 2) Incorporate this into printer selection logic (try to balance ink levels, drain one printer first, always drain the more empty printer, etc).

evanugarte commented 1 year ago

closing as this will live outside of quasar shoutout @akshtshrma24

evanugarte commented 9 months ago

reference for paper jam https://oidref.com/1.3.6.1.4.1.11.2.3.9.1.1.2.9

when we do snmpwalk -v 1 -c public <PRINTER_IP> .1 we get a row below like

iso.3.6.1.4.1.11.2.3.9.1.1.2.9.0 = INTEGER: 0

the above oid matches the link, just replace iso with 1 and remove the trailing .0


reference for prtAlertTable https://mibbrowser.online/mibdb_search.php?mib=Printer-MIB

evanugarte commented 1 month ago

reopening this for this 2024 summer internship