[Solved] Can't adopt esphome devices because nothing is discovered

Hello, I tried searching for this topic already but I had no luck except for a post on Reddit.

This is my ESPHome. And it is empty.

All I can do when using a ESPHome’d device, for example the BT Proxy, is adding it from the Integration.

This is annoying because every now and then there are updates to the firmware and they show up like this

And For updating them I have to plug to the pc and flash the updated firmware.

I believe part of the problem lies in the fact my Home Assistant is in (real) vLan id 2: 10.0.20.0/24 and the ESPHome (Tasmota, Philips hue bridge and many others) are in vLan 3: 10.0.30.0/24.

I use PFSense. I installed PIMD and configured to enable Multicast in both of the vLans.

From ESPHome container I enabled the PING discovery too. But unfortunately I still don’t see the ESPHome devices.

Help?

What you see, is totally normal. If you hadn’t setup the device in your ESPHome installation it is not visible in the ESPHome dashboard, sorry! :slight_smile:

Some definitions:

  • ESPHome
    This is the software, where you generate the firmware for your device. This is done via a YAML file. This is, your first picture (the “empty” one). This is usually called the ESPHome dashboard.
  • HA ESPHome integration
    This is seen in your second picture. This is the integration inside HA, so HA can talk to your ESPHome devices. This has nothing to do with the firmware of the device, it is “only” that you can communicate HA <-> ESPHome. This integration is totally separate from the ESPHome and the dashboard.

It makes sense, if you look at it from the HA side: HA wants to be able to talk to as many devices as possible. So you could ask a friend to flash you an ESP device, and afterwards integrate it to HA without a hassle. That’s why it’s one thing to integrate devices and another thing to configure and flash a device.

Long story short: normally you’d set up a device in ESPHome (the dashboard), configure it there, and flash it right from the dashboard. The first flash is normally done via USB, but afterwards it is OTA (over-the-air).

If it is like in your case, you’d need to setup the firmware in your ESPHome dashboard, so you can reach your device from there. Unfortunately it is not that easy, because you’d need the YAML (file) from that device to upload it to the dashboard and from that point on work with it (update/change).

What I’d suggest for your case, as you don’t seem to have a lot of devices, just do the setup for these devices again in your ESPHome dashboard and flash the device OTA from the dashboard. If you need help with this, let us know! :slight_smile:

I thought so too long time ago, but then, what about the adoption?

Creating/flashing the firmware from ESPHome (container) is not the only way to add a device in ESPHome. In this case, for BT Proxy, I just can’t create/flash the FW because that’s done elsewhere. But adoption should help me here.
Did I understand it wrong?

Look at that, the “adopt” feature already made it into the stable release. Sorry, didn’t know that! I confess, I don’t regularly read the ESPHome changelogs.

So, yes, than the device should be adoptable by your ESPHome dashboard. How that works I can’t say, but after a short readup, it should be automagically. :wink: :smiley:

And yes, unfortunately you misunderstood, or better it is not written very clearly. You can always flash the BT proxy, to stay with your example, again via the ESPHome dashboard. You just need to know the IP address or mDNS address. But it seems way easier to first adopt that device (so it shows up in your ESPHome dashboard) and then change/update it, rather than replicating the code in your ESPHome dashboard and flash it then. The difference is the YAML you’d need to setup from scratch versus the adopted YAML you only need to change.

Nevertheless, your ESPHome installation doesn’t seem to discover the device, so back to basics. I assume from the screenshot you’ve setup ESPHome as Add-on under HA-OS, am I right?

If so, check the configuration for your ESPHome Add-on via Settings > Add-ons > ESPHome > Configuration and disable “Use ping for status”. Restart the Add-on, no matter if the setting was already off or not, and wait a few minutes. ESPHome should discover the device and adopt it.

If not, you might need to go the, as I learned today, old way and reconfigure and reflash the device… :smiley:

Yes, well, I’ve been following ESPHome and in general HA for plenty of years. This is my 5th HA installation. I never really had an use case for ESPHome because I mostly used Tasmota for smart plugs / lights / led, and those few times I had to use an arduino/ESP device I wrote the code myself.

But this bluetooth proxy really bothers me :upside_down_face: And i wish to fix this, and it’s been months I try and pause, get back at it and stop …

the device should be adoptable by your ESPHome dashboard. How that works I can’t say, but after a short readup, it should be automagically

Yes, I read and understood the same. Even a couple of YT videos I watched showed that “the device just shows up”.

You can always flash the BT proxy, to stay with your example, again via the ESPHome dashboard.

Yes of course, I can get the FW from github and do it manually. But the thing is, it bothers me very :sweat_smile:

the screenshot you’ve setup ESPHome as Add-on under HA-OS

Correct. Specifically, this is a VM (under vSphere) with HA OS and the ESPHome addon, and this is the latest HA deployment and the “final” one.
Then I have another instance of HA which I am still using because I set it up on a RPI 4 last year when I moved to the current flat and was testing the PoE with the new switch and wasn’t able to power on the whole datacenter.
Both of the instances are on vLan 2.
Previously I had other HA deployments, but it was before ESPHome was mainstream, and I did not have vLans, only a few Subnets.

disable “Use ping for status”. Restart the Add-on

I’ve done it plenty of times. Really, I’m not joking. Ping ON, Ping OFF; reboot; re-flash the proxies…

I believe if I have to keep investigating the issue, the next step is setup a HA in the vLan 3 where the IoTs are and exclude that this is a mDSN issue. This is partially excluded already because I have already a couple of IoTs in that vLan: The HUE bridge, the Broadlink RM Pro […], all of them work just fine. Meaning that they are discoverable by HA thanks to PIMD.

Thanks a lot for taking the time to answer my question :slightly_smiling_face:

1 Like

The vLANs might be a problem. I don’t use such a setup, so can’t say from own experience, but I’ve read from problems a few times, most of them ended in mDNS failures to jump the vLANs. Despite I thought that’s the idea behind separated vLANs, not to get out of their “cage”. :laughing:

See how combining the vLANs works out, and let us know what’s coming up. :+1:

EDIT: Just found this thread:

1 Like

I got it working :partying_face:

Turns out PIMD isn’t so great after all. I had to install Avahi and tick the option for Repeat mdns packets across subnets

… After a quite long session of debugging FW rules (thanks also to the link above) and running a packet capture on a spare RPI 4 where I installed HA and set up directly into vLan 3 (the IoT), and let the Packet Capture (from PFSense) run when I was installing ESPHome addon and opening the Webinterface, finding out that ADOPTion was available and the devices were listed and that the Packet Capture showed nothing interesting BUT the mDNS line.

At that point it was clear to me that the issue was:
A) PIMD not properly configured
B) PIMD broken

The answer was B.

Then, of course, because I use Linux (Fedora) and I forgot my IoT WiFi password (saved incorrectly into secrets.yaml), when adopting the Living Room device I ran into a few issues.
The most annoying was failed to execute 'open' on 'serialport': failed to open serial port. · Issue #4525 · esphome/issues · GitHub

But being I a man of culture and having lived the years of CLI (and still am), I fired up esptool.py and flashed the firmware that ESPHome created and installed, but failed to reconnect because the wifi password was wrong, but good guy ESPHome allowed me to download it for a later flashing.

I’m not sure if there are better ways to push the wifi configuration in it. I found flashing with esptool the faster way.

2 Likes

Took me a while to work out that you were using pfSense :laughing:. At some point I’ll migrate my Unifi USG to pfSense so a good thread to have.

My problem is slightly different; I can’t even adopt a discovered device from the ESPHome Dashboard. All I get is this:

Great ! Working parfect in my case :wink: