Background: trying to get 2 switchbot curtains working. On first setup they auto discovered and worked a bit, but lose connection quickly or if anything is restarted. I had been using a USB bluetooth dongle which was relatively plug-and-play, but had frequent issues due to the known kernel bug, so I went down the path of making an ESPHome bluetooth proxy.
Problem - HA container has a hard time finding the ESPHome device. Seems like an issue with mDNS not getting to the container.
Diagnostic steps:
ping btproxy.local
on my windows laptop, works fine
ping 192.168.0.105
on my windows laptop, works fine
SSH into the server running HA
ping btproxy.local
on server, works fine
ping 192.168.0.105
on server, works fine
docker exec -it homeassistant bash
to run inside the HA container
ping btproxy.local
on server, get back ping: bad address âbtproxy3.localâ
ping 192.168.0.105
on server, works fine
But this means the HA container canât seem to find the ESPHome device because itâs looking via the mDNS name. Every once in a while if I delete the device from HA, it will auto discover and be usable for a few commands, then go back unavailable. Other times it discovers but doesnât show the LED switch I put in the ESPHome config so itâs not even registering correctly. Previously I was getting âTemporary failure in name resolution (APIConnectionError)â a lot.