ESPHome devices outside the local network

I was curious whether it’s possible to set up ESPHome devices in such a way that they are connected on a completely different network (e.g. a outside network on a different house) but still able to show up on your local HA?

Basically, I would like to have a couple of devices (sensors + light) in my parent’s house to keep an eye out. E.g. A doorbell notification triggering a light since one of them has hearing problems.

I was hoping to avoid setting up a whole new home automation system.

Any suggestions would be greatly appreciated :slight_smile:

1 Like

You would need to setup a Site to Site VPN between your router and parents router. If you want just to use the native API

Or use The MQTT option
And open your MQTT broker to the outside.
You can limit access by there ip so your not inviting the whole world in.
There’s also the public brokers you can bridge to as an option.

That’s exactly what I’m looking for, the MQTT solution could work.

I have some questions:

  1. when you say “open MQTT broker to the world” you mean a router “port forwarding” of the Mosquito broker port in HA?

  2. How can you limit access? I know how to do it in a LAN (by MAC) but no by IP

  3. Is there a place where they show how to modify the code inside the ESPHome to disable the API and use instead my name.duckdns.org to connect and being discovered?

You can manually add esphome device in home assistant integration page using ip or hostname. Make sure you port forward the other router to your remote esphome device.

So far i tried two methods:

Try to add manually the EspHome device, connected to the external WiFi, introducing the public IP / duckdns.org and forwarding port 6053 in both routers. --Fail

Change configuration in the ESPHome device

  • remove api:
  • adding MQTT, port 1883, username and password (it works in local network)
  • connecting in external network, forwarding port 1883 in both routers. --Fail

I guess I’m close to it, I just don’t know how to make it work so far

Try a mqtt bridge.

do you know, how to solve this? ESPHome issue with a repeater (NAT)
Thanks

I found a solution, i open the port 1883 of the HA on the router and with the DNS + 1883 i could stablish connection even outside the network.