kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
185 stars 36 forks source link

Cannot set up integration as I use a different port than 8080. #32

Closed deam0n closed 2 years ago

deam0n commented 2 years ago

Hi, When I try to set up this integration, I got the error:

Failed to get list of devices from bridge: Failed to parse: http://192.168.178.22:9090:8080/list?token=XXXXXXXX

In fact I've set up my NUKI API on the port 9090 as the 8080 is already used for something else in the network.

Is it possible to have an input for the port to be used in the integration set up?

kvj commented 2 years ago

oh, thanks for the report. sure, I will fix it

kvj commented 2 years ago

Please update to 0.2.1. The issue should be fixed

deam0n commented 2 years ago

Thanks,

Now I get the error:

Bridge doesn't support HTTPS callbacks. Please make your Home Assistant accessible via HTTP.

Is this a limitation? I've the official Nuki integration working (I do not remember if I had to provide the callback), but My HA instance is only available via https.

kvj commented 2 years ago

If you have a hardware bridge (black cube) then yes, the bridge doesn't support HTTPS callbacks. No real-time status updates will be possible. The original Nuki integration doesn't use callbacks at all, only polling.

I was a bit confused by your original message, I've mentioned that the port is being used by something else. How that is possible, as Bridge has basically only one port open?

deam0n commented 2 years ago

Indeed! (facepalm) I guess I've just changed it as a security freak that I try to be. (never leave default ports, if you can change it) Humm, now I'm battling myself on having HA on http (and support https via rpm) so I can use your amazing integration! heheh

kvj commented 2 years ago

Yeah, it's up to you. You can quickly set up Nginx proxy, for example, and expose only hooks endpoints via HTTP

deam0n commented 2 years ago

OK, I've changed my instance to be available over http.. but now I get the following error:

Failed to get list of devices from bridge: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.178.22:9090/list?token=XXXXXXXXX (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff603833a0>: Failed to establish a new connection: [Errno -3] Try again'))

no matter if I restart the bridge, or wait some time, I'll have this error

If I access 192.168.178.22:9090/list?token=XXXXXXXXX I do get the json device list

kvj commented 2 years ago

That looks strange. Please make sure you only enter 192.168.178.22:9090 as a field value, and not a full URL

deam0n commented 2 years ago

indeed that fixed it!

Thanks a lot!