elad-bar / ha-blueiris

Integration with Blue Iris Video Security Software
184 stars 43 forks source link

'Invalid server details' when on a 172.16.0.0/16 network #135

Closed chaihanhans closed 2 years ago

chaihanhans commented 2 years ago

It seems that ha-blueiris does not handle /16 networks properly when trying to add the integration in HA. My scenarios:

Blue Iris server IP: 172.16.100.216/16 HA server IP: 172.16.20.2/16

Will always fail and give message 'Invalid server details'.

Blue Iris server IP: 172.16.100.216/16 HA server IP: 172.16.100.155/16

Will always succeed.

It seems that as long as the BI server and HA server have the same 172.16.100 prefix there are no problems. Is ha-blueiris always assuming a /24 netmask?

kramttocs commented 2 years ago

If you turn on the logger, does it give you anything more? I took a look in the Blue Iris API code file but nothing stood out. If we can get more log details we should be able to tell how far it got at least.

chaihanhans commented 2 years ago

This is the error message in HA:

This error originated from a custom integration.

Logger: custom_components.blueiris.managers.config_flow_manager Source: custom_components/blueiris/managers/config_flow_manager.py:442 Integration: Blue Iris NVR (documentation) First occurred: 12:11:57 (1 occurrences) Last logged: 12:11:57

Failed to access BlueIris Server (172.16.20.3)

chaihanhans commented 2 years ago

The problem seems to be in Blue Iris The account I used when trying to configure the integration in HA was set as 'Lan Only' in Blue Iris. When I unchecked that in BI, the integration was set up without any issues. It seems that it is BI that has a problem recognizing networks.