Beginner ESPHome help

Hi all.
I have done a bit of Googling to try and work out where I’m going wrong, but either I don’t know what to search for, or I can’t find anything like my problem. I suspect its a simple issue and I’m just missing something basic.
I’ll add some context that will hopefully aid understanding.
Several months ago, I set up HA on a Raspberry Pi so that I could use ESPHome to control most my lighting. So far this has been done using some neat little boards I found online, that take an ESP, 5 MOSFETs and some associated circuitry to drive RGBWW strip.
Building the PCBs is well within my wheelhouse, I’m a hardware guy. I spend a fair bit of my free time doing board level repairs on vintage computers. Code on the other hand is completely over my head currently, but I hope to learn as I get my experience.
Initially, I bodged together two bits of code I found online, that, somehow, resulted in functional LEDs.
Unfortunately a couple of weeks ago, I had to do a clean installation of HA (Long story, couldn’t update due to too small a partition, couldn’t backup, tried resizing partition in Windows, bricked the lot).
Before I did this, I saved the yaml files in ESPHome, which worked flawlessly before, so I could just reupload them once reinstalled.
However, now, I plug the ESP into the Pi, upload this yaml file, unplug it from the Pi and connect it to its regular power source and nothing. Doesn’t show up in ESPhome at all.
I’m just getting myself more and more confused and could do with some pointers if at all possible.
As soon as I figure out how, I shall upload the log from when I upload the yaml to the ESP.
I have made sure my “secrets.yaml” is correct, to my knowlege.
Cheers
Andrew

It doesn’t show up in esphome or it doesn’t show up in HA at all? You shouldt have to do anything, it should have been automatically discovered if you had previously flashed it. It won’t show up in eaphome unless you upload the yaml file into the esphome folder but it should still be visible in HA and you should have your entities available.

So, I’m uploading yaml, the device is showing up in ESPhome, but just saying offline. It is showing up in HA, but just errors out every time I try and configure it.
Andrew

Show your ESPHome config/YAML.

I suspect because I’m a new user, I can’t attach the file.
This is the basic yaml that ESP home tries to install when I try to add a new device. My understanding is that this should be enough to get it to appear as online in ESPhome and upload a new configuration wirelessly. This yaml is uploaded to the ESP using a USB cable plugged into the Pi.

esphome:

  name: augtest

  friendly_name: Augtest

esp32:

  board: esp32dev

  framework:

    type: arduino

# Enable logging

logger:

# Enable Home Assistant API

api:

  encryption:

    key: "Y5nfiMRB4PTcRjb+M6MdPLrxO5T2YbxUkm8Yi/sIS+Q="

ota:

  password: "a5e3178f0e2a1155b32413911e5d2623"

wifi:

  ssid: !secret wifi_ssid

  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails

  ap:

    ssid: "Augtest Fallback Hotspot"

    password: "vquNsMqvVLTN"

captive_portal: 

Once this is uploaded, which completes without any obvious errors, the ESP is unplugged from the Pi and plugged into its power source. It then doesn’t appear as online in the ESP home on HA.
Cheers
Andrew

You mentioned you had to setup things fresh and copied your YAML. Did you also copy/setup your secrets file?

Sorry, should have said, my secrets file is set up correctly, to the best of my understanding
Andrew

No worries, just spit-balling. :slight_smile:

Does the fallback hotpot show up? Can you look in your router and see if the device is showing up there?

Edit: BTW, when you do a fresh install, your existing ESPHome devices should still be auto-discovered without adding their YAML to your new install or re-flashing them. For instance, I have a second HA setup in my trailer that connects to my home network when at home. All my devices just show up on it without me doing anything.

I have these lines appearing in my log, so I presume this is connecting correctly?

[00:25:16][I][wifi:274]: WiFi Connecting to 'Skipnet '...
[00:25:19][I][wifi:557]: WiFi Connected!
[00:25:19][C][wifi:379]:   Local MAC: 78:21:84:E0:F9:5C
[00:25:19][C][wifi:380]:   SSID: 'Skipnet '[redacted]
[00:25:19][C][wifi:381]:   IP Address: 192.168.68.115
[00:25:19][C][wifi:383]:   BSSID: 10:27:F5:64:D3:B2[redacted]
[00:25:19][C][wifi:384]:   Hostname: 'augtest'
[00:25:19][C][wifi:386]:   Signal strength: -60 dB ▂▄▆█
[00:25:19][C][wifi:390]:   Channel: 4
[00:25:19][C][wifi:391]:   Subnet: 255.255.255.0
[00:25:19][C][wifi:392]:   Gateway: 192.168.68.1
[00:25:19][C][wifi:393]:   DNS1: 192.168.1.1
[00:25:19][C][wifi:394]:   DNS2: 192.168.68.1
[00:25:19][D][wifi:566]: Disabling AP...
[00:25:19][C][ota:093]: Over-The-Air Updates:
[00:25:19][C][ota:094]:   Address: augtest.local:3232
[00:25:19][C][ota:097]:   Using Password.
[00:25:19][C][api:025]: Setting up Home Assistant API server...
[00:25:19][I][app:062]: setup() finished successfully!

Andrew

I am not seeing the fall back hotspot showing up.
I can’t for the life of me remember my router password currently, so can’t look in there at the moment.
I do have the ESP devices eventually show up in HA under “settings”, “devices”, however whenever I click the configure button, it just says that it can’t connect to it. I deeply regret trying to update HA, as before all this, it worked perfectly!
Andrew

Did you add it to home assistant in devices and services? Open your Home Assistant instance and show your integrations.

So, under “Settings”, “Devices and services”, “Augtest” shows up on the integrations tab, with the options “Configure” and “Ignore” under it.
If I click “Configure” it asks " Do you want to add the ESPHome node augtest to Home Assistant?"
I click “Submit”
It then waits for a minute or two, before coming up with the error “Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.”
Andrew

I suspect that you may need to delete the device (next to configure button, the three dots). It should then automatically be discovered (you may need to restart Home Assistant for this to happen).

I don’t seem to have any option to delete devices. Theres 3 dots in the top right corner of the device “tile”, but clicking this just gives a link to documentation.
Andrew

Try ignoring it and then add it manually.

Device ignored.
I click “Add intergration”, then select ESPHome. It then asks me for host and port settings. Where abouts do I find these? Do I have to manually set these up in my yaml file?
Andrew

Through all this, in the ESPhome tab, the device is showing up as offline. Back when this all used to work, these always showed up as online. This is whats making me think that there is some problem with my yaml file.
Andrew


You don’t have the option to delete here (I’m on the app, so it will look a little different)?

You actually don’t even NEED the add-on, it’s just used for compiling and flashing the code to the device.

I’ve switched to the app, just so we are on the same page.
I can’t even find a screen that looks the same as what you have there. Can you confirm where you are in that screenshot and I’ll go and check out my options.
I think I’m starting to understand the role of the esphome part of this. however my concern with it showing as “offline” there, is that my feeling now, is that the ESP is connecting when plugged into the Rasp Pi, but then when removed and plugged into its power source, is just sitting there and not doing anything.
Andrew

Also, as a new user, I’ve reached my maximum number of posts for today, so apologies, I’ll have to carry on tomorrow

Settings - Devices & Services - ESPHome