Esp32 board not connecting

OK - I made some progress, but it was painful.

My home network is divided into two networks, let’s call them Network1 and Network2.

Network1 I use for all my IOT devices. Network2 I use for our family computers and cell phones.

When I originally set this up I pointed the new esphome connection for my esp32 to Network1.

Once done, while I could ping my esp32 running esphome from Network2. However, I could not get ESPHome to show it as connected.

I then decided to change my secret ssid and password so the esp32 would be defined on Network 2 instead of Network 1. I installed it, and restarted the ESP32. It still did not connect.

However, after looking at the log I realized the ESP32 was still trying to connect to Network 1 - even though the secret file was pointing to Network 2.

I tried installing it again (several times) but it kept pointing to Network 1.

I tried the ‘Clean Build Files’ - it still didn’t work - continued to point to Network 1.

I also tried hardcoding the SSID and Password for Network 2 in my config file, reinstalling it, restarting the esp32, but the log file continued to show it trying to connect to Network 1.

I eventually deleted my ESP32HOME app and the ESPHOME service completely from Home Assistant and restarted the Home Assistant itself.

After that, I reinstalled ESPHOME and tried to set up my app again. To my surprise, I did not have to re-enter my Secret SSID and Password as it was retained even though I had deleted the prior esp32app and ESPHOME from HomeAssistant.

Regardless, I installed the same app as before ( board esp32dev ) and it connected to Network 2. However, while the bar is no longer red, it is gray not green??

I would still prefer to have it working on Network 1. I found this post, ESPhome over VLAN - hostname resolving which may have something to do with it, but it is above my pay grade.

If anyone has any insights, I would be happy to hear them.