elad-bar/ha-hpprinter

v2 doesn't show ink levels for Deskjet 2700 series

Opened this issue ยท 4 comments

Hello again ๐Ÿ‘€

After the v2 upgrade and after fixing the entities for the integration, I realized I don't have ink values anymore.

I'm not sure if this is caused by the fact my cartridges were refilled (the web UI complains about it), but if it's that so, I guess it should show the ink values as unavailable instead of not having an entity at all... Unless the web service doesn't even bother reporting the ink state in the first place?
In fact, the integration currently reports both cartridges as unplugged, even though they're printing just fine (I updated the firmware from 2020 to the latest version and made a test page, to be sure that HP wouldn't refuse to print with my cartridges after the update). The counterfeit/genuine refilled counters are zero for both cartridges as well, which is kinda odd but if it depends on the integration to count, it would make sense since the refilled ones got installed before I reinstalled the integration.

I also noticed the amount of cancelled print jobs went away. Not that I exactly bother with that, but in case you find it around... haha

This is what the web server says:
image

Here's the integration logs, hopefully with less noise given I cleaned up some errors from last time ๐Ÿ˜‚
home-assistant_hpprinter_2024-06-21T01-30-39.310Z.log

I still see lots of timeouts, can you try accessing the same resources using wget / browser and see if it happens "outside" HA? Could it be that the printer is off?
Logs of integration are still not in debug level but answering those questions might redirect to the root cause

Thanks

Hmmm indeed, I forgot the debug option. I enabled it and left the HA alone for 5min+, so supposedly it would call the consumables endpoint. Once my timer ran out, I went to the Web UI and it was all just fine. My printer is wifi-based (you might have guessed already lol), and at some place buried in the Web UI config there was a statement saying it's not possible to set auto-off when the printer is in a network.

I was able to access the XML file just fine, and it seems to state the max capacity is zero (given it's refilled, it would not know, I guess?). It's here (GitHub refuses to upload XML files... lol so I made it a txt).

That all done, I disabled debug logging and downloaded this:
home-assistant_hpprinter_2024-06-22T23-55-41.533Z.log
So far, I see no timeouts on HA Logs, but I wouldn't say it's not going to happen again, given I saw it earlier today, after all my updates and fixes ๐Ÿคท

ok, i think that the best way to approach it would be, that once the endpoint of status returned timeout, it will report once warning, and up until the next time it will connect, all messages to log of failures will be reported as debug, that way it will not spam the log as it is the right behaviour (printer went offline),
how does it sound?

thanks

I guess that makes sense, indeed.

But the original topic is the integration completely missing entities for ink levels, even when the XML is recovered correctly... ๐Ÿ˜