Cossey / openhab-addons

Add-ons for openHAB 2.x
Eclipse Public License 2.0
1 stars 0 forks source link

[HP Printer] Handle Ink Levels correctly when cartridges are empty #6

Closed Cossey closed 5 years ago

Cossey commented 5 years ago

heilbron reports that his cyan cartridge has dropped to -2% in the Binding, yet when he looks at the EWS UI it displays --%.

Need to have a ink level check so that any ink level <0 gets set to 0.

sheilbronn commented 5 years ago
  1. Please that my report applied to the model HP Color LaserJet MFP M277dw (I don't know about other models...)
  2. One could argue that the binding should just report what it gets from the printer, i.e. -2%, instead of somehow trying to work around an assumed bug, i.e. by masking a negative level to 0 %. To properly judge on this, one would probably have to know, what all the other HP models report as an ink level in case of an empty cartridge.... Therefore, one might suggest to NOT mask to 0% at the moment and rather have the -2% reported until it has been more worked out, what the other models do!
  3. For testing purposes: Please not that the file, which I originally submitted on the forum, contained reports for a cartridge with an empty ink level. I'm adding it (ProductStatusDyn[1].xml.txt) here, too.
Cossey commented 5 years ago

Thanks for the update, the Ink/Toner level channels are Number channels only, so it would normally make sense to set them to zero when it goes to negative. However I do think you're right that I should probably wait and see what the consensus is regarding empty carts as negatives may have a special meaning.

It may just be that the cart is reporting a negative percentage due to slight discrepancies in actual ink levels vs cart estimates based on print usage.

sheilbronn commented 5 years ago

BTW: After printing some stuff for my kids the CYAN ink level on the MFP M277dw has dropped to -3% now... just wondering how far it goes ;)

Cossey commented 5 years ago

My guess is it probably keeps going down until its fully empty.

Cossey commented 5 years ago

Will keep the ink/toner levels as-is. That way if it goes into negatives it will still display this information.