Unable to resolve IP during Compile

Ok - I’m stumped, and rather than delete and reinstall, I’d rather figure out how to fix this problem.

I installed the EmporiaVue2 device with ESPHome several months ago. It was assigned with a dynamic IP, reserved on my router (pfSense). I was using a 10.0.x.x address for all my devices, in anticipation of rolling out a VLAN setup. At the time of initial setup, I could edit and update OTA without any issues. I have since rolled out my VLANs, and my IoT devices are still using the same IPv4 addresses they were using before. I have no problems communicating with the Emporia device, and it has been happily reporting my home’s energy use every day via WiFi.

Today I wanted to add some individual circuit monitoring, so I installed the necessary current clamps and am now trying to edit the ESPHome yaml, compile and upload wirelessly. I can not complete the upload portion of the process. The upload process insists on using “emporiavue2.local” as the address, and it can’t resolve the IP. How do I change the address it is trying to find the device at??

Results of INSTALL Process:

INFO Reading configuration /config/esphome/emporiavue.yaml...
INFO Detected timezone 'America/Vancouver'
INFO Generating C++ source...
INFO Compiling app...
Processing emporiavue2 (board: esp32dev; framework: espidf; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40302.0 (4.3.2) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch2 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch2 
 - toolchain-xtensa-esp32s2 @ 8.4.0+2021r2-patch2
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
No dependencies
RAM:   [=         ]  10.4% (used 34000 bytes from 327680 bytes)
Flash: [====      ]  40.3% (used 739265 bytes from 1835008 bytes)
========================= [SUCCESS] Took 19.19 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of emporiavue2.local
ERROR Error resolving IP address of emporiavue2.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 have tried editing the address found in “/config/.storage/core.config_entries” to the “10.0.99.15” address it has been assigned by my router. It was already set as the IPv4 address. (Not sure if this was me editing it in the past or not)

I have tried editing the “/config/esphome/.esphome/emporiavue.yaml.json” file, and everytime I run the install process, it reverts back to “emporiavue2.local” in the file.

emporiavue.yaml.json file:

{
  "storage_version": 1,
  "name": "emporiavue2",
  "comment": null,
  "esphome_version": "2022.9.4",
  "src_version": 1,
  "address": "emporiavue2.local",     <-- Changing this to 10.0.99.15 doesn't stick
  "web_port": null,
  "esp_platform": "ESP32",
  "build_path": "/config/esphome/.esphome/build/emporiavue2",
  "firmware_bin_path": "/data/emporiavue2/.pioenvs/emporiavue2/firmware.bin",
  "loaded_integrations": [
    "api",
    "emporia_vue",
    "esp32",
    "esphome",
    "external_components",
    "i2c",
    "logger",
    "md5",
    "mdns",
    "network",
    "ota",
    "preferences",
    "sensor",
    "sntp",
    "socket",
    "template",
    "time",
    "total_daily_energy",
    "wifi"
  ]
}

I have to be missing something. Anyone have any insight?

EDIT: To clarify, I am hoping not to have to force a STATIC IP in the device’s configuration. I do see some notes in the “WiFi Component — ESPHome” page that says I can just set the IP address there, but then it will be compiled into the firmware and uploaded to the device.

1 Like

Use --use_address - see ESPHome Core Configuration — ESPHome

Bingo. Thank you!

Although I wish I knew where it was storing that bit of data so i could edit it instead… but this works!

One of life’s mysteries :slight_smile: