elad-bar / ha-hpprinter

HP Printer Integration
94 stars 25 forks source link

different networks? #93

Closed doniomm closed 3 months ago

doniomm commented 1 year ago

Hello

my printer "HP Color LaserJet MFP M476dn" isn't find by the integration. The url "https://10.20.XX.XX/DevMgmt/ProductStatusDyn.xml" works, but I got this error: Translation Error: The intl string context variable "IP" was not provided to the string "Invalid server details, please try manually access tohttp://{IP}//DevMgmt/ProductStatusDyn.xml(Replace placeholder with IP or Hostname), in case it's accessible, please report the issue with logs"

in the ip field, I put 10.20.XX.XX

my HA is in another network 192.168.XXX.XXX

for a view months it works perfectly...

Is this a problem with my network? Can you please, rewrite the code for different networks, plz

elad-bar commented 1 year ago

Can you access to the printer from command line of the HA (wget / curl)?

Thanks

doniomm commented 1 year ago

curl 10.20.XX.XX 'MovedMoved'

doniomm commented 1 year ago

wget 10.20.XX.XX --2023-03-03 11:31:10-- http://10.20.XX.XX/ Connecting to 10.20.XX.XX:80... connected. HTTP request sent, awaiting response... 307 Temporary Redirect Location: https://10.20.XX.XX/hp/device/ [following] --2023-03-03 11:31:10-- https://10.20.XX.XX/hp/device/ Connecting to 10.20.XX.XX:443... connected. ERROR: cannot verify 10.20.XX.XX's certificate, issued by 'OU=CNB8GBGM62,OU=3863BB025DEC,O=Hewlett-Packard Co.,CN=NPI025DEC.fritz.box': Self-signed certificate encountered. ERROR: certificate common name 'NPI025DEC.fritz.box' doesn't match requested host name '10.20.XX.XX'. To connect to 10.20.XX.XX insecurely, use `--no-check-certificate'.

elad-bar commented 1 year ago

It seems you have an issue accessing the printer, not related to component

doniomm commented 1 year ago

I think the wget do his job or?

elad-bar commented 1 year ago

You should get an xml of printer, you got invalid response, component most probably get the same, it will not work

doniomm commented 1 year ago

:-( in sonos it works... the speaker have all a 10.20.xx.xx ip mmhh what can I do? can you plz help me?

elad-bar commented 1 year ago

Just to make sure did you tried to access the XML (https://10.20.XX.XX/DevMgmt/ProductStatusDyn.xml) or just the ip? If not pls try again, as for the ssl, please try to add a flag to avoid checking the certificate

doniomm commented 1 year ago
SVN-IPG-LEDM.29 scannerAdfLoaded Dokument eingelegt 4 genuineHP 4 Info Yellow toner acknowledgeConsumableState /DevMgmt/ConsumableConfigDyn.xml ledm:hpLedmConsumableConfigDyn genuineHP 3 Info Magenta toner acknowledgeConsumableState /DevMgmt/ConsumableConfigDyn.xml ledm:hpLedmConsumableConfigDyn genuineHP 2 Info Cyan toner acknowledgeConsumableState /DevMgmt/ConsumableConfigDyn.xml ledm:hpLedmConsumableConfigDyn genuineHP 1 Info Black toner acknowledgeConsumableState /DevMgmt/ConsumableConfigDyn.xml ledm:hpLedmConsumableConfigDyn
elad-bar commented 8 months ago

Is it still relevant?

Thanks