Xerox printer monitoring over SNMP

Here below my lovelace code.

To get this result I’m using “Mushroom theme” and for the level indicator I’m using “Bar-card”, both are downloadable from HACS in the Frontend section. If you have questions please be free to post them here, I hope this will inspire more people to create beautyful views :star_struck:

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-title-card
        title: Xerox Workcentre 6515 dni
        subtitle: 'Pages Count: {{ states(''sensor.page_count'') }} '
  - type: horizontal-stack
    cards:
      - type: picture
        image: /local/images/xerox_workcentre_6515-1.png
        tap_action:
          action: none
        hold_action:
          action: none
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-template-card
        primary: Available
        secondary: '{{ states(''sensor.prncyanlvl'') }} / {{ states(''sensor.prncyancap'') }}'
        icon: mdi:image-filter-none
        layout: vertical
        icon_color: cyan
      - type: custom:mushroom-template-card
        primary: Available
        secondary: >-
          {{ states('sensor.prnmagentalvl') }} / {{
          states('sensor.prnmagentacap') }}
        icon: mdi:image-filter-none
        layout: vertical
        icon_color: pink
      - type: custom:mushroom-template-card
        primary: Available
        secondary: >-
          {{ states('sensor.prnyellowlvl') }} / {{ states('sensor.prnyellowcap')
          }}
        icon: mdi:image-filter-none
        layout: vertical
        icon_color: amber
      - type: custom:mushroom-template-card
        primary: Available
        secondary: >-
          {{ states('sensor.prnblacklvl') }} / {{ states('sensor.prnblackcap')
          }}
        icon: mdi:image-filter-none
        layout: vertical
        icon_color: black
  - type: horizontal-stack
    cards:
      - type: custom:bar-card
        icon: mdi:water
        columns: 4
        height: 150
        value: outside
        entities:
          - entity: sensor.cyan_toner_level
            color: cyan
            direction: up
            name: Cyan
          - entity: sensor.magenta_toner_level
            color: magenta
            direction: up
            name: Magenta
          - entity: sensor.yellow_toner_level
            color: yellow
            direction: up
            name: Yellow
          - entity: sensor.black_toner_level
            color: grey
            direction: up
            name: Black
        limit_value: true
5 Likes

I Love it:

Wonderful looking lovelace card. If you want to have the rounded card borders as mine, just change the values to 20px as shown in the below picture.

Also as you are using the black mushroom themes, I think you can change the icon (mdi:image-filter-none) color of the black ink to grey or something like that. Then you we can clearly see the icon.

Here below a little modification I made using “Stack-in-Card”.

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-title-card
        title: Xerox Workcentre 6515 dni
        subtitle: 'Pages Count: {{ states(''sensor.page_count'') }} '
  - type: horizontal-stack
    cards:
      - type: picture
        image: /local/images/xerox_workcentre_6515-1.png
        tap_action:
          action: none
        hold_action:
          action: none
  - type: custom:stack-in-card
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:mushroom-template-card
            primary: Available
            secondary: >-
              {{ states('sensor.prncyanlvl') }} / {{ states('sensor.prncyancap')
              }}
            icon: mdi:image-filter-none
            layout: vertical
            icon_color: cyan
          - type: custom:mushroom-template-card
            primary: Available
            secondary: >-
              {{ states('sensor.prnmagentalvl') }} / {{
              states('sensor.prnmagentacap') }}
            icon: mdi:image-filter-none
            layout: vertical
            icon_color: pink
          - type: custom:mushroom-template-card
            primary: Available
            secondary: >-
              {{ states('sensor.prnyellowlvl') }} / {{
              states('sensor.prnyellowcap') }}
            icon: mdi:image-filter-none
            layout: vertical
            icon_color: amber
          - type: custom:mushroom-template-card
            primary: Available
            secondary: >-
              {{ states('sensor.prnblacklvl') }} / {{
              states('sensor.prnblackcap') }}
            icon: mdi:image-filter-none
            layout: vertical
            icon_color: black
      - type: horizontal-stack
        cards:
          - type: custom:bar-card
            icon: mdi:water
            columns: 4
            height: 150
            value: outside
            entities:
              - entity: sensor.cyan_toner_level
                color: cyan
                direction: up
                name: Cyan
              - entity: sensor.magenta_toner_level
                color: magenta
                direction: up
                name: Magenta
              - entity: sensor.yellow_toner_level
                color: yellow
                direction: up
                name: Yellow
              - entity: sensor.black_toner_level
                color: grey
                direction: up
                name: Black
            limit_value: true

Hello guys,
Do you know any way to get the printer counters?
I get almost every data from the Versalink C405, but can’t get the counters, neither from IPP or SMTP (OID code).
Any way you figure out to get that data into the home assistant?
Thanks for any clue.

I do! :slight_smile:
You need to do a mib walk and store the full result in a file. After, and acoording the printer menu settings serach for the counters that you want to add. On a Lexmark device (or HP) this is what is needed:

platform: snmp
  host: 192.168.1.160
  scan_interval: 120
  name: "CX310dn Total Paginas"
  unique_id: cx310dn_ltpc
  baseoid: 1.3.6.1.2.1.43.10.2.1.4.1.1
  unit_of_measurement: pages

Depend on teh implementation and the generation of the printer you can get more counters or not.

1 Like

Hello,

how can I implement this code in Android Studio Java?

Does anyone know?

Thanks

Hi!
Thanks for the inspiration & Code - I own a Xerox 6515 as well… but unfortunately the scripts here don’t show the correct things. After some shuffling I found out that my values for Black & Cyan have to be exchanged and Magenta & Cal as well. Then it makes sense!

I had the same issue, but it was simple to just exchange some value.