hassio-addons / addon-unifi

UniFi Network Application - Home Assistant Community Add-ons
https://addons.community
MIT License
276 stars 137 forks source link

Add a way to change the adoption port in the system.properties file from the ui #423

Closed miawgogo closed 1 year ago

miawgogo commented 1 year ago

Problem/Motivation

With the addition of thread and matter to home assistant i had installed the Open Thread Border Router on to my home assistant instance, however both this addon and the OTBR share the same port(8080, used for adoption here and API on the OTBR).

To Resolve this i tried changing the port used by this addon in the addon configuration

Expected behavior

For adoption to still work even if i had to ssh onto the access points

Actual behavior

but it caused issues as the controller was still internally using 8080 for adoption(in system.properties), mainly that one AP would constantly fallback to the 8080 inform even when using set-inform

Steps to reproduce

  1. Change the device communication port to 8082 in the addon configuration
  2. adopt AP's on the new port
  3. some will intermittantly disconnect and when sshing to them they will show connection problems when running the info command

Proposed changes

have a configuration option in the addon setting that changes the values in the system.properties

sinclairpaul commented 1 year ago

I believe the issue here is that the inform address broadcast by the controller is based on the system properties, and essentially can't be behind a port NAT. Even if we did enable changing it, we wouldn't be able to configure the addon to forward to that port (the 8080 destination is pre-configured in the config).

This would mean that the only option would be to switch the addon to the host network, which would cause even more issues.

I'm going to close this as there isn't anything that can be done, it's really a limitation of the controller software.