Custom Component - HP Printer

Nothing…the page just spins. I imagine that is because I’m not at home.

Hi.

Newbie to HA World. How do I add this to HA so I can see my HP LaserJet Pro M118-M119 networked printer? No knowledge of YAML. Help appreciated.

All instructions are available in readme, if it still doesn’t work for you, please provide more details, logs, xml files from printer,
Thanks

I installed HACS after doing some digging and realized I would need that to get the HP Printer Integration. I have been able to install it to my dashboard, but I am still not sure how I go about configuring it. For some reason it appears to be off in the dashboard and I am not sure how to get it back on.

Can you please post logs? If it’s not work there should be a log message explaining why…
In addition, I guess that if you managed to install it, you passed the stage of parsing the XML, can you pls confirm it?

Thanks

Yes, this thread is quite long and I missed the part about needing HACS which now looks to be installed correctly in HA, I think. So some progress to an extent I think. I won’t be able to get back to you later in the day, but could you remind me again where to get the logs from? thank you

All written in README, i’m not next to my pc so I can’t copy paste, but all details are there and pretty organized, if you didn’t find it, let me know and when i’ll get home i will send you

Thanks

Still struggling with finding the logs, but I think I am slowly figuring things out. Your tool from HACS is installed and then I was able to query it in HA integrations. I ran this http://192.168.2.7/DevMgmt/ProductStatusDyn.xml and it returned a message of SVN-IPG-LEDM.29readyReady0. The printer, a HP LaserJet Pro M118dw will sleep it and there is no option on the printer’s webpage to disable it. Not sure if this will be an issue once it gets added. Royal pain in the butt I cannot disable the sleep mode.Is the sleeping of the printer going to be an issue here?

image

Not sure I understand, did the url you have mentioned is accessible and returns XML?

I used Firefox browser on Win 10 and when I pasted this

http://192.168.2.7/DevMgmt/ProductStatusDyn.xml Returned: LEDM.29readyReady0.

url is accessible if I just put in http://192.168.2.7

if I paste the url in the way you describe I get that message.

Seems like your print does not support this kind of integration as described in the README, it should return XML content

Edit: Please let me know if in the developer tools you see more then just the label you have posted, could be also that the browser presents the content like that

I will try with Edge and on my iPad using Safari. I am not too keen on Chrome, but will try on another computer. Just weird because its a fairly new printer

Will this work for a very old HP Laserjet 5000N? Black/White printer using toner cartridge

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<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/ dd/DataDictionaryMasterLEDM.xsd http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31 AlertDetails.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31 ProductStatusCategories.xsd http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31 LocalizationIds.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31 ProductStatusDyn.xsd”>

dd:Version

dd:RevisionSVN-IPG-LEDM.29</dd:Revision>

</dd:Version>

psdyn:Status

pscat:StatusCategoryinPowerSave</pscat:StatusCategory>

<psdyn:LocString lang=“en”>Sleep mode is on.</psdyn:LocString>

<psdyn:LocString lang=“en”>192.168.2.7</psdyn:LocString>

</psdyn:Status>

psdyn:AlertTable

dd:ModificationNumber0</dd:ModificationNumber>

</psdyn:AlertTable>

</psdyn:ProductStatusDyn>

that’s actually the XML I was looking for :slight_smile: , great,
now, for the error message you have posted yesterday, it seems that you didn’t enter IP / hostname in the Host input, if you did and got that message, it means that the printer is not accessible from HA.
can you please let me know which of them is more accurate?

thanks

Hello. I added this integration for my HP Smart Tank 515.

Unfortunately, the ink levels are not displayed properly, at the moment all of them are 100% even though I have printer about ~1200 pages.

I’m thinking that there is an issue because this printer is a Smart Tank one and not a ‘toner’, I manually add ink whenever there’s need.
Maybe this integration doesn’t support this / isn’t updated to support this information ?

Thank you!

Levels are reported from the printer API, please send xml files according to the readme / store responses section so i’ll be able to better understand the cause,
Is it an original tank of hp?

Hi @bar,

First of all, thanks for this custom component! Been using it for two days now and it works like a charm.
On the down side, my logs ar getting a bit spammed with error messages like:

Logger: custom_components.hpprinter.api.HPPrinterAPI
Source: custom_components/hpprinter/api/HPPrinterAPI.py:100
Integration: HP Printer (documentation, issues)
First occurred: 08:12:47 (175 occurrences)
Last logged: 11:06:47

Failed to extract from array AlertDetailsMarkerColor of ['Black', 'Magenta', 'Yellow', 'Cyan'], Error: string indices must be integers, Line: 222

Already made a issue in your GitHub Repo.

Is this something on my end or can i fix this myself?

Thank you very much for this integration. I have an HP 7740, and this picks up far more information than the IPP integration. Notably, pages printed, scanner info, and much more. The only thing missing from this is a notification when the trays (it has 2) run out of paper. Is that possible to get? If you are still working on this, I can send the XML files.

Thank you

Michael

I have an officejet pro 9020. Is there a command to get the printer off ?