Bei stöbern im FHEM Forum ist mir gerade ein Beitrag aufgefallen, wo der Ersteller den HP 8620 Drucker hinsichtlich des Druckerpatronenfüllstands überwachen ließ. Das habe ich direkt ausprobiert - funktioniert ;)

Ein paar Anpassungen habe ich durchgeführt:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
defmod BUE_HTM_HP8620_CONSUMABLES HTTPMOD http://hp8620/DevMgmt/ConsumableConfigDyn.xml 3600
attr BUE_HTM_HP8620_CONSUMABLES userattr reading01Name reading01XPath-Strict reading02Name reading02XPath-Strict reading03Name reading03XPath-Strict reading04Name reading04XPath-Strict reading05Name reading05XPath-Strict reading06Name reading06XPath-Strict reading07Name reading07XPath-Strict reading08Name reading08XPath-Strict
attr BUE_HTM_HP8620_CONSUMABLES DbLogExclude .*
attr BUE_HTM_HP8620_CONSUMABLES alias HP 8620 - Tintenfüllstand
attr BUE_HTM_HP8620_CONSUMABLES httpVersion 1.1
attr BUE_HTM_HP8620_CONSUMABLES reading01Name Cyan
attr BUE_HTM_HP8620_CONSUMABLES reading01XPath-Strict //ccdyn:ConsumableInfo[3]/dd:ConsumablePercentageLevelRemaining/text()
attr BUE_HTM_HP8620_CONSUMABLES reading02Name CyanReplaceBy
attr BUE_HTM_HP8620_CONSUMABLES reading02XPath-Strict //ccdyn:ConsumableInfo[3]/dd:ConsumableSelectibilityNumber/text()
attr BUE_HTM_HP8620_CONSUMABLES reading03Name Magenta
attr BUE_HTM_HP8620_CONSUMABLES reading03XPath-Strict //ccdyn:ConsumableInfo[2]/dd:ConsumablePercentageLevelRemaining/text()
attr BUE_HTM_HP8620_CONSUMABLES reading04Name MagentaReplaceBy
attr BUE_HTM_HP8620_CONSUMABLES reading04XPath-Strict //ccdyn:ConsumableInfo[2]/dd:ConsumableSelectibilityNumber/text()
attr BUE_HTM_HP8620_CONSUMABLES reading05Name Yellow
attr BUE_HTM_HP8620_CONSUMABLES reading05XPath-Strict //ccdyn:ConsumableInfo[4]/dd:ConsumablePercentageLevelRemaining/text()
attr BUE_HTM_HP8620_CONSUMABLES reading06Name YellowReplaceBy
attr BUE_HTM_HP8620_CONSUMABLES reading06XPath-Strict //ccdyn:ConsumableInfo[4]/dd:ConsumableSelectibilityNumber/text()
attr BUE_HTM_HP8620_CONSUMABLES reading07Name Black
attr BUE_HTM_HP8620_CONSUMABLES reading07XPath-Strict //ccdyn:ConsumableInfo[5]/dd:ConsumablePercentageLevelRemaining/text()
attr BUE_HTM_HP8620_CONSUMABLES reading08Name BlackReplaceBy
attr BUE_HTM_HP8620_CONSUMABLES reading08XPath-Strict //ccdyn:ConsumableInfo[5]/dd:ConsumableSelectibilityNumber/text()
attr BUE_HTM_HP8620_CONSUMABLES room Büro
attr BUE_HTM_HP8620_CONSUMABLES stateFormat C: Cyan% M: Magenta% Y: Yellow% K: Black%

Ausserdem kann man sich noch einige Statistiken holen:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
defmod BUE_HTM_HP8620_PRODUCTUSAGE HTTPMOD http://hp8620/DevMgmt/ProductUsageDyn.xml 3600
attr BUE_HTM_HP8620_PRODUCTUSAGE userattr reading01Name reading01XPath-Strict reading02Name reading02XPath-Strict reading03Name reading03XPath-Strict reading04Name reading04XPath-Strict reading05Name reading05XPath-Strict reading06Name reading06XPath-Strict reading07Name reading07XPath-Strict reading08Name reading08XPath-Strict reading09Name reading09XPath-Strict reading10Name reading10XPath-Strict reading11Name reading11XPath-Strict reading20Name reading20XPath-Strict reading30Name reading30XPath-Strict reading40Name reading40XPath-Strict reading41Name reading41XPath-Strict reading50Name reading50XPath-Strict reading51Name reading51XPath-Strict
attr BUE_HTM_HP8620_PRODUCTUSAGE DbLogExclude .*
attr BUE_HTM_HP8620_PRODUCTUSAGE DbLogInclude Printer_Pages_Total,Scanner_Scans_Total
attr BUE_HTM_HP8620_PRODUCTUSAGE alias HP 8620 - Statistik
attr BUE_HTM_HP8620_PRODUCTUSAGE httpVersion 1.1
attr BUE_HTM_HP8620_PRODUCTUSAGE reading01Name Printer_Pages_Total
attr BUE_HTM_HP8620_PRODUCTUSAGE reading01XPath-Strict //pudyn:PrinterSubunit/dd:TotalImpressions/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading02Name Printer_Pages_Monochrome
attr BUE_HTM_HP8620_PRODUCTUSAGE reading02XPath-Strict //pudyn:PrinterSubunit/dd:MonochromeImpressions/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading03Name Printer_Pages_Color
attr BUE_HTM_HP8620_PRODUCTUSAGE reading03XPath-Strict //pudyn:PrinterSubunit/dd:ColorImpressions/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading04Name Printer_Pages_Duplex
attr BUE_HTM_HP8620_PRODUCTUSAGE reading04XPath-Strict //pudyn:PrinterSubunit/dd:DuplexSheets/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading05Name Printer_Jam_Events
attr BUE_HTM_HP8620_PRODUCTUSAGE reading05XPath-Strict //pudyn:PrinterSubunit/dd:JamEvents/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading06Name Printer_Mispick_Events
attr BUE_HTM_HP8620_PRODUCTUSAGE reading06XPath-Strict //pudyn:PrinterSubunit/dd:MispickEvents/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading10Name Scanner_Scans_Total
attr BUE_HTM_HP8620_PRODUCTUSAGE reading10XPath-Strict //pudyn:ScannerEngineSubunit/dd:ScanImages/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading11Name Scanner_Scans_ADF_Image
attr BUE_HTM_HP8620_PRODUCTUSAGE reading11XPath-Strict //pudyn:ScannerEngineSubunit/dd:AdfImages/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading12Name Scanner_Scans_Flatbed_Image
attr BUE_HTM_HP8620_PRODUCTUSAGE reading12XPath-Strict //pudyn:ScannerEngineSubunit/dd:FlatbedImages/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading13Name Scanner_Jam_Events
attr BUE_HTM_HP8620_PRODUCTUSAGE reading13XPath-Strict //pudyn:ScannerEngineSubunit/dd:JamEvents/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading14Name Scanner_Mispick_Events
attr BUE_HTM_HP8620_PRODUCTUSAGE reading14XPath-Strict //pudyn:ScannerEngineSubunit/dd:MispickEvents/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading20Name InkMagentaPagesRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading20XPath-Strict //pudyn:Consumable[dd:MarkerColor='Magenta']/dd:EstimatedPagesRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading21Name InkMagentaPercentRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading21XPath-Strict //pudyn:Consumable[dd:MarkerColor='Magenta']/dd:ConsumableRawPercentageLevelRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading30Name InkCyanPagesRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading30XPath-Strict //pudyn:Consumable[dd:MarkerColor='Cyan']/dd:EstimatedPagesRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading31Name InkCyanPercentRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading31XPath-Strict //pudyn:Consumable[dd:MarkerColor='Cyan']/dd:ConsumableRawPercentageLevelRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading40Name InkYellowPagesRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading40XPath-Strict //pudyn:Consumable[dd:MarkerColor='Yellow']/dd:EstimatedPagesRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading41Name InkYellowPercentRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading41XPath-Strict //pudyn:Consumable[dd:MarkerColor='Yellow']/dd:ConsumableRawPercentageLevelRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading50Name InkBlackPagesRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading50XPath-Strict //pudyn:Consumable[dd:MarkerColor='Black']/dd:EstimatedPagesRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE reading51Name InkBlackPercentRemaining
attr BUE_HTM_HP8620_PRODUCTUSAGE reading51XPath-Strict //pudyn:Consumable[dd:MarkerColor='Black']/dd:ConsumableRawPercentageLevelRemaining/text()
attr BUE_HTM_HP8620_PRODUCTUSAGE room E6-Büro
attr BUE_HTM_HP8620_PRODUCTUSAGE stateFormat Total: Pages_Total Monochrome: Pages_Monochrome Color: Pages_Color

Und noch ein paar Details des Druckers:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
defmod BUE_HTM_HP8620_PRODUCTCONFIG HTTPMOD http://hp8620/DevMgmt/ProductConfigDyn.xml 3600
attr BUE_HTM_HP8620_PRODUCTCONFIG userattr reading01Name reading01XPath-Strict reading02Name reading02XPath-Strict reading03Name reading03XPath-Strict reading04Name reading04XPath-Strict reading05Name reading05XPath-Strict
attr BUE_HTM_HP8620_PRODUCTCONFIG DbLogExclude .*
attr BUE_HTM_HP8620_PRODUCTCONFIG enableControlSet 1
attr BUE_HTM_HP8620_PRODUCTCONFIG httpVersion 1.1
attr BUE_HTM_HP8620_PRODUCTCONFIG reading01Name Model
attr BUE_HTM_HP8620_PRODUCTCONFIG reading01XPath-Strict //dd:MakeAndModel/text()
attr BUE_HTM_HP8620_PRODUCTCONFIG reading02Name Serial_Number
attr BUE_HTM_HP8620_PRODUCTCONFIG reading02XPath-Strict //dd:SerialNumber/text()
attr BUE_HTM_HP8620_PRODUCTCONFIG reading03Name Firmware_Date
attr BUE_HTM_HP8620_PRODUCTCONFIG reading03XPath-Strict //prdcfgdyn:ProductInformation/dd:Version/dd:Date/text()
attr BUE_HTM_HP8620_PRODUCTCONFIG reading04Name Total_Memory
attr BUE_HTM_HP8620_PRODUCTCONFIG reading04XPath-Strict //dd:TotalMemory/text()
attr BUE_HTM_HP8620_PRODUCTCONFIG reading05Name Available_Memory
attr BUE_HTM_HP8620_PRODUCTCONFIG reading05XPath-Strict //dd:AvailableMemory/text()
attr BUE_HTM_HP8620_PRODUCTCONFIG room E6-Büro
attr BUE_HTM_HP8620_PRODUCTCONFIG stateFormat Modell: Model SN: Serial_Number
attr BUE_HTM_HP8620_PRODUCTCONFIG userReadings Memory_Usage_Percent {round(100-(ReadingsNum($name,"Available_Memory","")/ReadingsNum($name,"Total_Memory",""))*100,1)}

Vielen Dank an die Nutzer “akw” und “somansch” aus dem Forum!