openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.56k forks source link

[HP Printer] Status: Offline #7815

Closed pc-bastler closed 3 years ago

pc-bastler commented 4 years ago

HP Printer

Expected Behavior

My HP Color LaserJet 2025n shown as online and as "color"-Model

Current Behavior

When I add my Printer using Paper UI from Inbox (it's automatically detected) a thing is created. This Thing shows up like: Status: OFFLINE Content ist nicht zulässig in Prolog. I also have "only" the Ink/Toner-Channel for Black Toner listed in Channels.

Possible Solution

Steps to Reproduce (for Bugs)

  1. Switch on the printer
  2. Wait until it is detected and shown in the inbox (Paper UI)
  3. Add the printer as thing

Context

I wanted to include my CP2025n to my open hab configuration

Your Environment

Cossey commented 4 years ago

The status message said Content ist nicht zulässig in Prolog - If Google Translate is correct, that says Content is not allowed in Prolog - whatever Prolog is.

If you have no channels but the 3 non-dynamic ones displayed, then this error is occurring when the Binding is being initialized - probably when its doing the first request to the http://<PrinterIP>/DevMgmt/ProductUsageDyn.xml endpoint. It reads the XML tags in this file to figure out what channels are supported.

Can you go to that XML file and see if it gets loaded up correctly?

Next lets see if the log files point to any obvious problems.

If you are not sure how, you can get the logging for the Binding doing the following:

  1. Remove the HP Printer thing from Paper UI.

  2. Enable TRACE level logging for the binding in the openhab console (log:set TRACE org.openhab.binding.hpprinter).

  3. Re-add the printer from the Inbox and then see what errors come through the log file and display them here. You can use the log:display or log:tail to watch the logs real time.

pc-bastler commented 4 years ago

Hi,

I tried to open the URL, you mentioned (of course replacing the with the correct IP of my CLJ) but get just a 404, to be exactly, it just says "404 not found" on the page.

Does that possibly mean, my printer is not supported?

Cossey commented 4 years ago

Possibly, yes. Can I also get you to the same url above, but instead of start with http can you change it to https to see if that makes a difference?

Additionally, can I get you to try this url as well to see if it works? http://<PrinterIP>/DevMgmt/DiscoveryTree.xml.

Cossey commented 4 years ago

@pc-bastler are you able to confirm the other page DiscoveryTreealso does not work?

Does the HP smart app work for your printer? Available on the iOS, Android and Microsoft stores. I developed the binding based on Wireshark captures from that app on Windows 10.

Thanks! I just want to rule out some things and your feedback would greatly help improve the Binding.

Cossey commented 3 years ago

Closed due to lack of response.

If this is still a problem please reopen issue.

petero-dk commented 1 year ago

I have a HP Color LaserJet CP5225n (with the same symptoms) so that is why I am commenting on this old thread @Cossey

It gets a 404 on both pages, and I cannot test https, as that is not enabled on the device. Is there anything I can do to find a way to get this printer supported, or is it simply not available?

Cossey commented 1 year ago

I have a HP Color LaserJet CP5225n (with the same symptoms) so that is why I am commenting on this old thread @Cossey

It gets a 404 on both pages, and I cannot test https, as that is not enabled on the device. Is there anything I can do to find a way to get this printer supported, or is it simply not available?

Does the HP Smart phone app work with your printer? If it does then there might be hope otherwise you'd be stuck trying to use SNMP for getting back printer status/state.

s-kilger commented 9 months ago

I have a HP Color LaserJet M552 which behaves the same way. There is no http://<PrinterIP>/DevMgmt/ProductUsageDyn.xml but there is a http://<PrinterIP>/DevMgmt/DiscoveryTree.xml page. My printer is recognized by the HP Smart phone app but it says that some functions are not available. Is there anything else I can contribute @Cossey?