seydx / homebridge-printer

Homebridge plugin for ipp (AirPrint) capable printer
MIT License
42 stars 4 forks source link

Error: For Each on Printer with on Marker #4

Closed fototeddy closed 3 years ago

fototeddy commented 3 years ago

When I Add my HP Laserjet everything works fine but I get these Error in the Log. My Printer is behind a CUPS server. Seems something is wrong about the markers

[PrinterPlatform] TypeError: markers.forEach is not a function
    at SwitchAccessory.getService (/root/.hoobs/node_modules/homebridge-printer/src/accessories/switch.js:50:21)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

The Debug Log of the Plugin is as follows

[PrinterPlatform] HP LaserJet: {"version":"2.0","statusCode":"successful-ok","id":3177504,"operation-attributes-tag":{"attributes-charset":"utf-8","attributes-natural-language":"en-us"},"printer-attributes-tag":{"printer-is-accepting-jobs":true,"printer-state":"idle","printer-up-time":1611551364,"queued-job-count":0,"marker-levels":63,"marker-names":"Patrone Schwarz HP CE505A","printer-make-and-model":"HP LaserJet P2055 Postscript (recommended)"}}

so the log seems to have information for markers and marker-level (despite the printer it self says 58% marker) but that might be some CUPS issue

fototeddy commented 3 years ago

Closed with the pullrequest