ESPHome DNS issue

Working on ESPHome on Home Assistant

I have several Kauf bulbs I want to integrate… but I cannot get the DNS working.

In Settings | Device & services

I see my Kauf bulb (1) and the need for an Encryption Key (2). I tried the below encryption key but that does not work.

Here is my ESPHome yaml file.

esphome:
name: Ford
friendly_name: Ford
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "mNB9NxzzzzzzzzzzzzzzzzzzzzzzzzzUGrkicWPsU="
ota:
- platform: esphome
password: "0731dxxxxxxxxxxxxxxxxxx997832f8e"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ford Fallback Hotspot"
password: "0wdfMVasdasdfrdfuuof"
captive_portal:

I then run Install for that Kauf lamp, which all seems good until the DNS part.

INFO ESPHome 2024.7.3
INFO Reading configuration /config/esphome/ford.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing ford (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
Compiling .pioenvs/ford/src/main.cpp.o
Linking .pioenvs/ford/firmware.elf
RAM: [= ] 12.4% (used 40624 bytes from 327680 bytes)
Flash: [===== ] 49.3% (used 904361 bytes from 1835008 bytes)
Building .pioenvs/ford/firmware.bin
Creating esp32 image...
Successfully created esp32 image.
esp32_create_combined_bin([".pioenvs/ford/firmware.bin"], [".pioenvs/ford/firmware.elf"])
Wrote 0xee330 bytes to file /data/build/ford/.pioenvs/ford/firmware.factory.bin, ready to flash to offset 0x0
esp32_copy_ota_bin([".pioenvs/ford/firmware.bin"], [".pioenvs/ford/firmware.elf"])
========================= [SUCCESS] Took 7.72 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of ford.local
ERROR Error resolving IP address of ford.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname

Excerpted here:

ERROR Error resolving IP address of ford.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname

I tried to add the following, but it did not help.

mdns:
   disabled: false

I have a pfSense firewall with Avahi installed and I am able to resolve ford.local (10.0.0.157).

Any thoughts on what I am doing wrong?

Thanks in advance!
Paul.

are you able to SSH into your HA installation and resolve ford.local there?

If you know the IP (10.10.10.157?), try browsing to that page and see if you can factory reset the bulb. If not, follow the manufacturers instructions for resetting it and reconnecting it to your SSID. Hopefully that will clear the encryption key.

If not, you’ll need to use the correct yaml config to reflash the bulb:

I think I must be missing something.

My HA is 10.0.0.157

In my reading I do not see that ESPHome is available on the same IP address. Again, I may be misunderstanding.

Second, regarding the yaml to reflash the bulb… where do I put that yaml? And then what is the process to reflash? Could you point me to some steps?

Thanks!

If you’ve connected your bulb to wifi, it should have its own IP address. Identify that IP in Pfsense and see if you can browse to that IP.

There, try a factory reset (if that option is available). If not, there are reset instructions on the kauf website.

Trying to reflash the bulb is a bit involved so leave that as a last resort.

In looking at the kauf bulb website, it shouldn’t be asking for an API encryption code for a fresh install.

The screenshot above suggests the bulb is by default named “kauf-bulb-b634ce” so it’s not clear why you have a YAML file calling it “ford”. Did you create this file from scratch? Or did you adopt it from a factory-shipped ESPhome install and try to change it?