Closed goofy2k closed 3 years ago
This poses a problem for end-users that don't have the means to flash firmware over USB. Just forcing a static IP is not an acceptable solution as it is not known a priori in which IP range the fixed address must lie. Fixed IP adresses should be freely configurable by an end user, e.g. via a hotspot/AP , as fallback or enforced.
Fraddles on discord.com suggests to have a look into host networking / mdns: https://docs.docker.com/network/host/
C7N (discord.com) says: Docker creates an overlay network, which all containers are connected to. This is a private network like the one you have behind your router. mDNS does not work between separate private networks, so you will therefore have to put the container on the same network as your PC and ESPhome devices
Hinted by a discussion on discord, I tried to use network = host instead of bridge. Now I can access the fallback hotspot. It even prompts for a login. After entering the home network credentials the board ultimately connects to it ! This seems to be a solution for issues #1 #2 . However: still many tries (4 way handshake timeout)
In the simplest configuration, with a DHCP generated IP address the device does not connect to the WiFi network. Connection is OK when configuring for a static IP.