seydx / homebridge-printer

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

Error 400 #12

Closed AdeTheux closed 3 years ago

AdeTheux commented 3 years ago

Now that I discovered you have a bunch of other awesome homebridge plugins, I installed this one but am facing an issue with I think the ipp address.

Using the Discovery iOS app, I could get details of the printer, I tried with adminurl = http://B06F18000000.local./mainmenu.html, also http://b06f18000000.local & http://b06f18000000.local:631

[3/3/2021, 2:52:01 PM] [PrinterPlatform] Canon MX920: An error occured during getting state
[3/3/2021, 2:52:01 PM] [PrinterPlatform] Error: Received unexpected response status 400 from the printer.

Any ideas? The links above are accessible via a browser, I land on an AirPrint settings webpage. Thanks

EDIT: out of curiosity, I tried changing b06f18000000.local to the actual IP address, then the message is different:


[3/3/2021, 2:58:15 PM] [PrinterPlatform] Canon MX920: An error occured during adding filter services
[3/3/2021, 2:58:15 PM] [PrinterPlatform] {"version":"2.0","statusCode":"client-error-not-found","id":44046087,"operation-attributes-tag":{"attributes-charset":"utf-8","attributes-natural-language":"en-us","status-message":"The printer or class was not found."}} 
AdeTheux commented 3 years ago

I read the Canon documentation, and their printers are always supporting the same type of URL: http://local.IP/ipp. So I've updated the config for the plugin, slightly different message but still not positive, unfortunately. I'll keep digging, curious about why the port is not reachable.

[3/6/2021, 5:47:49 PM] [PrinterPlatform] Canon MX920: An error occured during adding filter services [3/6/2021, 5:47:49 PM] [PrinterPlatform] Error: connect EHOSTUNREACH 10.0.0.17:631 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) { errno: -113, code: 'EHOSTUNREACH', syscall: 'connect', address: '10.0.0.17', port: 631 }

SimonLawson70 commented 3 years ago

For my Canon, a TS82xx series inkjet, I used

http://192.168.0.xxx/ipp/

where xxx is the local IP address, and it works fine.

AdeTheux commented 3 years ago

For my Canon, a TS82xx series inkjet, I used

http://192.168.0.xxx/ipp/

where xxx is the local IP address, and it works fine.

Thanks. Changed the IP. still not there but at least the error is different 😅

[3/7/2021, 8:39:44 PM] [PrinterPlatform] Canon MX920: An error occured during adding filter services
[3/7/2021, 8:39:44 PM] [PrinterPlatform] {"version":"2.0","statusCode":"client-error-not-found","id":95627906,"operation-attributes-tag":{"attributes-charset":"utf-8","attributes-natural-language":"en-us","status-message":"The printer or class was not found."}}
seydx commented 3 years ago

@AdeTheux

i think your printer doesnt support the ipp marker class. Maybe I should do this optionally via config.json

bsoener commented 3 years ago

Whenever I try to turn off the printer, I get this error message:

[15/03/2021, 21:02:56] [Canon] Printer: Switching state not supported yet

My config:

   {
        "name": "canon",
        "printer": [
            {
                }, "name": "printer",
                }, "address": [ "http://000xxxxxx.local:8611/ipp/printer" ],
                }, "polling": 10
            }
        ],
        }, "platform": "PrinterPlatform"
    }
],

my printer: Canon PIXMA MG7150

seydx commented 3 years ago

@bsoener

as you can read, it is currently not supported to turn on/off the printer

seydx commented 3 years ago

@AdeTheux

v1.1.0 is online with new options. Take a look at example-config.json

Can you try with "marker": false pls.

AdeTheux commented 3 years ago

@SeydX that fixed it, thanks!