Holdestmade:
platform: snmp name: ‘String Check’ host: 192.168.1.xx baseoid: 1.3.6.1.2.1.1.5.0
yes that works, but when I try to use
<ivec:ink>
<ivec:model><![CDATA[PGI-570XL<PGBK>]]></ivec:model>
<ivec:color>PGBK</ivec:color>
<ivec:icon>none</ivec:icon>
<ivec:level>100</ivec:level>
<vcn:tca>AC</vcn:tca>
<ivec:order>4</ivec:order>
"
iso.3.6.1.4.1.1602.1.5.1.6.2.2.1.2.1.8 = STRING: "</ivec:ink>
I use IOD: 1.3.6.1.4.1.1602.1.5.1.6.2.2.1.2.1.8 and get a Entity not available.
That is weird, I’m no expert but would have thought it would return the whole string, must be something to do with the format of it.
"</ivec:ink>
<ivec:ink>
<ivec:model><![CDATA[CLI-571XL<C>]]></ivec:model>
<ivec:color>C</ivec:color>
<ivec:icon>none</ivec:icon>
<ivec:level>100</ivec:level>
<vcn:tca>AC</vcn:tca>
<ivec:order>5</ivec:order>
</ivec:ink>
</ivec:marker_info>
<ivec:"
I’m afraid my printer doesn’s support this kind of readings
Maybe someone else will be able to help further with it.
Thank you very much for your help so far
Looking at this page, the oids with -2 as integers in your output seem to be the correct ones for Ink Tank Levels.
Is there any settings in your printer to enable v1 of SNMP ?
https://kb.paessler.com/en/topic/64145-monitoring-canon-printers-via-snmp
1 Like
trhessel
(Tom Hessel)
September 27, 2019, 3:27am
36
Has anyone ever got this to work with HP laser printers? I have an HP laser printer and an epson injet and would like to poll for the toner and ink status of all colors for both.
hsepm
(Holger)
September 27, 2019, 5:42am
37
I have. This is for a Laserjet M277 color laser printer.
- platform: snmp
name: 'black'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.1
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
- platform: snmp
name: 'cyan'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.2
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
- platform: snmp
name: 'magenta'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.3
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
- platform: snmp
name: 'yellow'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.4
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
trhessel
(Tom Hessel)
September 27, 2019, 1:22pm
38
thank you @hsepm that worked perfect, much thanks! Anyone have same baseoids for an Epson xp-830?
brendan
(Brendan)
October 28, 2019, 6:24pm
39
I have been looking over this and it looks quite interesting.
How does this compare to the CUPS sensor that is built in?
I use CUPS for print sharing off a Raspberry Pi, so I can collect information from that.
This one looks more stand alone. Would that be the main difference?
GaryK
(Gary Kelley)
October 28, 2019, 10:34pm
40
I can confirm your snmp sensor configuration works with a Laser Jet Pro 400 color MFP.
jampez77
(Jamie Nandhra-Pezone)
November 2, 2019, 11:37am
41
I’ve just got this set up and the ink_cartridge entities are showing up with state of -1 (They’re genuine HP cartridges)
Anyone had this issue?
I’m running cups on a seperate Pi to my home assistant, don’t know if that makes any difference.
hsepm
(Holger)
November 2, 2019, 12:06pm
42
Does the HP printer management tool on Windows show the correct values?
jampez77
(Jamie Nandhra-Pezone)
November 3, 2019, 8:50am
43
I’m on a Mac but the web interface shows the correct values
jg.balcombe
(James Balcombe)
November 3, 2019, 1:42pm
44
Hi, theres a separate thread on this same topic. I found that for certain HP inkjet printers you can’t get to the ink levels via snmp. This may be the case for other models. You can however get to it via specific XML files (which the web interface uses).
Have a look at:
Other Article
Hope that helps.
1 Like
jampez77
(Jamie Nandhra-Pezone)
November 5, 2019, 6:44pm
45
Thanks! That’s seems to be working fine
Bartem
November 6, 2019, 12:54am
46
Thanks for the starting point, this also worked with my LaserJet M175nw… I also found some additional info like pages printed, pages remaining, drum life, printer status… it took some fooling around to find them so I figured maybe I could save someone else the trouble… thanks guys!
############################## BLACK TONER
- platform: snmp
name: 'm175nw_black'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.1
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
- platform: snmp
name: 'm175nw_black_pages_printed'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.11.1.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages printed'
- platform: snmp
name: 'm175nw_black_pages_remaining'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.5.1.1.1.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages remaining'
############################## CYAN TONER
- platform: snmp
name: 'm175nw_cyan'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.2
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
- platform: snmp
name: 'm175nw_cyan_pages_printed'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.11.2.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages printed'
- platform: snmp
name: 'm175nw_cyan_pages_remaining'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.5.1.1.2.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages remaining'
############################## MAGENTA TONER
- platform: snmp
name: 'm175nw_magenta'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.3
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
- platform: snmp
name: 'm175nw_magenta_pages_printed'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.11.3.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages printed'
- platform: snmp
name: 'm175nw_magenta_pages_remaining'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.5.1.1.3.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages remaining'
############################## YELLOW TONER
- platform: snmp
name: 'm175nw_yellow'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.4
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
- platform: snmp
name: 'm175nw_yellow_pages_printed'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.11.4.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages printed'
- platform: snmp
name: 'm175nw_yellow_pages_remaining'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.5.1.1.4.0
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages remaining'
############################## IMAGING DRUM
- platform: snmp
name: 'm175nw_imaging_drum'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.5
accept_errors: true
scan_interval: 86400
unit_of_measurement: '%'
## I didn't get a chance to see what the different states were for the mode/status,
## seems power_mode will tell you if in sleep/awake or low-power mode, etc and
## printer_status_2 will just give a Ready state even when sleeping which seems to
## make more sense.. you will have to see which works best for you..
## I think status_2 will tell you if needs paper etc, but didn't look that far into it yet...
################################## PRINTER
- platform: snmp
name: 'm175nw_printer_mode'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.4.3.1.2.0
accept_errors: true
scan_interval: 300
- platform: snmp
name: 'm175nw_printer_status_2'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.17.6.1.5.1.2
accept_errors: true
scan_interval: 300
- platform: snmp
name: 'm175nw_printer_status'
host: 192.168.x.x
baseoid: 1.3.6.1.4.1.11.2.3.9.1.1.3.0
accept_errors: true
scan_interval: 300
- platform: snmp
name: 'm175nw_total_pages'
host: 192.168.x.x
baseoid: 1.3.6.1.2.1.43.10.2.1.4.1.1
accept_errors: true
scan_interval: 86400
unit_of_measurement: 'pages'
How did you do the nice toner graphic?
jriker1
(John)
January 31, 2020, 9:33pm
51
Bartem:
Thanks for the starting point, this also worked with my LaserJet M175nw… I also found some additional info like pages printed, pages remaining, drum life, printer status… it took some fooling around to find them so I figured maybe I could save someone else the trouble… thanks guys!
What card are you using to create this printer graphics?
Bartem
January 31, 2020, 10:15pm
52
I really liked the idea of your custom component, but as I use hassio I dont think it will work since ink needs to be installed in the homeassistant docker container.
So instead I took the approach to create a hassio addon that will run ink periodically, parse the output into JSON and sent it to HA via MQTT.
Its very much a hack job (esp the shell script that calls ink and mosquitto client for MQTT) but it works great for my Canon Pixma 5300, and supports HA MQTT autodiscovery - albeit in a ve…
Bar-card and vertical-stack-in-card… found it here
1 Like