Custom Component - HP Printer

This is brilliant! Any plans to make it an official HA integration?

official as in part of HA release or HACS?

Part of Home Assistant. There is a Brother printer integration for example.

didn’t try it in the past, but will search how to do that

Thanks for the update. My manual config broke and I couldn’t get it working. Only way to fix was to use the new UI Integration and now it’s working again, but the integration doesn’t have anything there, it just says it has no devices.

Thanks for your reply. I did the update yesterday and do not see it in the UI. It’s why I asked for more info. Today with the new commit to correct issue #6 I see it and it works just fine!
Thanks :slight_smile:

@bar

I have updated to version 0.105.2 from 0.104.2 and now the printer integration has an issue. Any suggestions how to check it?

HP OfficeJet Pro 6970. Added successfully but all my ink sensors and prindhead report 0%. Also there are no sensors under Integrations, entities or devices.


This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!--
 THIS DATA SUBJECT TO DISCLAIMER(S) INCLUDED WITH THE PRODUCT OF ORIGIN. 
-->
<psdyn:ProductStatusDyn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" xmlns:ad="http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31" xmlns:pscat="http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31" xmlns:locid="http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31" xmlns:psdyn="http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31" xsi:schemaLocation="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/ ../schemas/dd/DataDictionaryMasterLEDM.xsd http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31 ../schemas/AlertDetails.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31 ../schemas/ProductStatusCategories.xsd http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31 ../schemas/LocalizationIds.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31 ../schemas/ProductStatusDyn.xsd">
<script/>
<dd:Version>
<dd:Revision>SVN-IPG-LEDM.216</dd:Revision>
<dd:Date>2011-02-08</dd:Date>
</dd:Version>
<psdyn:Status>
<pscat:StatusCategory>nonHPSupplyDetected</pscat:StatusCategory>
<locid:StringId>65559</locid:StringId>
</psdyn:Status>
<psdyn:Status>
<pscat:StatusCategory>inPowerSave</pscat:StatusCategory>
<locid:StringId>65640</locid:StringId>
</psdyn:Status>
<psdyn:AlertTable>
<dd:ModificationNumber>6</dd:ModificationNumber>
<psdyn:Alert>
<ad:ProductStatusAlertID>nonHPSupplyDetected</ad:ProductStatusAlertID>
<locid:StringId>65559</locid:StringId>
<dd:SequenceNumber>4</dd:SequenceNumber>
<ad:Severity>Info</ad:Severity>
<ad:AlertPriority>305</ad:AlertPriority>
<ad:AlertDetails>
<ad:AlertDetailsMarkerColor>Black</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsConsumableTypeEnum>ink</ad:AlertDetailsConsumableTypeEnum>
<ad:AlertDetailsMarkerLocation>4</ad:AlertDetailsMarkerLocation>
<ad:AlertDetailsUserAction>acknowledgeConsumableState</ad:AlertDetailsUserAction>
</ad:AlertDetails>
<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
</psdyn:Alert>
<psdyn:Alert>
<ad:ProductStatusAlertID>genuineHP</ad:ProductStatusAlertID>
<locid:StringId>65561</locid:StringId>
<dd:SequenceNumber>1</dd:SequenceNumber>
<ad:Severity>Info</ad:Severity>
<ad:AlertPriority>399</ad:AlertPriority>
<ad:AlertDetails>
<ad:AlertDetailsMarkerColor>Magenta</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsConsumableTypeEnum>ink</ad:AlertDetailsConsumableTypeEnum>
<ad:AlertDetailsMarkerLocation>1</ad:AlertDetailsMarkerLocation>
<ad:AlertDetailsUserAction>acknowledgeConsumableState</ad:AlertDetailsUserAction>
</ad:AlertDetails>
<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
</psdyn:Alert>
<psdyn:Alert>
<ad:ProductStatusAlertID>genuineHP</ad:ProductStatusAlertID>
<locid:StringId>65561</locid:StringId>
<dd:SequenceNumber>2</dd:SequenceNumber>
<ad:Severity>Info</ad:Severity>
<ad:AlertPriority>399</ad:AlertPriority>
<ad:AlertDetails>
<ad:AlertDetailsMarkerColor>Cyan</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsConsumableTypeEnum>ink</ad:AlertDetailsConsumableTypeEnum>
<ad:AlertDetailsMarkerLocation>2</ad:AlertDetailsMarkerLocation>
<ad:AlertDetailsUserAction>acknowledgeConsumableState</ad:AlertDetailsUserAction>
</ad:AlertDetails>
<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
</psdyn:Alert>
<psdyn:Alert>
<ad:ProductStatusAlertID>genuineHP</ad:ProductStatusAlertID>
<locid:StringId>65561</locid:StringId>
<dd:SequenceNumber>3</dd:SequenceNumber>
<ad:Severity>Info</ad:Severity>
<ad:AlertPriority>399</ad:AlertPriority>
<ad:AlertDetails>
<ad:AlertDetailsMarkerColor>Yellow</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsConsumableTypeEnum>ink</ad:AlertDetailsConsumableTypeEnum>
<ad:AlertDetailsMarkerLocation>3</ad:AlertDetailsMarkerLocation>
<ad:AlertDetailsUserAction>acknowledgeConsumableState</ad:AlertDetailsUserAction>
</ad:AlertDetails>
<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
</psdyn:Alert>
</psdyn:AlertTable>
</psdyn:ProductStatusDyn>

I have the same issue. After upgrading to 0.105.2 the printer entities are no longer available

Did you go to your Integrations menu to add the integration and enter the printer name and host?.. for me the integration didn’t have a title… it was a blank line and clicking it filled in a box with HP Printer so that’s how I figured out that was it… I don’t know if that was fixed or was just an issue on my system.

Printhead remaining data is not available for any printer.

In addition, currently, there is no support for entities in the integration, will add it soon.

Translation file was missing in first version and it was fixed, please let me know if it’s still not working

Yes, the title is now showing properly. Thank you!

@bar any idea why it is not working on 0.105.2

Thx

Hey @bar the integration does not work for me 0.105.2

thank you

But what about ink remaining? All colors 0%

Just updated, thanks again for your work on this! I would suggest updating the info on the github page to state that yaml configuration is no longer supported and you have to migrate to using the built in Integrations feature to configure your printer.

I must admit that it took me a couple days to look as to why my printer stats were no longer showing, but once I saw why… it was an easy fix. I did have to scan through the last 3 weeks of posts to try and figure out what the breaking change was.

1 Like

I’m a bit confused. Installed this though HACS.
README says to add it to configurations.yaml, some posts back the format seems to have changed to what’s written in README.
Then I see that hp printer can be added through “integrations”. Did this, but this shows no printer found.

Calling https://192.168.1.220/DevMgmt/ProductStatusDyn.xml gives me:

<!--
 THIS DATA SUBJECT TO DISCLAIMER(S) INCLUDED WITH THE PRODUCT OF ORIGIN. 
-->
<psdyn:ProductStatusDyn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" xmlns:ad="http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31" xmlns:pscat="http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31" xmlns:locid="http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31" xmlns:psdyn="http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31" xsi:schemaLocation="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/ ../schemas/dd/DataDictionaryMasterLEDM.xsd http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31 ../schemas/AlertDetails.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31 ../schemas/ProductStatusCategories.xsd http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31 ../schemas/LocalizationIds.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31 ../schemas/ProductStatusDyn.xsd">
<dd:Version>
<dd:Revision>SVN-IPG-LEDM.216</dd:Revision>
</dd:Version>
<psdyn:Status>
<pscat:StatusCategory>inPowerSave</pscat:StatusCategory>
<psdyn:LocString lang="en">Sleep mode is on.</psdyn:LocString>
</psdyn:Status>
<psdyn:AlertTable>
<dd:ModificationNumber>1</dd:ModificationNumber>
<psdyn:Alert>
<ad:ProductStatusAlertID>cartridgeVeryLow</ad:ProductStatusAlertID>
<dd:SequenceNumber>1</dd:SequenceNumber>
<ad:Severity>StrictWarning</ad:Severity>
<ad:AlertDetails>
<ad:AlertDetailsMarkerColor>Black</ad:AlertDetailsMarkerColor>
<ad:AlertDetailsConsumableTypeEnum>toner</ad:AlertDetailsConsumableTypeEnum>
</ad:AlertDetails>
<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
</psdyn:Alert>
</psdyn:AlertTable>
</psdyn:ProductStatusDyn>

I’m working on next version - it will contain:

  • Updated ReadMe (how to set it up via Configuration -> Integrations, including information if you are using previous version through configuration.yaml)
  • More suitable Icons
  • Entities will be available through Configuration -> Integrations and not just Developer -> States
  • Async and delayed call to the printer to avoid latency on startup
1 Like

So you say I’d better wait for a new (more comfortable) version to be released? Happy to do so … Or is there anything else I could try in the meantime?