Entirely broken System (nothing works because of mdns)

So, i will keep this short.

(Also I am really frustrated at this stage, because as of now I am sitting 8 Hours at this problem, after 9 Hours at work dealing with different Peoples Network Problems.) So please excuse the following “writing style”.

I’ve been using ESPHome for over a year at this point and everything was working flawlessly.

I began with HA on my Raspberry Pi, ESPHome recognized all Devices and their appropriate State (ON/OFF)

I switched to HA on VM (Proxmox), everything works out of the Box (ESPHome doesn’t correctly identify ON/OFF anymore, but i can upload OTA etc.

Now… I had all my devices configured, but i wanted to add a simple CO2 Meter. So i pulled out an ESP32 installed ESPHome. No Problem it is recognized automatically by HA and ESPHome.

Then, i configure (ANYTHING and i really mean ANYTHING) in the Config, upload the Code. And BOOM

Catastrophic Failure. ESPHome doesn’t see the Device. The Device is thrown out of HA and i cannot add it back because i need to provide the API line in the Code etc.

I did all that, I Copy Pasted the Code from my other Sensors and just changed the Name. Nothing works, period.

I changed absolutely NOTHING, except for updating ESPHome like 6 times over the last 4 months or so. But as i didn’t actively use it i didn’t notice.

Was there any GAME CHANGING Feature added or is my f###ing System Nuked. I genuinely can’t figure this out. I reinstalled HA, ESPHOME, Proxmox, VM, Rollback, mdns Proxy on OPNSense etc. etc.
EVERYTHING. BUT no. it won’t ever work again.

Once i have to updated the rest of my sensors than, that’s it BYE BYE.

What obvious thing am i missing. As i said i “SHOULD” have everything.

Oh one more thing, this morning i did an OTA of one of my sensors without any problem. But when i came home well. Catastrophic Failure.

Maybe i have a neutrino source on top of my Server because there is literally no other way for things to go so catastrophically wrong.

I really like ESPHome and it’s easy to configure Sensors, but THIS. Well if there’s no answer to this than that’s it. I kid you not i could go to a different house and setup the same stuff and it still wouldn’t work.

So, I know there is like one Line i need to edit to fix this and i’m to f##ing dumb to find it, so does anyone know which it is?

Hi, have you tried setting a static IP and a DNS name at your DNS server? That’s what I do as mDNS doesn’t register the device names correctly in my case.
Then in ESPHOME I do this for example:

substitutions:
  device_name: "athom-dryer"
  friendly_name: "Athom Dryer"
  project_name: "athom.smart-plug-v2"
  project_version: "1.1"
  relay_restore_mode: RESTORE_DEFAULT_ON

esphome:
  name: "${device_name}"
  name_add_mac_suffix: true
  project:
    name: "${project_name}"
    version: "${project_version}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 10.0.0.66
    # Set this to the IP address of the router. Often ends with .1
    gateway: 10.0.0.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.254.0
  # ap: {} # This spawns an AP with the device name and mac address with no password.

I tried that, when the ESP reboots it gets the IP, i can ping it successfully and I can see in the Firewall logs it communicates as expected. However when ESPHome tries to ping it it (Logs or from HA when adding the Device) it either says API missing (it is not) or Timeout. When i try to flash it it flashes successfully but after that doesn’t see it anymore.

Like i said it doesn’t make any sense. But yes you are right. Giving them Static IPs is generally a better idea is such use cases. Unfortunately it doesn’t fix my problem.

So i just took a new ESP32.

Prepared it for first use via web.esphome

Added my wifi credentials.

It is automatically recognized in my ESPHome Instance.

firefox_iWLsELfJLy

I adopt the Device and set my new Name.

2

It uploads the “changed” Config. And …

It is in the Network, and was picked up by esphome with exactly that hostname via mdns. But now. Nahh. How about I dont’t : “ESPHome”

So how can it instantly pick the device up, but when i want to configure something it just gets spontaneous amnesia.

I think I have that same issue, I’d have to test it to see and it’s getting late here. I’ll try in the coming days.

Might actually be a problem in late ESPHome Versions. But i hope there will be some solution soon.

Try setting up from the start in esphome, not with web.esphome (or whatever it is called)

Solution. TLDR: If you have a Unify AP just restart it.

So I figured it out. First I thought it might have something to do with my mdns over multiple VLANs Setup. So I updated my mdns proxy and everything.

Now after a bit of digging I found that actually it was my Unify Access Point (U6LR).
Now obviously I enabled the multicast settings or left them at default. But as it turns out for some reason the multicast service has occasional hiccups. So after restarting the AP mdns works again.

Granted it’s weird only the esps have a problem with that, but that might be because of this Section of the mdns RFC.

So for anyone with the same problem. If you have a Unify AP just restart it.

Here is the Source where i got the information from, for anyone curious.

2 Likes