Getting Basic Info From B/W Lexmark Printer

Hi,

I am aware I could try IPP and I have in past with no success. So I downloaded a SNMP Walker Tool called Paessler SNMP Tester to scan for and try to get info on the printer. Its giving me alot of OID, but I am still not sure the value returned will be what I need. I am just looking for suggestions as to how this is coming together. Its in early stages and there is more to go such as defining entities. Stuff I commented out I am not sure I can get. Help appreciated

# Printer information via SNMP

# Black toner
# - platform: snmp
#   name: 'e120n_black_capacity'
#   host: 192.168.2.6
#   baseoid: 1.3.6.1.2.1.43.11.1.1.6.1.1
#   baseoid: 1.3.6.1.2.1.43.11.1.1.8.1
#   accept_errors: true
#   scan_interval: 90
#   #unit_of_measurement: '%'

# - platform: snmp
#    name: 'e120n_black_remaining'
#    host: 192.168.2.6
#   baseoid: 1.3.6.1.2.1.43.11.1.1.9.1.1
#    accept_errors: true
#    scan_interval: 90
#    #unit_of_measurement: '%'

#  - platform: template
#    sensors:
#     cp1515n_black_level:
#       friendly_name: "Black Tomer Level"
#       unit_of_measurement: '%'
#       value_template: "{{ (states('sensor.cp1515n_black_remainig')|float / # states('sensor.cp1515n_black_capacity')|float * 100) | round(0) }}"

e120n_printer_error:
  friendly_name: "Printer Error"
  value_template: >-
    {% if is_state('sensor.e120n_printer_error_code', '0') %}
      Paper Jam
    {% elif is_state('sensor.e120n_printer_error_code', '1') %}
      Cover Open
    {% elif is_state('sensor.e120n_printer_error_code', '2') %}
      Toner Status
    {% else %}  
      Unknown
    {% endif %}

If I remember correctly Lexmark returns the print count on the toner.
There is also another OID that returns what the total capacity of the toner is.

Keep in mind they will return negative values when it drops below around 10%. That means “there is some left”.

I don’t remember all of the quirks of SNMP but I have an Excel file that talks to all printers at work.
I can have a look in it tomorrow and give you the OIDs I use.

Hi @Hellis81,

This is a relatively old Lexmark B/W printer. Its a E120n printer and one of my favorites. What you see in my initial post I been working and re-working. Hardly finished. I been checking over at Free LEXMARK-PVT-MIB SNMP MIB Download - Free MIB Download - Search MIBs - OiDViEW. I found more confused from the values returned by Paessler SNMP Tester. I am trying this code to follow the one posted over at HP Printer over SNMP - #15 by vingerha. For whatever reason cannot delete that thread. Rather keep things over in this thread. I had also posted over there, but no one offered to help.

Whatever help you can offer much appreciated.

You linked to this thread

Yikes. One of those days. Opps. Fixed in prior thread.