#Mobile app does not automatically see home assistant behind router on subnet

1 messages · Page 1 of 1 (latest)

tribal silo
#

Hi,

We have a few installations with home assistants running on a subnet behind a mikrotik router with the idea that we can add all our hardware on that subnet later on with only 1 IP as a visible installation to a user.
For this we opened port 8123 on the router.

We can now access the homeassistant by going to http://ROUTERIP:8123 and its all working nicely.
However, the mobile app does not automatically recognise the home assistant, requiring the user to manually find out the IP of the mikrotik router and set it as a manual address.

We have been building around this issue during a test installation phase of 10 devices by assigning a fixed IP in the router settings of the users for the mikrotik, however this may change when a router is updated, reset, etc. after which the user can no longer access the home assistant.

Since we are preparing for a rollout of 84 installations, each of which includes a home assistant green and a mikrotik router, we would want to resolve this issue beforehand.

When loading up home assistant in the dev enviroment I did see the following ports, and tried opening them as tcp but without success:

  • 11984
  • 18554
  • 18555

Is home assistant using a different port to be "findable" that we are missing?

Thank you for your help.

Remco

odd girder
# tribal silo Hi, We have a few installations with home assistants running on a subnet behind...

its not a matter of ports, auto discovery will not work across networks/subnets/vlans. broadcasts do not cross them, thats how tcp works.

you could put the HA server on multiple networks. either physically or by a virtual adaptor (although a virtual adaptor on HAOS may have issues like not persistent through updates etc...).

Try adding a USB ethernet adaptor to the green to give it another ethernet connection and have 1 set to each network. that way the green is on both. if this works its an easy and pretty inexpensive solution,

tribal silo
#

Sadly having multiple connections is not an option, the mikrotik works as a single location where we can easily have lan, wifi and 4g (preffered lan, then falling back to the others). Due to the locations where we want to install this we want to only have a single entry point on any local network.

#

From what I understand from you, is that we need to find a way to pass a tcp broadcast through the mikrotik?

#

which would mean, one of those ports has a UDP broadcast running right?

odd girder
tribal silo
#

thats forwarding, but what about a broadcast relay

#

or in the case of the mikrotik, I can do low level linking of any traffic of a specific ip+port to a different subnet, based on the interface that would be L3 level

#

shame homeassistant doesnt use UPnP for its discovery

odd girder
tribal silo
#

we tried the dns name, but found a few locations where there was no local dns running, at which point that failed

odd girder
odd girder
tribal silo
odd girder
#

thats always the risk with a complicated network setup. if someone fucks with it then it breaks

tribal silo
#

but since I cant even identify the port on which it is sending its broadcast, there wont be a way for me to try to resolve the issue

odd girder
tribal silo
#

instead of having to figure out in some way what the ip is

odd girder
#

realistically what you are trying to do is change the way networks have been designed to work for 50 years.

tribal silo
#

seeing as how broadcast relays have been done for at least 10 years already, that statement feels like a bit of a stretch

#

the reason we often didnt have to use broadcast relays was because of UPnP in the past

#

The single question remains, on what port is it broadcasting

#

And is that a static port, or randomised between reboots

odd girder
#

have you tried DMZ'ing the green? depending on the microtik implementation then that might work

tribal silo
#

I am not familiar with DMZ on our own subnets, time to learn

odd girder
#

DMZ basically exposes the device to the outer network. bypassing any need for specific forwarding. but router manufacturers implement it in different ways so maybe it works in your setup maybe it doesn't

#

if you want more specifics about how the broadcasts work then you are likely best off just doing a traffic analysis

tribal silo
#

note for future reference, when trying to resolve homeassistant.local it seems to consistently use MDNS protocol on port 5353

#

so if we can either dmz or relay that port, then it may be a solution. If I do get it working Ill post it here

unborn mauve
#

.local is a domain that is usually hooked into mdns on clients today, yes. with linux you can easily set up mdns to announce a mdns name to ip address binding that points to an ip that is not its own. if you can do the same in the router, perhaps? get it to announce a homeassistant.local service pointing to itself?

#

to be clear: if you just relay mdns then homeassistant.local would point to the real ip of your ha instance. you don''t want that. you want the router to advertise itself as homeassistant.local if i understand you correctly.

#

so look up mdns docs for mikrotik

tribal silo
#

im finding some mdns stuff for the mikrotik and am trying a bunch of different ways, now that we know its mdns we got something to focus on

tribal silo
#

Second one is behind the mikrotik, just need to learn to spoof it