Recent openHAB versions come with a new HP Printer Binding, which is a big improvement over the more general IPP Binding for printers.
The new binding reads the data from two files which are provided by the printer:
http://<printer>/DevMgmt/ProductUsageDyn.xmlhttp://<printer>/DevMgmt/ProductStatusDyn.xml
Let’s install that …
First the binding must be installed, I use an Ansible Playbook which can do that for me:
| |
$ansible_host holds my IP address for the Raspberry Pi running the openHAB system. The two Tasks first fetch existing and installed extensions, and then install any missing extension from the list (here it’s only one extension for this case).
After that’s done, one can either use the Paper UI to configure the binding - or deploy Things and Items again using Ansible. Which has the advantage that I can reinstall the entire system at any time.
First things first, the printers.things file:
| |
laserjet_pro can be changed to any name, the only requirement is that the same name must be used for the Items later on. And replace <ip> with the IP-address of the printer.
Then the printers.items file:
| |
The documentation for the Binding lists a number of additional channels, but not every of them will work for every printer.
The channel name must include the same name chosen for the Thing in printers.things. After sending everything to the openHAB installation, the event.log will show that the available channels come online and can be used.
Comments
With an account on the Fediverse or Mastodon, you can respond to this post. Known replies are displayed below:
Note: This will load data from mastodon.social.
Learn how this is implemented here.
Share: