This is probably something of a noob question. Sorry.
I have got a Lilygo S3 Display (ESP32) up and running in ESPhome/Home Assistant.
Nice.
What I can’t achieve: I want to place that Display in a remote network, which is connected via Wireguard-VPN to my home network (where the HA server is running).
As far as i researched the device recovery is done via mDNS, which doesn’t work via VPN. Both networks have a /24 netmask, let’s say:
Home Network: 192.168.1.0/24
Display in 192.168.2.0/24
I am looking for a config option to have the server directly connect to the display via IP (or does the display connect to the server? I don’t know). manual_ip and use_address from the docs do not seem to be enough.
Is the desired setup possible without reconfiguring the networks?
Hmm, that was too fast.
The display is connected (it show the configured output) but is shown as offline in the ESPhome dashboard, so no (remote) updating and configuration.
So the question remains, where cann I tell the ESPhome dashboard how to connect to the display?
Ok, then most probably the problem is in the domain name. Can you put a fixed IP in the config of the ESP? As an alternative (don’t know if a fixed IP works well with VPN) you can try using the “status_use_ping: true” option in the config.
Background is that Esphome determines whether an ESP is on/offline through mdns and that is quite known for issues. See: Frequently Asked Questions — ESPHome
The ESPHome ’ online’ status relies heavily on mDNS.
Since the ESPHome addon in itself has nothing to do with HA, and is only used to program it, you don’t need to worry about the status indication.
The ESPHome device can also be programmed from any other station. What is important that the ESP device can use HA API
By default. In the esphome add-on setting you can change it to use ping instead.
Did you actually try it? From my mileage as long the node is reachable and even if the dashboard shows (failsy) offline because mDNS broadcast can’t reach your remote network things like ota updates or logs do actually work.
Where I have to change use_address (no firmware recreation needed) whenever I move the device to another network.
This seems to work as indended.
Sadly before the last test, I somehow short-circuited my esp32-device (a screwdriver touched some pins) and it is probably bricked now (bootloop, or at least seems that way from periodic usb connected/unconnected sound).
But that is a problem out of this boards scope. So thank you all for helping my setup!
PS: Fixed the display. All is well.
PPS: For others, interested in that setup:
The above setup (together with “use_ping=true”) allows the use in different remote networks. After the device connects to one of them two things have to be done in HA:
re-add the device with the new ip to make it show data
update use_address in config and recompile (the result does NOT to be actually flashed) to allow HA/ESPhome to reach it for remote flash.