HP Printer Ink Levels

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

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.

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: '%'

thank you @hsepm that worked perfect, much thanks! Anyone have same baseoids for an Epson xp-830?

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?

I can confirm your snmp sensor configuration works with a Laser Jet Pro 400 color MFP.

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.

Does the HP printer management tool on Windows show the correct values?

I’m on a Mac but the web interface shows the correct values

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

Thanks! That’s seems to be working fine

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?

What card are you using to create this printer graphics?

Bar-card and vertical-stack-in-card… found it here

1 Like