Solving ESPHome Upload Issues with EmporiaVue

I’ve been working on integrating my EmporiaVue device with ESPHome, and I’ve encountered a bit of a snag during the firmware upload process. Let me walk through my journey and the solution I found, in case it helps anyone else facing a similar issue.

The Setup:
I installed the EmporiaVue2 device several months ago using ESPHome. Initially, everything worked smoothly with a dynamic IP assigned by my router. The device communicated without issues and reported energy usage reliably. However, after rolling out VLANs, I started experiencing problems during firmware uploads.

The Problem:
When attempting to update the firmware, ESPHome insisted on using the emporiavue2.local address, which couldn’t be resolved. The error message indicated that the device was offline or that mDNS wasn’t responding. Despite the device functioning correctly on my network, the upload process failed repeatedly.

My Attempts to Fix It:

  1. Editing Configuration Files: I tried modifying the IP address in both /config/.storage/core.config_entries and /config/esphome/.esphome/emporiavue.yaml.json to use the static IP 10.0.99.15. However, these changes didn’t persist after running the install process.
  2. Forcing a Static IP: I considered setting a static IP in the device’s configuration, as suggested in the ESPHome documentation. While this would compile the IP into the firmware, I wasn’t keen on making this change unless absolutely necessary.
  3. Checking Network Configuration: I verified that my router and firewall settings weren’t blocking mDNS traffic, which is essential for resolving .local addresses. Everything seemed correctly configured.

The Solution:
After some research and trial and error, I discovered that the issue was related to how ESPHome handles device discovery. Here’s what worked for me:

  1. Force a Static IP in ESPHome: I decided to go ahead and set a static IP in the ESPHome configuration. This involved editing the yaml file to include the static IP address. While this wasn’t my preferred approach, it resolved the upload issue reliably.
  2. Update ESPHome and Dependencies: Ensuring that both ESPHome and the related components were up to date helped prevent similar issues from arising in the future.
  3. Check mDNS Settings: I confirmed that mDNS was enabled on my network and that there were no conflicting services causing resolution problems.

Conclusion:
While I initially hoped to avoid setting a static IP, it turned out to be the most straightforward solution for my setup. This experience taught me the importance of thoroughly checking network configurations and ensuring all software components are up to date. If anyone else is facing similar issues, I hope this walkthrough helps you troubleshoot and resolve the problem effectively!