Custom Component - HP Printer

Hi
Good integration, but i have a pinter HP LaserJet 400 M401dne. He found me it ok but show only correct status and printed pages. No show me status of toner… Look on screen. Show NA NA and 0% but actual state toner is 50%.
What i must share you to add support full my printer with your integration ?


state

And my XML

Does anyone know why I keep getting this error message in my logs? I’ve gotten it with the older and newer version “[custom_components.hpprinter.HPDeviceData] Head type ink color mapping for pK not available”

Hi, if i use this integration my knx system have issue during home assistant boot. Not update entity states. If i uninstall this integration all works fine. My printer integration works fine, so the problem is not a bad configuration.

i tried tu launch the debug_data service but no file stored in my config path.

but i found this: https://nopaste.xyz/?332d4d1e55bb3372#OI8lksNB+Xfq6jxJJjOhyOtWH/cXit9Tc4AuU7m8o5o=

I followed your code but cannot get in the frontend this part:

     - type: entities
       entities:
         - entity: sensor.hp_photosmart_5510_b111a_ink_black
           style: |
             :host {
               --paper-item-icon-color: black;
             }
           type: custom:multiple-entity-row
           name: Ink Black
           icon: mdi:invert-colors
           name_state: Füllstand
           primary:
             attribute: ['Installed At']
             name: Eingebaut am
           secondary:
             attribute: ['Warranty Expiration Date']
             name: Läuft ab am
             
         - entity: sensor.hp_photosmart_5510_b111a_ink_cyan
           style: |
             :host {
               --paper-item-icon-color: cyan;
             }
           type: custom:multiple-entity-row
           name: Ink Cyan
           icon: mdi:invert-colors
           name_state: Füllstand
           primary:
             attribute: ['Installed At']
             name: Eingebaut am
           secondary:
             attribute: ['Warranty Expiration Date']
             name: Läuft ab am
         - entity: sensor.hp_photosmart_5510_b111a_ink_magenta
           style: |
             :host {
               --paper-item-icon-color: magenta;
             }
           type: custom:multiple-entity-row
           name: Ink Magenta
           icon: mdi:invert-colors
           name_state: Füllstand
           primary:
             attribute: ['Installed At']
             name: Eingebaut am
           secondary:
             attribute: ['Warranty Expiration Date']
             name: Läuft ab am
         - entity: sensor.hp_photosmart_5510_b111a_ink_yellow
           style: |
             :host {
               --paper-item-icon-color: yellow;
             }
           type: custom:multiple-entity-row
           name: Ink Yellow
           icon: mdi:invert-colors
           name_state: Füllstand
           primary:
             attribute: ['Installed At']
             name: Eingebaut am
           secondary:
             attribute: ['Warranty Expiration Date']
             name: Läuft ab am

I don’t get the attributes showing in the card… Where is the error?
Obviously I changed the sensor names reflecting mine…
What i get is this:
Schermata 2020-02-18 alle 12.36.29

Anybody can help me please…

There was a change to the way that the multiple-entity-row works with getting attributes… I got caught out with this same thing the other day.

I’ve fixed your code, and this work for me. I only changed the code for black, but you can copy, paste, and edit for the others…

type: entities
entities:
  - entity: sensor.hp8600_ink_black
    style: |
      :host {
       --paper-item-icon-color: black;
      }
    type: 'custom:multiple-entity-row'
    name: Ink Black
    icon: 'mdi:invert-colors'
    name_state: Füllstand
    entities:
      - attribute: Installed At
        name: Eingebaut am
      - attribute: Warranty Expiration Date
        name: Läuft ab am
2 Likes

Thanks, it works!!!

finally found the issue, data structure is bit different when there is 1 or more inks / toners,
please take latest and check that it works

Just updated to latest version, got this error or restart, has worked great up to now:

Head type Printhead color mapping for CMYK not available
3:56 PM custom_components/hpprinter/HPDeviceData.py (WARNING) - message first occurred at 1:51 PM and shows up 243 times

Theres already an issue on Github, I’ve commented there too.

Thanks

Fixed that issue, information available in GitHub

In addition, added new status sensor that reads the status from the printer:
Off, On, Printing, Scanning, Copying, Canceling Job

This fixed the problem, thanks for the quick turnaround

Sensor works great too, I had this setup using esphome and the power monitoring plug I have the printer plugged into

@bar

Any idea why after the last few upgrades I don’t see the sensors?

Thx!

Name of the sensors is not like it supposed to be, please check in Developer -> States and let me know if there is an issue

Thanks

This is what I see in the configuration, but I don’t see any sensors. The issue with the integration started after the change that setting the printer can only be done from the UI. I hope you will return the option to configure it via the yamls.

Meant for Developers -> States not Configuration -> Devices,
Pleaae try to remove the integration and check for leftovers, if there are still devices, remove them and add the integration once again

Thanks

I found one bug for me . It show in integration HP Printer Printer and as entity also show HP Printer Printer but it is entity which show value printed pages and shoud name HP Printer Pages.
Look

2

The first HP Printer is the name of the integration you have set, the name of the sensor is “{Integration name} Printer” which is the printer outcome sensor, for AIO models there is also one for Scanner.

By the way, the unit of measurement is pages.

I’ve done it. Tryinh now to add device in configuration -> integration UI but without any luck. I really hope you will add in the future the option to define the printer via configuration yaml files, which make all much more simple :frowning:

You have great integration, really want to use it, but after the change, i only have issues :frowning:

Did you fully removed it from yaml?
Can you please post debug files as described in the readme file?

I’m not planning to add the yaml config soon as HA going to the UI configuration approach

Thanks

Hi i have a HP color laser 150nw. does any thing be enabled on the printer?