HP OfficeJet Printer Binding

printer
openhab2
binding
Tags: #<Tag:0x00007f014c131c40> #<Tag:0x00007f014c130700> #<Tag:0x00007f014c130318>

(Stewart Cossey) #1

I am working on my first openHAB binding to add HP Printer support for openHAB. I have designed it around the HP OfficeJet Pro printers.

hpprinterbinding

The printers Embedded Web Server serves up a few xml files which contain some useful data like

  • ink levels
  • cumulative ink usage
  • total pages printed
  • current status

which is what this binding uses to fetch data.

Auto discovery is supported only for listed model! If your model is listed in the Binding it should detect it, if you have an unsupported OfficeJet it should show as such - any other models you’ll need to add the Thing manually.

Networked HP printers should be able to use this, if you have a printer that’s not listed then then use the Unsupported HP Printer Thing and that should work for you or you may want to use a listed printer model close to yours.

You can download the Binding from here https://www.dropbox.com/s/tqxc57dgp74026o/org.openhab.binding.hpprinter-2.5.0-SNAPSHOT.jar?dl=0

If you don’t have the ability to use Paper UI to add the Thing or if your device isn’t auto-discovered then you can use the good ol’ way by creating a .thing file along the following lines:

Thing hpprinter:deskjet2620:djprinter "Printer" @ "Office" [ ipAddress="192.168.1.1", refreshInterval="30", useSSL = true ]

The available settings are:

Setting Name Type Required
IP Address ipAddress string yes
Secure Sockets useSSL boolean
Refresh (polling) Interval refreshInterval number
User Name userName string
Password ewsPassword string

The User Name and Password settings are required for using the Reboot printer option when the web interface has locked features behind a login.

The available thing IDs are:

Printer Model Thing ID
Unsupported HP Printer generictype1
HP OfficeJet 4650 officejet4650
HP OfficeJet Pro 8600 officejetpro8600
HP OfficeJet Pro 8710 officejetpro8710
HP OfficeJet Pro 8730 officejetpro8730
HP DeskJet 2620 deskjet2620
HP ENVY Photo 6200 envyphoto6200
HP Color LaserJet MFP M277dw colorlaserjetmfpm277dw

The following is a list of channels and their data types for .items files:

Channel Name Data Type
Colour Level colourLevel Number
Cyan Colour Level cyanLevel Number
Magenta Colour Level magentaLevel Number
Yellow Colour Level yellowLevel Number
Black Colour Level blackLevel Number
Printer Status status String
Subscriptions subsciptionCount Number
Total Number of Pages Printed totalCount Number
Total Number of Colour Pages Printed totalColorCount Number
Total Number of Monochrome Pages Printed totalMonochromeCount Number
Reboot Printer reboot ONOFF

The reboot channel is not yet supported.

The colourLevel is used on Printers that have only a single colour cartridge instead of separate Cyan, Magenta and Yellow ones.

If you find that the information presented in the channels aren’t correct then post in this thread the following files from your printer at the following address:

http://<PrinterIP>/DevMgmt/ProductUsageDyn.xml
http://<PrinterIP>/DevMgmt/ProductStatusDyn.xml

as well as your printers model number. Some printers Embedded Web Servers won’t return the above links (they will 404) in that case, I’ll need you to browse to the page on your Embedded Web Server that has the Ink/Toner levels displayed on it save the web page to disk (In Chrome, go to the 3 vertical dots menu > More Tools > Save Webpage As…) and link the file here so that I can investigate adding support for your printer.

The WIP code is up at https://github.com/Cossey/openhab2-addons/tree/Add-HPPrinter.


(Vincent Regaud) #2

YES, always
Any new bindings welcome

I have an HP Deskjet 2620
https://PrinterIP/DevMgmt/ProductUsageDyn.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--THIS DATA SUBJECT TO DISCLAIMER(S) INCLUDED WITH THE PRODUCT OF ORIGIN.-->
<pudyn:ProductUsageDyn xsi:schemaLocation="http://www.hp.com/schemas/imaging/con/ledm/productusagedyn/2007/12/11 ../schemas/ProductUsageDyn.xsd" xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" xmlns:dd2="http://www.hp.com/schemas/imaging/con/dictionaries/2008/10/10" xmlns:pudyn="http://www.hp.com/schemas/imaging/con/ledm/productusagedyn/2007/12/11" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<dd:Version>
		<dd:Revision>SVN-IPG-LEDM.119</dd:Revision>
		<dd:Date>2010-08-31</dd:Date>
	</dd:Version>
	<pudyn:PrinterSubunit>
		<dd:TotalImpressions PEID="5082">526</dd:TotalImpressions>
		<dd:JamEvents PEID="16076">2</dd:JamEvents>
		<dd:MispickEvents>21</dd:MispickEvents>
		<dd:TotalFrontPanelCancelPresses PEID="30033">37</dd:TotalFrontPanelCancelPresses>
		<pudyn:UsageByMarkingAgent>
			<dd2:CumulativeMarkingAgentUsed PEID="64100">
				<dd:ValueFloat>24</dd:ValueFloat>
				<dd:Unit>milliliters</dd:Unit>
			</dd2:CumulativeMarkingAgentUsed>
			<dd2:CumulativeHPMarkingAgentUsed PEID="64101">
				<dd:ValueFloat>24</dd:ValueFloat>
				<dd:Unit>milliliters</dd:Unit>
			</dd2:CumulativeHPMarkingAgentUsed>
			<dd:CumulativeHPMarkingAgentInserted PEID="64001">
				<dd:ValueFloat>35</dd:ValueFloat>
				<dd:Unit>milliliters</dd:Unit>
			</dd:CumulativeHPMarkingAgentInserted>
		</pudyn:UsageByMarkingAgent>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>na_executive_7.25x10.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5087">516</dd:TotalImpressions>
			<dd:MediaSizeName>na_letter_8.5x11in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>na_legal_8.5x14in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5086">0</dd:TotalImpressions>
			<dd:MediaSizeName>na_govt-letter_8x10in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>na_invoice_5.5x8.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>iso_a5_148x210mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5087">516</dd:TotalImpressions>
			<dd:MediaSizeName>iso_a4_210x297mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>custom</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>jis_b5_182x257mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>jpn_hagaki_100x148mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>iso_a6_105x148mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5084">8</dd:TotalImpressions>
			<dd:MediaSizeName>na_index-4x6_4x6in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>na_index-5x8_5x8in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>na_index-3x5_3x5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>na_monarch_3.875x7.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>na_number-10_4.125x9.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>iso_dl_110x220mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>iso_c5_162x229mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>iso_c6_114x162mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>na_a2_4.375x5.75in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>jpn_chou3_120x235mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>jpn_chou4_90x205mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>om_photo_89x127mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5085">1</dd:TotalImpressions>
			<dd:MediaSizeName>custom_photo-2l-size-card_127x178mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5085">1</dd:TotalImpressions>
			<dd:MediaSizeName>na_5x7_5x7in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5114">0</dd:TotalImpressions>
			<dd:MediaSizeName>custom_photo_4x5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MediaSizeName>na_personal_3.625x6.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>jpn_oufuku-rot_148x200mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>iso_b5_176x250mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>om_small-photo_100x150mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MediaSizeName>na_foolscap_8.5x13in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMediaType>
			<dd:TotalImpressions PEID="5003">533</dd:TotalImpressions>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5048">251</dd:TotalImpressions>
				<dd:PagesPerJob>one</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5049">22</dd:TotalImpressions>
				<dd:PagesPerJob>two</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5050">20</dd:TotalImpressions>
				<dd:PagesPerJob>threeToFive</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5051">16</dd:TotalImpressions>
				<dd:PagesPerJob>sixToTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5052">2</dd:TotalImpressions>
				<dd:PagesPerJob>greaterThanTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByQuality>
				<dd:NormalImpressions PEID="5041">482</dd:NormalImpressions>
				<dd:DraftImpressions PEID="5042">49</dd:DraftImpressions>
				<dd:BetterImpressions PEID="5043">2</dd:BetterImpressions>
			</dd:UsageByQuality>
			<dd:MediaType>plain</dd:MediaType>
		</pudyn:UsageByMediaType>
		<pudyn:UsageByMediaType>
			<dd:TotalImpressions PEID="5004">12</dd:TotalImpressions>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5053">12</dd:TotalImpressions>
				<dd:PagesPerJob>one</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5054">0</dd:TotalImpressions>
				<dd:PagesPerJob>two</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5055">0</dd:TotalImpressions>
				<dd:PagesPerJob>threeToFive</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5056">0</dd:TotalImpressions>
				<dd:PagesPerJob>sixToTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5057">0</dd:TotalImpressions>
				<dd:PagesPerJob>greaterThanTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByQuality>
				<dd:NormalImpressions PEID="5044">0</dd:NormalImpressions>
				<dd:BetterImpressions PEID="5046">12</dd:BetterImpressions>
			</dd:UsageByQuality>
			<dd:MediaType>photoStandard</dd:MediaType>
		</pudyn:UsageByMediaType>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39000">170</dd:JobCount>
			<dd:JobDuration>lessthanTwoMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39001">22</dd:JobCount>
			<dd:JobDuration>twoToFiveMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39002">20</dd:JobCount>
			<dd:JobDuration>fiveToThirtyMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39003">9</dd:JobCount>
			<dd:JobDuration>thirtyToSixtyMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39004">12</dd:JobCount>
			<dd:JobDuration>oneToSixHours</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39005">6</dd:JobCount>
			<dd:JobDuration>sixHoursToOneDay</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39006">7</dd:JobCount>
			<dd:JobDuration>oneToThreeDays</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39007">4</dd:JobCount>
			<dd:JobDuration>threeToSevenDays</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39008">1</dd:JobCount>
			<dd:JobDuration>sevenDaysToOneMonth</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39009">0</dd:JobCount>
			<dd:JobDuration>oneToThreeMonths</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:EWSAccessCount PEID="16081">131086</dd:EWSAccessCount>
		<dd:NetworkImpressions PEID="25000">29</dd:NetworkImpressions>
		<dd:WirelessNetworkImpressions PEID="25002">29</dd:WirelessNetworkImpressions>
		<pudyn:SubscriptionImpressions>406</pudyn:SubscriptionImpressions>
		<pudyn:QuietModeImpressions><pudyn:TotalImpressions PEID='5107'>314</pudyn:TotalImpressions></pudyn:QuietModeImpressions>
		<pudyn:UsageByConsumableSubscription>
			<pudyn:TrialEnrolledImpressions>108</pudyn:TrialEnrolledImpressions>
			<pudyn:TrialUnenrolledImpressions>10</pudyn:TrialUnenrolledImpressions>
		</pudyn:UsageByConsumableSubscription>
		<pudyn:UsageByDataPath>
			<pudyn:ImpressionsByDataPathID>
				<dd:TotalImpressions PEID="36030">0</dd:TotalImpressions>
				<pudyn:DataPathID>googleLocal</pudyn:DataPathID>
			</pudyn:ImpressionsByDataPathID>
			<pudyn:ImpressionsByDataPathID>
				<dd:TotalImpressions PEID="36029">0</dd:TotalImpressions>
				<pudyn:DataPathID>googleCloud</pudyn:DataPathID>
			</pudyn:ImpressionsByDataPathID>
		</pudyn:UsageByDataPath>
	</pudyn:PrinterSubunit>
	<pudyn:ConsumableSubunit>
		<pudyn:Consumable>
			<dd:ConsumableStation>0</dd:ConsumableStation>
			<dd:MarkerColor>CyanMagentaYellow</dd:MarkerColor>
			<dd:ConsumableTypeEnum>inkCartridge</dd:ConsumableTypeEnum>
			<dd2:CumulativeConsumableCount>2</dd2:CumulativeConsumableCount>
			<dd2:CumulativeMarkingAgentUsed PEID="64104">
				<dd:ValueFloat>11</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeMarkingAgentUsed>
			<dd:ConsumableRawPercentageLevelRemaining>29</dd:ConsumableRawPercentageLevelRemaining>
			<dd:PVPCartridgeCounter PEID="28025">0</dd:PVPCartridgeCounter>
			<dd:PVPCartridgeCounter PEID="28026">0</dd:PVPCartridgeCounter>
			<dd:PVPCartridgeCounter PEID="28027">0</dd:PVPCartridgeCounter>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11001">1423939</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11002">1019518</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11003">1455709</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11057">809458</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11057">809458</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11058">629262</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11059">820537</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11039">0</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>nonHPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11070">1746</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>OOISensorFiredDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11015">1287963</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>serviceDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64219">2905277</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64220">1208717440</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64221">702899467</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64222">6300991</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64227">7</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28022">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>1</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64223">1513109943</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64224">2652014160</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64225">3282008099</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64226">338772999</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64228">7</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28023">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>2</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:RefilledCount>
				<dd:CounterfeitRefilledCount PEID="16086">0</dd:CounterfeitRefilledCount>
				<dd:GenuineRefilledCount>0</dd:GenuineRefilledCount>
			</dd:RefilledCount>
			<dd:PenInsertionTriggerSnapshotCounter PEID="28031">208</dd:PenInsertionTriggerSnapshotCounter>
			<dd2:CumulativeHPMarkingAgentUsed PEID="64105">
				<dd:ValueFloat>11</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeHPMarkingAgentUsed>
		</pudyn:Consumable>
		<pudyn:Consumable>
			<dd:ConsumableStation>1</dd:ConsumableStation>
			<dd:MarkerColor>Black</dd:MarkerColor>
			<dd:ConsumableTypeEnum>inkCartridge</dd:ConsumableTypeEnum>
			<dd2:CumulativeConsumableCount>2</dd2:CumulativeConsumableCount>
			<dd2:CumulativeMarkingAgentUsed PEID="64102">
				<dd:ValueFloat>13</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeMarkingAgentUsed>
			<dd:ConsumableRawPercentageLevelRemaining>19</dd:ConsumableRawPercentageLevelRemaining>
			<dd:PVPCartridgeCounter PEID="28024">0</dd:PVPCartridgeCounter>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11000">2325703</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11038">0</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>nonHPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11069">216</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>OOISensorFiredDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11014">698199</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>serviceDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64219">2905277</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64220">1208717440</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64221">702899467</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64222">6300991</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64227">7</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28022">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>1</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64223">1513109943</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64224">2652014160</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64225">3282008099</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64226">338772999</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64228">7</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28023">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>2</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:RefilledCount>
				<dd:CounterfeitRefilledCount PEID="16086">0</dd:CounterfeitRefilledCount>
				<dd:GenuineRefilledCount>0</dd:GenuineRefilledCount>
			</dd:RefilledCount>
			<dd:PenInsertionTriggerSnapshotCounter PEID="28031">208</dd:PenInsertionTriggerSnapshotCounter>
			<dd2:CumulativeHPMarkingAgentUsed PEID="64103">
				<dd:ValueFloat>13</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeHPMarkingAgentUsed>
		</pudyn:Consumable>
	</pudyn:ConsumableSubunit>
	<pudyn:ScannerEngineSubunit>
		<dd:ScanImages PEID="6000">101</dd:ScanImages>
		<pudyn:UsageByScanMediaSize>
			<dd:ScanImages PEID="6000">101</dd:ScanImages>
			<dd:ScanMediaSize>any</dd:ScanMediaSize>
		</pudyn:UsageByScanMediaSize>
		<pudyn:UsageByScanMediaSize>
			<dd:ScanImages PEID="6021">0</dd:ScanImages>
			<dd:ScanMediaSize>na_legal_8.5x14in</dd:ScanMediaSize>
		</pudyn:UsageByScanMediaSize>
		<dd:FlatbedImages>101</dd:FlatbedImages>
	</pudyn:ScannerEngineSubunit>
	<pudyn:CopyApplicationSubunit>
		<dd:TotalImpressions PEID="3019">99</dd:TotalImpressions>
		<dd:ColorImpressions>19</dd:ColorImpressions>
		<dd:MonochromeImpressions>80</dd:MonochromeImpressions>
		<dd:AdfImages>0</dd:AdfImages>
		<dd:FlatbedImages>99</dd:FlatbedImages>
		<pudyn:TotalAdfLegallmages PEID="3027">0</pudyn:TotalAdfLegallmages>
	</pudyn:CopyApplicationSubunit>
	<pudyn:ScanApplicationSubunit>
		<dd:AdfImages>0</dd:AdfImages>
		<dd:FlatbedImages>1</dd:FlatbedImages>
		<dd:ScanToHostImages PEID="6001">1</dd:ScanToHostImages>
	</pudyn:ScanApplicationSubunit>
	<pudyn:PrintApplicationSubunit>
		<dd:TotalImpressions PEID="7009">442</dd:TotalImpressions>
		<dd:PhotoImpressions PEID="7002">12</dd:PhotoImpressions>
		<dd:MediaSize_4x6in_10x15cm_Impressions PEID="7006">8</dd:MediaSize_4x6in_10x15cm_Impressions>
		<dd:CloudPrintImpressions PEID="36016">2</dd:CloudPrintImpressions>
	</pudyn:PrintApplicationSubunit>
	<pudyn:PonyExpressSubunit>
		<pudyn:PECounter PEID="5000">532</pudyn:PECounter>
		<pudyn:PECounter PEID="5033">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5031">8</pudyn:PECounter>
		<pudyn:PECounter PEID="5032">1</pudyn:PECounter>
		<pudyn:PECounter PEID="5037">534</pudyn:PECounter>
		<pudyn:PECounter PEID="5011">0</pudyn:PECounter>
		<pudyn:PECounter PEID="3001">80</pudyn:PECounter>
		<pudyn:PECounter PEID="5106">131</pudyn:PECounter>
		<pudyn:PECounter PEID="5105">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5108">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5109">0</pudyn:PECounter>
		<pudyn:PECounter PEID="64106">23800</pudyn:PECounter>
		<pudyn:PECounter PEID="64107">12900</pudyn:PECounter>
		<pudyn:PECounter PEID="64108">12900</pudyn:PECounter>
		<pudyn:PECounter PEID="64109">10900</pudyn:PECounter>
		<pudyn:PECounter PEID="64110">10900</pudyn:PECounter>
		<pudyn:PECounter PEID="5110">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5111">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5112">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5113">0</pudyn:PECounter>
		<pudyn:PECounter PEID="3026">0</pudyn:PECounter>
	</pudyn:PonyExpressSubunit>
	<pudyn:MobileApplicationSubunit>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36024">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>ePrint</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36025">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>inOS</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36026">19</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>discrete</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36028">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>UniversalPrintDriver</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36027">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>OSX</pudyn:RemoteDeviceType>
			<pudyn:DriverType>inOS</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36023">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>samsung</pudyn:RemoteDeviceType>
		</pudyn:TotalUsage>
		<pudyn:DocumentUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36017">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>OSX</pudyn:RemoteDeviceType>
		</pudyn:DocumentUsage>
		<pudyn:DocumentUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36018">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>iOS</pudyn:RemoteDeviceType>
		</pudyn:DocumentUsage>
		<pudyn:DocumentUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36021">35</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Android</pudyn:RemoteDeviceType>
		</pudyn:DocumentUsage>
		<pudyn:PhotoUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36019">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>OSX</pudyn:RemoteDeviceType>
		</pudyn:PhotoUsage>
		<pudyn:PhotoUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36020">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>iOS</pudyn:RemoteDeviceType>
		</pudyn:PhotoUsage>
		<pudyn:PhotoUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36022">14</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Android</pudyn:RemoteDeviceType>
		</pudyn:PhotoUsage>
	</pudyn:MobileApplicationSubunit>
</pudyn:ProductUsageDyn>

https://PrinterIP/DevMgmt/ProductStatusDyn.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- THIS DATA SUBJECT TO DISCLAIMER(S) INCLUDED WITH THE PRODUCT OF ORIGIN. -->
<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/ ../schemas/dd/DataDictionaryMasterLEDM.xsd http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31 ../schemas/AlertDetails.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31 ../schemas/ProductStatusCategories.xsd http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31 ../schemas/LocalizationIds.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31 ../schemas/ProductStatusDyn.xsd">
	<dd:Version>
		<dd:Revision>SVN-IPG-LEDM.216</dd:Revision>
		<dd:Date>2011-02-08</dd:Date>
	</dd:Version>
	<psdyn:Status>
		<pscat:StatusCategory>ready</pscat:StatusCategory>
		<locid:StringId>65638</locid:StringId>
	</psdyn:Status>
	<psdyn:AlertTable>
		<dd:ModificationNumber>0</dd:ModificationNumber>
	</psdyn:AlertTable>
</psdyn:ProductStatusDyn>

(Vincent Regaud) #3

In the mean time you can publish the binding through the market place


(Hakan Tandogan) #4

Actually, you should create a pull request just (and maybe mark it as [WIP]), just so you fetch the attention of more developers who in turn can give you hints as to in which places the code could be improved.

Very quick findings:

  • in addons/pom.xml, please put your addition into the alphabetically correct position
  • in feature/src/…/feature.xml, add your binding (again, alphabetically correct)
  • and the README.md could use a bit of love :smile:

Apart from that, nicely done, welcome to the openHAB developer team :smile:


(Vincent Regaud) #5

In the mean time, with the discovery of these xml files I have added my ink levels to openHAB via node-red:

[
    {
        "id": "8b5a1e1b.91fd98",
        "type": "tab",
        "label": "Printer",
        "disabled": false,
        "info": ""
    },
    {
        "id": "b5fcce0e.46549",
        "type": "inject",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 480,
        "y": 120,
        "wires": [
            [
                "855acd63.e9724"
            ]
        ]
    },
    {
        "id": "855acd63.e9724",
        "type": "http request",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "method": "GET",
        "ret": "txt",
        "url": "http://192.168.0.36/DevMgmt/ProductUsageDyn.xml",
        "tls": "",
        "x": 650,
        "y": 60,
        "wires": [
            [
                "99627161.7acd3"
            ]
        ]
    },
    {
        "id": "99627161.7acd3",
        "type": "xml",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "property": "payload",
        "attr": "",
        "chr": "",
        "x": 130,
        "y": 300,
        "wires": [
            [
                "cf0ca789.668b3"
            ]
        ]
    },
    {
        "id": "cf0ca789.668b3",
        "type": "function",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "func": "var msg1 = { payload:msg.payload['pudyn:ProductUsageDyn'] };\nmsg1.payload = msg1.payload['pudyn:ConsumableSubunit'][0]\nmsg1.payload = msg1.payload['pudyn:Consumable'][0];\nmsg1.payload = msg1.payload['dd:ConsumableRawPercentageLevelRemaining'][0];\n\nvar msg2 = { payload:msg.payload['pudyn:ProductUsageDyn'] };\nmsg2.payload = msg2.payload['pudyn:ConsumableSubunit'][0]\nmsg2.payload = msg2.payload['pudyn:Consumable'][1];\nmsg2.payload = msg2.payload['dd:ConsumableRawPercentageLevelRemaining'][0];\n\n\n//msg.payload = Object.keys(msg.payload);\nreturn [ msg1, msg2 ];\n\n/*\nvar msg1 = { payload:\"first out of output 1\" };\nvar msg2 = { payload:\"second out of output 1\" };\nvar msg3 = { payload:\"third out of output 1\" };\nvar msg4 = { payload:\"only message from output 2\" };\nreturn [ [ msg1, msg2, msg3 ], msg4 ];\n*/",
        "outputs": 2,
        "noerr": 0,
        "x": 290,
        "y": 300,
        "wires": [
            [
                "ee7891a6.598878"
            ],
            [
                "6d345b58.99701c"
            ]
        ]
    },
    {
        "id": "ee7891a6.598878",
        "type": "openhab2-out",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "controller": "c022f913.0793f",
        "itemname": "Printer_ColorRemaining",
        "topic": "ItemUpdate",
        "payload": "",
        "x": 550,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "6d345b58.99701c",
        "type": "openhab2-out",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "controller": "c022f913.0793f",
        "itemname": "Printer_BlackRemaining",
        "topic": "ItemUpdate",
        "payload": "",
        "x": 550,
        "y": 320,
        "wires": [
            []
        ]
    },
    {
        "id": "7ba6a66d.899408",
        "type": "openhab2-in",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "controller": "c022f913.0793f",
        "itemname": "Printer_Online",
        "x": 140,
        "y": 60,
        "wires": [
            [
                "2c1eef8e.e0f4f"
            ],
            []
        ]
    },
    {
        "id": "e1a0b107.cdca3",
        "type": "function",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "func": "if (msg.payload == 'ON') {\n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "x": 490,
        "y": 60,
        "wires": [
            [
                "855acd63.e9724"
            ]
        ]
    },
    {
        "id": "2c1eef8e.e0f4f",
        "type": "delay",
        "z": "8b5a1e1b.91fd98",
        "name": "",
        "pauseType": "delay",
        "timeout": "30",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 340,
        "y": 60,
        "wires": [
            [
                "e1a0b107.cdca3"
            ]
        ]
    },
    {
        "id": "c022f913.0793f",
        "type": "openhab2-controller",
        "z": "",
        "name": "Openhab",
        "protocol": "http",
        "host": "localhost",
        "port": "8080",
        "path": "",
        "username": "",
        "password": ""
    }
]

openHAB items:

Group Printer
Number:Dimensionless Printer_ColorRemaining "Color Remaining [%d %%]" (Printer) // Updated via node-red
Number:Dimensionless Printer_BlackRemaining "Black Remaining [%d %%]" (Printer) // Updated via node-red

RESULT


(Stewart Cossey) #6

Thanks heaps Hakan, I will definitely rectify those aforementioned items.


(Stewart Cossey) #7

For anyone curious as to how I have mine on habPanel

Here’s some information for how I have implemented the above (does not presently use my binding):

Configs and Rules

http.cfg

hppages.url=http://<PrinterIP>/DevMgmt/ProductUsageDyn.xml
hppages.updateInterval=20000
hpstatus.url=http://<PrinterIP>/DevMgmt/ProductStatusDyn.xml
hpstatus.updateInterval=5000

HP.items

String hp_office_page_c "Total Page Count [%s page(s)]" {http="<[hppages:20000:XSLT(TotalPageCount.xsl)]" }
String hp_office_page_colour_c "Total Colour Page Count [%s page(s)]" {http="<[hppages:20000:XSLT(TotalColourPageCount.xsl)]" }
String hp_office_page_bw_c "Total Monochrome Page Count [%s page(s)]" {http="<[hppages:20000:XSLT(TotalBWPageCount.xsl)]" }
String hp_office_page_jam_c "Total Jam Count [%s page(s)]" {http="<[hppages:20000:XSLT(TotalJamCount.xsl)]" }

String hp_office_ink_B_p "Black Ink Level [%s%%]" {http="<[hppages:20000:XSLT(InkBlackPercentRemain.xsl)]" }
String hp_office_ink_C_p "Cyan Ink Level [%s%%]" {http="<[hppages:20000:XSLT(InkCyanPercentRemain.xsl)]" }
String hp_office_ink_M_p "Magenta Ink Level [%s%%]" {http="<[hppages:20000:XSLT(InkMagentaPercentRemain.xsl)]" }
String hp_office_ink_Y_p "Yellow Ink Level [%s%%]" {http="<[hppages:20000:XSLT(InkYellowPercentRemain.xsl)]" }

String hp_office_scan_flatbed_ct "Flatbed Scan Count [%s page(s)]" {http="<[hppages:20000:XSLT(TotalFlatbedScanCount.xsl)]" }
String hp_office_scan_adf_ct "Document Feeder Scan Count [%s page(s)]"  {http="<[hppages:20000:XSLT(TotalADFScanCount.xsl)]" }

String hp_office_printstatus "Printer Status [%s]" {http="<[hpstatus:5000:XSLT(PrinterStatus.xsl)]" }
Switch hp_office_restartprinter "Restart Printer"

HP.rules

rule "restart printer"
when
    Item hp_office_restartprinter changed to ON
then
    executeCommandLine("wget --http-user admin --http-password adminpassword --no-check-certificate --method PUT https://192.168.1.48/ProductActions/PowerCycle")
    hp_office_restartprinter.sendCommand(OFF)
end

I had to use wget here because the HTTP binding does not support PUT requests which the printer requires for that URL.

The openHAB Docker Container only comes with wget, not cURL.

XSL files

Black Ink Level Example

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" 
xmlns:dd2="http://www.hp.com/schemas/imaging/con/dictionaries/2008/10/10" xmlns:pudyn="http://www.hp.com/schemas/imaging/con/ledm/productusagedyn/2007/12/11" >
<xsl:output indent="yes" method="text" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:value-of select="/pudyn:ProductUsageDyn/pudyn:ConsumableSubunit/pudyn:Consumable[starts-with(dd:MarkerColor,'Black')]/dd:ConsumableRawPercentageLevelRemaining"/>
</xsl:template>
</xsl:stylesheet>

Printer Status

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" 
xmlns:psdyn="http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31"  xmlns:pscat="http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31" >
<xsl:output indent="yes" method="text" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:variable name="status" select="/psdyn:ProductStatusDyn/psdyn:Status[not(pscat:StatusCategory = 'genuineHP')]/pscat:StatusCategory" />
<xsl:choose>
      <xsl:when test="$status = 'inPowerSave'">
Power Save
     </xsl:when>
      <xsl:when test="$status = 'ready'">
Ready
     </xsl:when>
      <xsl:when test="$status = 'processing'">
Processing
     </xsl:when>
      <xsl:when test="$status = 'closeDoorOrCover'">
Door Open
     </xsl:when>
	   <xsl:when test="$status = 'inkSystemInitializing'">
Loading Ink
     </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$status" />
      </xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

Total Colour Page Count

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" 
xmlns:dd2="http://www.hp.com/schemas/imaging/con/dictionaries/2008/10/10" xmlns:pudyn="http://www.hp.com/schemas/imaging/con/ledm/productusagedyn/2007/12/11" >
<xsl:output indent="yes" method="text" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:value-of select="/pudyn:ProductUsageDyn/pudyn:PrinterSubunit/dd:ColorImpressions"/>
</xsl:template>
</xsl:stylesheet>

Total Flatbed Scanner Count not shown in above image

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" 
xmlns:dd2="http://www.hp.com/schemas/imaging/con/dictionaries/2008/10/10" xmlns:pudyn="http://www.hp.com/schemas/imaging/con/ledm/productusagedyn/2007/12/11" >
<xsl:output indent="yes" method="text" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:value-of select="/pudyn:ProductUsageDyn/pudyn:ScanApplicationSubunit/dd:FlatbedImages"/>
</xsl:template>
</xsl:stylesheet>

The above examples should give most a fair idea on how to use XSL to get what they need - tweak them for the specific information you want to extract from the xml files.

It took me a good few hours to understand the XSL syntax and a bit longer for the status one since I had to convert existing values to something more nicer for display so I hope it might help others here in the community until I can do more work on my add-on.


(Mark Lavercombe) #8

@Cossey
Great job. Any chance you could package it as a jar and we can try it out?


(Stewart Cossey) #9

Sure thing!

Download Link

https://www.dropbox.com/s/tqxc57dgp74026o/org.openhab.binding.hpprinter-2.5.0-SNAPSHOT.jar?dl=0

How to use

You will have to manually add the binding from Paper UI Inbox screen, it’s called HP Printer Binding and then select the only option in there for now, the HP OfficeJet Pro 8710 and then specify the network address of your printer under the configuration. Your printer won’t have to be the same model as this, as long as the URL of the XML and the xml markup is the same you’ll be all good.

I was considering following the same approach as the Onkyo binding, which will list a whole bunch of different HP printers that it supported. I figure that some older models may have different URLs for the XML/Data markup may be different and support different channels (i.e: monochrome printers, scanners, etc).

Note: that this is still work-in-progress and still needs some better error handling and offline detection.

  • If it works for you, could you tell me your printer model?
  • If it doesn’t, can you jump on your printer’s embedded web server and use Chromes Developer Tools to see what XHR requests it makes to pages that may have the ink levels and other information and let me know the URLs and the content of those URLs.

Thanks heaps!


(Laurens Jan Merkx) #10

My HP Envy photo 6200 doesn’t work.
This is the output of DevMgmt/ProductUsageDyn.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!--THIS DATA SUBJECT TO DISCLAIMER(S) INCLUDED WITH THE PRODUCT OF ORIGIN.-->
<pudyn:ProductUsageDyn xsi:schemaLocation="http://www.hp.com/schemas/imaging/con/ledm/productusagedyn/2007/12/11 ../schemas/ProductUsageDyn.xsd" xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" xmlns:dd2="http://www.hp.com/schemas/imaging/con/dictionaries/2008/10/10" xmlns:pudyn="http://www.hp.com/schemas/imaging/con/ledm/productusagedyn/2007/12/11" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<dd:Version>
		<dd:Revision>SVN-IPG-LEDM.119</dd:Revision>
		<dd:Date>2010-08-31</dd:Date>
	</dd:Version>
	<pudyn:PrinterSubunit>
		<dd:TotalImpressions PEID="5082">98</dd:TotalImpressions>
		<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
		<dd:ColorImpressions>73</dd:ColorImpressions>
		<dd:A4EquivalentImpressions>
			<dd:TotalImpressions PEID="5082">98</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
		</dd:A4EquivalentImpressions>
		<dd:SimplexSheets>87</dd:SimplexSheets>
		<dd:DuplexSheets PEID="5088">5</dd:DuplexSheets>
		<dd:JamEvents PEID="16076">0</dd:JamEvents>
		<dd:MispickEvents>8</dd:MispickEvents>
		<dd:TotalFrontPanelCancelPresses PEID="30033">0</dd:TotalFrontPanelCancelPresses>
		<pudyn:UsageByMarkingAgent>
			<dd2:CumulativeMarkingAgentUsed PEID="64100">
				<dd:ValueFloat>5</dd:ValueFloat>
				<dd:Unit>milliliters</dd:Unit>
			</dd2:CumulativeMarkingAgentUsed>
			<dd2:CumulativeHPMarkingAgentUsed PEID="64101">
				<dd:ValueFloat>5</dd:ValueFloat>
				<dd:Unit>milliliters</dd:Unit>
			</dd2:CumulativeHPMarkingAgentUsed>
			<dd:CumulativeHPMarkingAgentInserted PEID="64001">
				<dd:ValueFloat>12</dd:ValueFloat>
				<dd:Unit>milliliters</dd:Unit>
			</dd:CumulativeHPMarkingAgentInserted>
		</pudyn:UsageByMarkingAgent>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_executive_7.25x10.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5087">95</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_letter_8.5x11in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5086">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_govt-letter_8x10in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_invoice_5.5x8.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>iso_a5_148x210mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5087">95</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>iso_a4_210x297mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>jis_b5_182x257mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>jpn_hagaki_100x148mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>iso_a6_105x148mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5084">2</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_index-4x6_4x6in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_index-5x8_5x8in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_monarch_3.875x7.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_number-10_4.125x9.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>iso_dl_110x220mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>iso_c5_162x229mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>iso_c6_114x162mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_a2_4.375x5.75in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>jpn_chou3_120x235mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>jpn_chou4_90x205mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5085">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_5x7_5x7in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5085">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>custom_photo-2l-size-card_127x178mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5083">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>na_personal_3.625x6.5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>jpn_oufuku-rot_148x200mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>iso_b5_176x250mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions>0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>om_small-photo_100x150mm</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMedia>
			<dd:TotalImpressions PEID="5114">0</dd:TotalImpressions>
			<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			<dd:MediaSizeName>custom_photo_4x5in</dd:MediaSizeName>
		</pudyn:UsageByMedia>
		<pudyn:UsageByMediaType>
			<dd:TotalImpressions PEID="5115">95</dd:TotalImpressions>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5048">51</dd:TotalImpressions>
				<dd:PagesPerJob>one</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5049">12</dd:TotalImpressions>
				<dd:PagesPerJob>two</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5050">5</dd:TotalImpressions>
				<dd:PagesPerJob>threeToFive</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5051">0</dd:TotalImpressions>
				<dd:PagesPerJob>sixToTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5052">0</dd:TotalImpressions>
				<dd:PagesPerJob>greaterThanTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByQuality>
				<dd:NormalImpressions PEID="5041">88</dd:NormalImpressions>
				<dd:DraftImpressions PEID="5042">0</dd:DraftImpressions>
				<dd:BetterImpressions PEID="5043">6</dd:BetterImpressions>
			</dd:UsageByQuality>
			<dd:MediaType>plain</dd:MediaType>
		</pudyn:UsageByMediaType>
		<pudyn:UsageByMediaType>
			<dd:TotalImpressions PEID="5116">3</dd:TotalImpressions>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5053">3</dd:TotalImpressions>
				<dd:PagesPerJob>one</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5054">0</dd:TotalImpressions>
				<dd:PagesPerJob>two</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5055">0</dd:TotalImpressions>
				<dd:PagesPerJob>threeToFive</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5056">0</dd:TotalImpressions>
				<dd:PagesPerJob>sixToTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByJobSize>
				<dd:TotalImpressions PEID="5057">0</dd:TotalImpressions>
				<dd:PagesPerJob>greaterThanTen</dd:PagesPerJob>
			</dd:UsageByJobSize>
			<dd:UsageByQuality>
				<dd:NormalImpressions PEID="5044">2</dd:NormalImpressions>
				<dd:BetterImpressions PEID="5046">1</dd:BetterImpressions>
			</dd:UsageByQuality>
			<dd:MediaType>photoStandard</dd:MediaType>
		</pudyn:UsageByMediaType>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39000">49</dd:JobCount>
			<dd:JobDuration>lessthanTwoMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39001">3</dd:JobCount>
			<dd:JobDuration>twoToFiveMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39002">5</dd:JobCount>
			<dd:JobDuration>fiveToThirtyMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39003">6</dd:JobCount>
			<dd:JobDuration>thirtyToSixtyMinutes</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39004">2</dd:JobCount>
			<dd:JobDuration>oneToSixHours</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39005">2</dd:JobCount>
			<dd:JobDuration>sixHoursToOneDay</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39006">2</dd:JobCount>
			<dd:JobDuration>oneToThreeDays</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39007">3</dd:JobCount>
			<dd:JobDuration>threeToSevenDays</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39008">4</dd:JobCount>
			<dd:JobDuration>sevenDaysToOneMonth</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<dd:UsageByTimeInterval>
			<dd:JobCount PEID="39009">0</dd:JobCount>
			<dd:JobDuration>oneToThreeMonths</dd:JobDuration>
		</dd:UsageByTimeInterval>
		<pudyn:UIButtonPressCounters>
			<dd:ButtonPressCount PEID="30035">0</dd:ButtonPressCount>
			<dd:ButtonPressOptions>editPhotoButtonPress</dd:ButtonPressOptions>
		</pudyn:UIButtonPressCounters>
		<pudyn:UIButtonPressCounters>
			<dd:ButtonPressCount PEID="30054">0</dd:ButtonPressCount>
			<dd:ButtonPressOptions>featurePrintOptionPress</dd:ButtonPressOptions>
		</pudyn:UIButtonPressCounters>
		<pudyn:UIButtonPressCounters>
			<dd:ButtonPressCount PEID="30053">0</dd:ButtonPressCount>
			<dd:ButtonPressOptions>featureViewOptionPress</dd:ButtonPressOptions>
		</pudyn:UIButtonPressCounters>
		<pudyn:UIButtonPressCounters>
			<dd:ButtonPressCount PEID="30039">0</dd:ButtonPressCount>
			<dd:ButtonPressOptions>startScanButtonPress</dd:ButtonPressOptions>
		</pudyn:UIButtonPressCounters>
		<pudyn:UsageByTrayAndMedia>
			<dd:TotalImpressions PEID="5028">0</dd:TotalImpressions>
			<dd:MediaSizeName>custom_or_other</dd:MediaSizeName>
			<dd:InputBin>PhotoTray</dd:InputBin>
		</pudyn:UsageByTrayAndMedia>
		<dd:EWSAccessCount PEID="16081">5</dd:EWSAccessCount>
		<dd:NetworkImpressions PEID="25000">77</dd:NetworkImpressions>
		<dd:WirelessNetworkImpressions PEID="25002">77</dd:WirelessNetworkImpressions>
		<pudyn:SubscriptionImpressions>0</pudyn:SubscriptionImpressions>
		<pudyn:WirelessConfigUserSelectedOption PEID="30064">noSelectionMade</pudyn:WirelessConfigUserSelectedOption>
		<pudyn:QuietModeImpressions><pudyn:TotalImpressions PEID='5107'>4</pudyn:TotalImpressions></pudyn:QuietModeImpressions>
		<pudyn:UsageByConsumableSubscription>
			<pudyn:TrialEnrolledImpressions>0</pudyn:TrialEnrolledImpressions>
			<pudyn:TrialUnenrolledImpressions>98</pudyn:TrialUnenrolledImpressions>
		</pudyn:UsageByConsumableSubscription>
		<pudyn:UsageByDataPath>
			<pudyn:ImpressionsByDataPathID>
				<dd:TotalImpressions PEID="36030">0</dd:TotalImpressions>
				<pudyn:DataPathID>googleLocal</pudyn:DataPathID>
			</pudyn:ImpressionsByDataPathID>
			<pudyn:ImpressionsByDataPathID>
				<dd:TotalImpressions PEID="36029">0</dd:TotalImpressions>
				<pudyn:DataPathID>googleCloud</pudyn:DataPathID>
			</pudyn:ImpressionsByDataPathID>
		</pudyn:UsageByDataPath>
		<pudyn:CalibrationUsage>
			<pudyn:SuccessCount PEID="30071">3</pudyn:SuccessCount>
			<pudyn:FailureCount PEID="30072">2</pudyn:FailureCount>
			<pudyn:CancelledCount PEID="30073">0</pudyn:CancelledCount>
			<pudyn:SkippedCount PEID="30074">0</pudyn:SkippedCount>
			<pudyn:Status PEID="30075">completed</pudyn:Status>
		</pudyn:CalibrationUsage>
		<pudyn:OOBESetupBy>
			<pudyn:SetupByOS PEID="36033">iOS</pudyn:SetupByOS>
			<pudyn:SetupByApp PEID="36034">Aio-iOS</pudyn:SetupByApp>
		</pudyn:OOBESetupBy>
	</pudyn:PrinterSubunit>
	<pudyn:ConsumableSubunit>
		<pudyn:Consumable>
			<dd:ConsumableStation>0</dd:ConsumableStation>
			<dd:MarkerColor>CyanMagentaYellow</dd:MarkerColor>
			<dd:ConsumableTypeEnum>inkCartridge</dd:ConsumableTypeEnum>
			<dd2:CumulativeConsumableCount>1</dd2:CumulativeConsumableCount>
			<dd2:CumulativeMarkingAgentUsed PEID="64104">
				<dd:ValueFloat>2</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeMarkingAgentUsed>
			<dd:A4EquivalentImpressions>
				<dd:TotalImpressions>0</dd:TotalImpressions>
				<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			</dd:A4EquivalentImpressions>
			<dd:ConsumableRawPercentageLevelRemaining>2</dd:ConsumableRawPercentageLevelRemaining>
			<dd:PVPCartridgeCounter PEID="28025">0</dd:PVPCartridgeCounter>
			<dd:PVPCartridgeCounter PEID="28026">0</dd:PVPCartridgeCounter>
			<dd:PVPCartridgeCounter PEID="28027">0</dd:PVPCartridgeCounter>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11001">301262</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11002">278600</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11003">319888</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11057">164776</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11057">164776</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11058">162488</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11059">171190</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>LDWDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11039">0</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>nonHPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11070">0</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>OOISensorFiredDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11015">893068</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>serviceDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64219">525111129</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64220">136514690</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64221">1906684864</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64222">141060</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64227">6</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28022">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>1</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64223">307313205</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64224">23938</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64225">4236187778</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64226">16371</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64228">5</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28023">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>2</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:RefilledCount>
				<dd:CounterfeitRefilledCount PEID="16086">0</dd:CounterfeitRefilledCount>
				<dd:GenuineRefilledCount>0</dd:GenuineRefilledCount>
			</dd:RefilledCount>
			<dd:PenInsertionTriggerSnapshotCounter PEID="28031">3</dd:PenInsertionTriggerSnapshotCounter>
			<dd2:CumulativeHPMarkingAgentUsed PEID="64105">
				<dd:ValueFloat>2</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeHPMarkingAgentUsed>
		</pudyn:Consumable>
		<pudyn:Consumable>
			<dd:ConsumableStation>1</dd:ConsumableStation>
			<dd:MarkerColor>Black</dd:MarkerColor>
			<dd:ConsumableTypeEnum>inkCartridge</dd:ConsumableTypeEnum>
			<dd2:CumulativeConsumableCount>2</dd2:CumulativeConsumableCount>
			<dd2:CumulativeMarkingAgentUsed PEID="64102">
				<dd:ValueFloat>3</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeMarkingAgentUsed>
			<dd:A4EquivalentImpressions>
				<dd:TotalImpressions>0</dd:TotalImpressions>
				<dd:MonochromeImpressions>0</dd:MonochromeImpressions>
			</dd:A4EquivalentImpressions>
			<dd:ConsumableRawPercentageLevelRemaining>82</dd:ConsumableRawPercentageLevelRemaining>
			<dd:PVPCartridgeCounter PEID="28024">0</dd:PVPCartridgeCounter>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11000">811261</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>HPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11038">0</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>nonHPDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11069">0</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>OOISensorFiredDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByMarkingAgentCount>
				<dd:MarkingAgentCount PEID="11014">363317</dd:MarkingAgentCount>
				<dd:MarkingAgentCountType>serviceDropsCount</dd:MarkingAgentCountType>
			</dd:UsageByMarkingAgentCount>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64219">525111129</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64220">136514690</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64221">1906684864</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64222">141060</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64227">6</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28022">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>1</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:UsageByPenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64223">307313205</dd:PenStallValue>
					<dd:PenStallValueLocation>zero</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64224">23938</dd:PenStallValue>
					<dd:PenStallValueLocation>one</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64225">4236187778</dd:PenStallValue>
					<dd:PenStallValueLocation>two</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:PenStall>
					<dd:PenStallValue PEID="64226">16371</dd:PenStallValue>
					<dd:PenStallValueLocation>three</dd:PenStallValueLocation>
				</dd:PenStall>
				<dd:TijGenAndVersion PEID="64228">5</dd:TijGenAndVersion>
				<dd:NonHPFlagCounter PEID="28023">0</dd:NonHPFlagCounter>
				<dd:PenStallNumber>2</dd:PenStallNumber>
			</dd:UsageByPenStall>
			<dd:RefilledCount>
				<dd:CounterfeitRefilledCount PEID="16086">0</dd:CounterfeitRefilledCount>
				<dd:GenuineRefilledCount>0</dd:GenuineRefilledCount>
			</dd:RefilledCount>
			<dd:PenInsertionTriggerSnapshotCounter PEID="28031">3</dd:PenInsertionTriggerSnapshotCounter>
			<dd2:CumulativeHPMarkingAgentUsed PEID="64103">
				<dd:ValueFloat>3</dd:ValueFloat>
				<dd:Unit>microliters</dd:Unit>
			</dd2:CumulativeHPMarkingAgentUsed>
		</pudyn:Consumable>
	</pudyn:ConsumableSubunit>
	<pudyn:ScannerEngineSubunit>
		<dd:ScanImages PEID="6000">9</dd:ScanImages>
		<pudyn:UsageByScanMediaSize>
			<dd:ScanImages PEID="6000">9</dd:ScanImages>
			<dd:ScanMediaSize>any</dd:ScanMediaSize>
		</pudyn:UsageByScanMediaSize>
		<pudyn:UsageByScanMediaSize>
			<dd:ScanImages PEID="6021">0</dd:ScanImages>
			<dd:ScanMediaSize>na_legal_8.5x14in</dd:ScanMediaSize>
		</pudyn:UsageByScanMediaSize>
		<dd:FlatbedImages>9</dd:FlatbedImages>
	</pudyn:ScannerEngineSubunit>
	<pudyn:CopyApplicationSubunit>
		<dd:TotalImpressions PEID="3019">5</dd:TotalImpressions>
		<dd:ColorImpressions>1</dd:ColorImpressions>
		<dd:MonochromeImpressions>4</dd:MonochromeImpressions>
		<dd:AdfImages>0</dd:AdfImages>
		<dd:FlatbedImages>5</dd:FlatbedImages>
	</pudyn:CopyApplicationSubunit>
	<pudyn:ScanApplicationSubunit>
		<dd:AdfImages>0</dd:AdfImages>
		<dd:FlatbedImages>2</dd:FlatbedImages>
		<dd:ScanToHostImages PEID="6001">2</dd:ScanToHostImages>
	</pudyn:ScanApplicationSubunit>
	<pudyn:PrintApplicationSubunit>
		<dd:TotalImpressions PEID="7009">90</dd:TotalImpressions>
		<dd:PhotoImpressions PEID="7002">1</dd:PhotoImpressions>
		<dd:MediaSize_4x6in_10x15cm_Impressions PEID="7006">1</dd:MediaSize_4x6in_10x15cm_Impressions>
		<dd:CloudPrintImpressions PEID="36016">8</dd:CloudPrintImpressions>
	</pudyn:PrintApplicationSubunit>
	<pudyn:PonyExpressSubunit>
		<pudyn:PECounter PEID="5000">101</pudyn:PECounter>
		<pudyn:PECounter PEID="5021">6</pudyn:PECounter>
		<pudyn:PECounter PEID="5033">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5031">2</pudyn:PECounter>
		<pudyn:PECounter PEID="5032">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5037">94</pudyn:PECounter>
		<pudyn:PECounter PEID="5011">0</pudyn:PECounter>
		<pudyn:PECounter PEID="3001">4</pudyn:PECounter>
		<pudyn:PECounter PEID="5106">25</pudyn:PECounter>
		<pudyn:PECounter PEID="5105">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5108">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5109">0</pudyn:PECounter>
		<pudyn:PECounter PEID="64106">4500</pudyn:PECounter>
		<pudyn:PECounter PEID="64107">2600</pudyn:PECounter>
		<pudyn:PECounter PEID="64108">2600</pudyn:PECounter>
		<pudyn:PECounter PEID="64109">1900</pudyn:PECounter>
		<pudyn:PECounter PEID="64110">1900</pudyn:PECounter>
		<pudyn:PECounter PEID="5110">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5111">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5112">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5113">0</pudyn:PECounter>
		<pudyn:PECounter PEID="30065">0</pudyn:PECounter>
		<pudyn:PECounter PEID="30066">0</pudyn:PECounter>
		<pudyn:PECounter PEID="30069">1</pudyn:PECounter>
		<pudyn:PECounter PEID="30070">0</pudyn:PECounter>
		<pudyn:PECounter PEID="3026">0</pudyn:PECounter>
		<pudyn:PECounter PEID="5003">94</pudyn:PECounter>
		<pudyn:PECounter PEID="5004">3</pudyn:PECounter>
	</pudyn:PonyExpressSubunit>
	<pudyn:MobileApplicationSubunit>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36024">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>ePrint</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36025">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>inOS</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36026">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>discrete</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36028">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Windows</pudyn:RemoteDeviceType>
			<pudyn:DriverType>UniversalPrintDriver</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36027">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>OSX</pudyn:RemoteDeviceType>
			<pudyn:DriverType>inOS</pudyn:DriverType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36032">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Chrome</pudyn:RemoteDeviceType>
		</pudyn:TotalUsage>
		<pudyn:TotalUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36023">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>samsung</pudyn:RemoteDeviceType>
		</pudyn:TotalUsage>
		<pudyn:DocumentUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36017">7</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>OSX</pudyn:RemoteDeviceType>
		</pudyn:DocumentUsage>
		<pudyn:DocumentUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36018">17</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>iOS</pudyn:RemoteDeviceType>
		</pudyn:DocumentUsage>
		<pudyn:DocumentUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36021">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Android</pudyn:RemoteDeviceType>
		</pudyn:DocumentUsage>
		<pudyn:PhotoUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36019">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>OSX</pudyn:RemoteDeviceType>
		</pudyn:PhotoUsage>
		<pudyn:PhotoUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36020">2</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>iOS</pudyn:RemoteDeviceType>
		</pudyn:PhotoUsage>
		<pudyn:PhotoUsage>
			<pudyn:Counter>
				<pudyn:TotalImpressions PEID="36022">0</pudyn:TotalImpressions>
			</pudyn:Counter>
			<pudyn:RemoteDeviceType>Android</pudyn:RemoteDeviceType>
		</pudyn:PhotoUsage>
	</pudyn:MobileApplicationSubunit>
</pudyn:ProductUsageDyn>

And this from DevMgmt/ProductStatusDyn.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!-- THIS DATA SUBJECT TO DISCLAIMER(S) INCLUDED WITH THE PRODUCT OF ORIGIN. -->
<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/ ../schemas/dd/DataDictionaryMasterLEDM.xsd http://www.hp.com/schemas/imaging/con/ledm/alertdetails/2007/10/31 ../schemas/AlertDetails.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatuscategories/2007/10/31 ../schemas/ProductStatusCategories.xsd http://www.hp.com/schemas/imaging/con/ledm/localizationids/2007/10/31 ../schemas/LocalizationIds.xsd http://www.hp.com/schemas/imaging/con/ledm/productstatusdyn/2007/10/31 ../schemas/ProductStatusDyn.xsd">
	<dd:Version>
		<dd:Revision>SVN-IPG-LEDM.216</dd:Revision>
		<dd:Date>2011-02-08</dd:Date>
	</dd:Version>
	<psdyn:Status>
		<pscat:StatusCategory>genuineHP</pscat:StatusCategory>
		<locid:StringId>65561</locid:StringId>
	</psdyn:Status>
	<psdyn:Status>
		<pscat:StatusCategory>inPowerSave</pscat:StatusCategory>
		<locid:StringId>65640</locid:StringId>
	</psdyn:Status>
	<psdyn:AlertTable>
		<dd:ModificationNumber>42</dd:ModificationNumber>
		<psdyn:Alert>
			<ad:ProductStatusAlertID>genuineHP</ad:ProductStatusAlertID>
			<locid:StringId>65561</locid:StringId>
			<dd:SequenceNumber>21</dd:SequenceNumber>
			<ad:Severity>Info</ad:Severity>
			<ad:AlertPriority>399</ad:AlertPriority>
			<ad:AlertDetails>
				<ad:AlertDetailsMarkerColor>Black</ad:AlertDetailsMarkerColor>
				<ad:AlertDetailsConsumableTypeEnum>inkCartridge</ad:AlertDetailsConsumableTypeEnum>
				<ad:AlertDetailsMarkerLocation>1</ad:AlertDetailsMarkerLocation>
				<ad:AlertDetailsUserAction>acknowledgeConsumableState</ad:AlertDetailsUserAction>
			</ad:AlertDetails>
			<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
			<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
		</psdyn:Alert>
		<psdyn:Alert>
			<ad:ProductStatusAlertID>genuineHP</ad:ProductStatusAlertID>
			<locid:StringId>65851</locid:StringId>
			<dd:SequenceNumber>22</dd:SequenceNumber>
			<ad:Severity>Info</ad:Severity>
			<ad:AlertPriority>399</ad:AlertPriority>
			<ad:AlertDetails>
				<ad:AlertDetailsMarkerColor>CyanMagentaYellow</ad:AlertDetailsMarkerColor>
				<ad:AlertDetailsConsumableTypeEnum>inkCartridge</ad:AlertDetailsConsumableTypeEnum>
				<ad:AlertDetailsMarkerLocation>0</ad:AlertDetailsMarkerLocation>
				<ad:AlertDetailsUserAction>acknowledgeConsumableState</ad:AlertDetailsUserAction>
			</ad:AlertDetails>
			<dd:ResourceURI>/DevMgmt/ConsumableConfigDyn.xml</dd:ResourceURI>
			<dd:ResourceType>ledm:hpLedmConsumableConfigDyn</dd:ResourceType>
		</psdyn:Alert>
	</psdyn:AlertTable>
</psdyn:ProductStatusDyn>

(Stewart Cossey) #11

When you access the EWS, is your connection to it via https or just plain http?

At the moment the connection address specifically builds to HTTPS so I may have to change this for older models.

Thank you for testing and your feedback!


(Vincent Regaud) #12

My printer see above, uses http


(Laurens Jan Merkx) #13

It is https, http doesn’t work


(Stewart Cossey) #14

I’ve updated the binding.

Same link - https://www.dropbox.com/s/tqxc57dgp74026o/org.openhab.binding.hpprinter-2.5.0-SNAPSHOT.jar?dl=0

I added support for both the aforementioned printer models mentioned in this thread. You will have to delete the existing thing, re-add and select your printer model.

I wasn’t doing the scheduling right; now the binding will fetch the values on init and then the usage xml every n seconds based on config. Status xml still fetches every 4 seconds since that’s better to get printer status more close to real time. Additionally, I noticed that both of your models have a single colour print cartridge, so I made sure that was pulled from the xml and pushed on to the newly created colourLevel channel.

I’ve also added the ability for the plugin to handle either http or https connections, depending on the property specified in the thing file for the printer model. Hopefully that will resolve @vzorglub’s connectivity issues since his is http. @ljsquare I’ve made sure your model fetches data over https based on your last message.

The binding might show -NaN % until the values do their first update (which should be immediately after the binding loads, unlike last time where it would wait for the delay before updating values) - I’ll probably need to add in some default values to this if it’s a problem.

Binding still needs some improvement to reliability for checking offline status, it’ll still keep hitting the URLs if you turn off your printer.


(Vincent Regaud) #15

I was going to suggest that and then I saw the last line of your post!!


(Vincent Regaud) #16

I get there, but nothing is either discovered and I can’t add manually


(Stewart Cossey) #17

I still haven’t implemented auto-discovery, I believe these printers use DNS-SD so I’ll need to find a library and learn how to implement, still new to Java so that might take a little bit to get there.

May I ask what issue you are having with trying to add it manually? For the config parameters, in Network Address try specifying just the Printers IP address (don’t include the https:// part).

I tried testing that model against my printer in Paper UI and it seems to work (albeit the colour channel returns -NaN since I have separate colour cartridges).

If you have the time, try turning on DEBUG level logging for the binding and see what error messages you get from karaf.


(Vincent Regaud) #18

There is no ADD MANUALLY option


(Stewart Cossey) #19

Hmmm… okay. I’m still quite new to openHAB myself but in openHAB 2.4 in the Paper UI I have the “Plus” button that appears in either Inbox or the Configuration > Things screens which allows me to manually add stuff. Sorry I believe I said that you’d have to manually add the Binding when the correct term I should have said was to manually add the Thing (although you will have to manually install the binding by dropping it into the openHAB add-ons folder).

If those aren’t present on your version then I’m not too sure; maybe I need to do something extra in my Binding to make it show up that option in openHAB or you might need to update?


(Vincent Regaud) #20

I’ll restart and we’ll see what happens