I’ve now spent most of the day into the evening (at least 7 hours) trying to install an Atom Echo on HAOS (latest version). The device appeared to install this morning but with a solid red light, no response to button presses and no media player entity in Home Assistant.
After many attempts to fix things and recurring errors of all kinds, I uninstalled the ESPHome add-on and (from File Editor) attempted to manually delete all the files left behind in the ESPHome folders, but eventually gave up because of apparently dozens of subfolders. Shouldn’t these be deleted automatically when the add-on is uninstalled?
I then reconnected the device to the USB port on my Windows PC
Clicked “Install Voice Assistant” and waited until “Installation complete” appeared.
Clicked “Next” and then entered Wi-Fi credentials when prompted.
Clicked “Next” again and got the prompt “Open page in your Home Assistant? You’ve been linked to the page that will start setting up a new integration.”
On “Do you want to set up ESPHome?”, clicked OK (I had not reinstalled the integration at this point because the page didn’t ask me to.)
I then saw the dreaded prompt “Please enter connection settings of your ESPHome node”. Surely this node should not exist at this point!
I entered the details
Host (My host’s IP address - double checked. Static IP address reserved in my router. Putting http:// before this made no difference)
Port 6053
This gave the error “Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.” - the same error I’d seen earlier that had prompted me to uninstall and reinstall. On the reinstall attempt I was not given an encryption key, which had happened on each previous attempt.
Can anyone tell me why this is happening when I’m trying to install ESPHome and the device again from scratch, and how I can get round it?
Thanks - yes, ESPHome is on the same server as my Home Assistant. I finally resolved that issue and have to admit that it was my mistake: the static IP address in my config file was for the Atom Echo and not the server… a stupid mistake but an easy one to make as the default comment in the file says “the address of the ESP” which implies the ESP (wireless) device and not the server. Once I entered the server address, I could finally install the Atom without errors.
I now need to figure out why, although I can switch its red light on and off from Home Assistant, nothing at all happens (not even its expected blue/green light) when I press the button on the Atom. (The references to the actions including the light colours are there in the YAML config file.)
I’m even more confused now. Attempting to fix the last error above, I have attempted a couple of times to update my Echo device. At the end of this process, I see the error below.
Successfully created esp32 image.
esp32_create_combined_bin(["/data/atom-echo-277/.pioenvs/atom-echo-277/firmware.bin"], ["/data/atom-echo-277/.pioenvs/atom-echo-277/firmware.elf"])
Wrote 0x13e040 bytes to file /data/atom-echo-277/.pioenvs/atom-echo-277/firmware-factory.bin, ready to flash to offset 0x0
========================= [SUCCESS] Took 58.38 seconds =========================
********************************************************************************
We found 1.03GB of unnecessary PlatformIO system data (temporary files, unnecessary packages, etc.).
Use `pio system prune --dry-run` to list them or `pio system prune` to save disk space.
INFO Successfully compiled program.
INFO Connecting to 192.168.1.37
ERROR Connecting to 192.168.1.37:3232 failed: [Errno 111] Connection refused
.37 is the address of my HAOS server, not the Atom Echo which is on .38. If connecting to ESPHome works only when I set the static IP address above for my server, where do I tell HA/ESPHome the address of the Atom Echo?
Thanks. Here is the YAML for the Atom Echo device.
esphome:
name: atom-echo-277
friendly_name: Atom Echo
i2s_audio:
i2s_lrclk_pin: GPIO33
i2s_bclk_pin: GPIO19
esp32:
board: m5stack-atom
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "wsEhCQf9cN+jhxj6Arq1+Fift4nASuWTO2GDGRBJcO8="
ota:
password: "eb9917fd7d7aa84f493303b61d03b713"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
# Set this to the IP of the ESP (device?)
static_ip: 192.168.1.38
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Atom-Echo-277 Fallback Hotspot"
password: "3NXyGBA2ChXQ"
improv_serial:
microphone:
- platform: i2s_audio
id: atom_echo_microphone
i2s_din_pin: GPIO23
adc_type: external
pdm: true
voice_assistant:
microphone: atom_echo_microphone
on_start:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
effect: none
on_tts_start:
- light.turn_on:
id: led
blue: 0%
red: 0%
green: 100%
effect: none
on_tts_end:
# - media_player.play_media: !lambda return x;
- light.turn_on:
id: led
blue: 0%
red: 0%
green: 100%
effect: pulse
on_end:
- delay: 1s
- wait_until:
not:
media_player.is_playing: media_out
- light.turn_off: led
on_error:
- light.turn_on:
id: led
blue: 0%
red: 100%
green: 0%
effect: none
- delay: 1s
- light.turn_off: led
binary_sensor:
- platform: gpio
pin:
number: GPIO39
inverted: true
name: Button
id: echo_button
# Note: the next two triggers were missing from the initial config - explains why nothing happened when pressing button!
on_press:
- voice_assistant.start:
on_release:
- voice_assistant.stop:
on_multi_click:
- timing:
- ON FOR AT MOST 350ms
- OFF FOR AT LEAST 10ms
then:
- media_player.toggle: media_out
- timing:
- ON FOR AT LEAST 350ms
then:
- voice_assistant.start:
- timing:
- ON FOR AT LEAST 350ms
- OFF FOR AT LEAST 10ms
then:
- voice_assistant.stop:
media_player:
- platform: i2s_audio
id: media_out
name: None
dac_type: external
i2s_dout_pin: GPIO22
mode: mono
light:
- platform: esp32_rmt_led_strip
id: led
name: None
pin: GPIO27
default_transition_length: 0s
chipset: SK6812
num_leds: 1
rgb_order: grb
rmt_channel: 0
effects:
- pulse:
transition_length: 250ms
update_interval: 250ms
After a reinstall on the device it now shows as persistently offline, regardless of the static IP address in the above (and reloading YAML after changing it). I’m baffled by the fact that there are 3 rather than 2 IP addresses relating to the installation (ESP_049B2 on .19, homeassistant on .37 and m5-stack-atom-echo-82be60 on .38), especially as all have Mac addresses. Is the ESP installation meant to have its own IP address even when it’s just a piece of software on .37? Isn’t a Mac address just for hardware? The latter two IP addresses are both reserved for the devices on my router.
After yet another reinstallation, this time using “PREPARE FOR FIRST USE”, setup failed right at the end with “socket operation failed” and then “invalid encryption key”, despite the fact that the key I was given during this installation matches the one in my YAML file. I can see this was logged as an issue on GitHub and it seems the developers flagged it as fixed: not for me!
I even went back and deleted the ESPHome add-on and started from scratch. I got a new encryption key and again checked the YAML file, but with the same result. It seems that this device is strictly for experts and mine may well end up in the bin for the sake of my mental health.
I already have. I even removed the integration and re-added that but still got the encryption key error. I must have now tried to install the thing 15 times over a period of days and spent about 20 hours on it. Initially it seemed to install but, although I could switch its red light on and off from HA, I couldn’t get it to trigger any events by pressing its button (the light didn’t illuminate when I did that). I’ve decided that enough is enough and it’s been discarded. Thanks for trying to help.
For some reason, the entity light.m5stack_atom_echo_xxx is disabled after configuring the ESPHome node. If you go to the Atom Echo device in Home Assistant, you will likely see “1 entity not shown” somewhere. Click on this message, and you will see the disabled entity. After enabling this entity I could use my Atom Echo device to trigger events.