Can't get MH-Z19b with ESP32 to update or even show online

I give up… I’m back to my original issue.

Don’t understand why this is so difficult.

Weird case…
Sure you cleaned build files?
Did you correct that indentation error?
Did you try with basic configuration without MH-Z, UART etc…?

I’m pretty sure I cleaned build files. I’m all new to this so I either google or use ChatGPT to figure it out. I followed those steps. Not saying they aren’t missing anything.

I did correct indentation error.

I did try it without MH-z, UART, etc.

I installed ESPHome 2025.5.1 via Python here at work and will try it once I get home.

Need some clarification. I’m assuming that the yaml is the “bios” of the ESP32 and that it has no affect on ESPHome that’s installed on the ESP32 Device. What I’m trying to get at. Since the ESPhome is currently installed on the ESP32 device.Once I add the yaml it will not mess with the installation ESPHome. If this isn’t the case whats the reasoning behind installing ESPHome and then recompile if we edit the yaml file or is it just modifying the configuration?

The YAML is your “prompt” to esphome on what you want it to build. Behind the scenes esphome takes your YAML file and figures out how to stitch together the various pre-defined components you listed in your YAML. It then creates a custom c++ file with this information. It the uses platformio to compile the source code into a binary, which it then downloads and runs.

Unlike the AI models, esphome does EXACTLY what you tell it to, so you have to be VERY precise to get what you want.

None of the AI models understand esphome and you are doing yourself a disservice using one, since you won’t know when it is making up stuff (that it thinks should be there, but isn’t) and it will only confuse you more.

1 Like

Installed ESPHome via python. Edited yaml from ESPHome inside HA, install and error out an get the same old error.

You might need an exorcist. :fearful:
Post your last yaml anyway for further review…

I don’t know what I just did, but now my yaml is this.


substitutions:
  name: esp-web-tools-example-a08248
  friendly_name: test
packages:
  esphome.esp_web_tools_example: github://esphome/example-configs/esp-web-tools/esp32.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: 05raIjif1KfMzxd0/1VURsGebBuVKp/5A8FUxlF6vY0=


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Wouldn’t be my choice to debug mysterious problem.
Did you ever try some plain minimum setup?

Ok, I’m in the weeds, Don’t know what I did, but it’s working. Do I need the OTA and AP: Passwords?

Do I also have to install everytime I change the yaml code?

For debugging I would not use Ota, Ap or Captive portal.

Got everything up and running.

For some reason, installing ESPHome via Python didn’t resolve the errors I was encountering. However, after the ESP32_WEB_TOOLS demo was inadvertently installed from the website, I edited the YAML and installed it again—this time it compiled without any issues.