What I have is: Raspberry pi 3B+
PC with Windows 10
ESP32-WROOM-32 30pin module
- Core2024.1.6
- Supervisor2023.12.1
- Operating System11.4
- Frontend20240104.0
ESPHome 2023.12.5
My HASS dashboard is in Norwegian, the translation of terms may be a bit different from the correct English wording.
My question is, after I made all below, still the .yaml configuration file is solely local on my PC. There’s no .yaml on the Raspberry. Is that correct, that I am able to edit the ESPHome configuration only from this PC?
Anyway, this information may be helpful for others that struggle to seup the ESPHome. I found many other advices that did not help so this is yet another one as soon as I figure out this location of the .yaml
Problem and solution
The “missing” .yaml was just a result of conflicting methods of installation. Have look at the bottom to see the cause and solution.
History:
By trying I found that the Rpi 3B+ cannot compile (due to memory?) so I made it the Manual way but it failed.
So I went the Manual way :
https://esphome.io/guides/installing_esphome
Installed Python - in cmd window: ‘>pip3 install wheel and’ ‘> install esphome’
As you can see in
I struggled and failed to complete this.
This path made it better:
On the Raspberry I deleted all files of the \192.168.1.17\config\esphome+ directory. And in HASS I deleted Unit and Entities so there was only the ‘Configuration-’>Integration->ESPHome’ left to prepare for a fresh new device.
However there’s still an ESPHome dashboard here, empty.
Integration ESPHomme in HASS, this was made earlier:
As mentioned above I deleted all ESP module specifics after this.
Now, instead of the install above I did:
Run the wizard:
‘>esphome wizard brann.yaml’
Here I define ESPmodules name, function, name etc by wizard
Find the proper ESP device in the list, in my case Espressif ESP32. I have the ESP-WROOM-32 30pins with no identification of manufacturer.
And thereafter more specific, I used ESP32dev
Once complete, So where’s the .yaml file? I found it on my PC-disk as C:\Users'>my_name>\brann.yaml’
That’s where I open and edit it:
Added a switch to yaml like the example: (Note I mistyped the room to rook)
switch:
’ - platform: gpio’
’ name: “Living rook dehumidifier”’
’ pin: 5’
Compile by cmd:
‘>esphome run brann.yaml’
During this I get some queestions:
Select port (OTA Wireless or PORT)
Compilation printout stops, last lines are:
API Server:
Address: …
Using noise encryption: NO
5 minutes after this: 3 lines of Boot seems succesful, Saving preference etc
I checked the WiFi router, ESP is not in the device list
10 minutes later: More output in DOS: forcing reboot etc - Still not in routers list
4 minutes later: Same last 3 lines as above. Still no ESP in router device list, no .yaml in Raspberry’s \192.168.1.17\config\esphome directory
In HASS Integrations there’s a the ESPHome, click Configure and Password = And area (room)
Tada! Here it is, with 2 enitities ! The switch and firmware status. Based on this I should be able to add more to the .yaml and recompile the firmware. (But I thought it was sufficient to edit thee .yaml and refresh it from the HASS - Developer - Load Yaml, seems this is not the case)
(Note that my HASS panel on PC locked so only the main and Unit/Integration page showed data. I used my Galaxy pad to fulfill the integration.
At this stage, there’s a Raspberry file \192.168.1.17\config\esphome\secrets.yaml - but still no brann.yaml here.
And still there’s an ESPHome dashboard which was here from the start where the only option is to add a New device. This option is to add yet another (second) ESP, not to add the one I have added. And I’m not able to remove this dashboard.
What I learned is that when I setup the ESPHome Dashboard this made a .yaml file and I used the same name for the ESP device, Dashboard and .yaml file (Came from default). And when I edited this .yaml it did not result in any changes. So I came closer to my goal by this approach. I made some trouble to mayself by introducing a separate dashboard for the ESPdevice. I rather wait with this until I get control of this first part.
brann.yaml:
esphome:
name: brannsentral
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "***"
ota:
password: "***"
wifi:
ssid: "***"
password: "***"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Brannsentral Fallback Hotspot"
password: "EoZrlPFbjohy"
captive_portal:
switch:
- platform: gpio
name: "Living rook dehumidifier"
pin: 5