Hi, I tried to install ESPHome in a docker container on a Synology NAS and everything worked pretty well but I can’t figure out how to flash devices using USB. I added --device=/dev/ttyUSB0 in my config but it doesn’t work.
I use ESPHome in a docker container too:
First build a simple code and “Download Binary”, then use this binary to flash your ESP with your PC… and then next updates you can build and upload with OTA!, very easy.
That’s why we suggested only to compile. That should create .bin firmware image and download it via browser . You can then flash on your pc using the flasher tool I linked.
At least this is how the hassio addon works.
I needed to do the same because I couldn’t be bothered to pass through a usb on my vm hypervisor.
--net=host overrides -p 6052:6052 -p 6123:6123. If you use --net=host, it’s recommended to remove the port mappings from your run command. The only reason to specify ports and not use host networking is if you have another program on the NAS or docker container that uses the same ports as ESPHome and you need to specify a different port. Or if you’re security conscious/paranoid and want to ensure the container can only communicate through a bridge on that port only.
EDIT: A reason to use --net=host is discovery might require the use of multicast/broadcast to find components and devices. specifying ports could prevent ESPHome or HA from properly discovering these devices.
Thanks for the info. I use both configurations, depending on what I wand to achieve. For this I use ‘–net=host’ + of course ports defined as I wrote above. I know that it doesn’t do anything extra as those ports are automatically seen on the local network, but it helps to easily see all ports for all docker containers in overview, if you have all ports for every container listed like that.
You can think of it as well documented setup instead of just working setup
And specifying port translation can of course do no harm
EDIT: if you match identical port numbers.
Hi - I also just installed ESPhome in Docker on Synology and everything looks fine. However nothing happens when I try to open the page. If I write the IP address of my synology and port 6052 I get a blank page. Any idea what I am doing wrong?
I installed the drivers on my synology that work with USB devices. Go here and download the .spk file for your particular NAS. It worked great!
I mostly use the download binary method for first flash since my NAS is upstairs in a closet but this is still a good secondary method for me. For example, I am trying to flash an ESP32 with the BLE tracker component. It won’t update OTA (because it has to change a partition size) and I don’t know the correct command to get it to work. So I can simply go plug the ESP32 into the NAS and have ESPHome do it!
I’ve installed HomeESP on Synology DSM 7.0.
It seems to work ok because I compile and download .bin file and flash via ESPHome flasher.
ESPHome flasher shows me a logs, Home Assistant discovered new device but in HomeESP Frontend all devices are unavailable (marked on red).