cdrom1028
(cdrom1028)
April 22, 2022, 2:03pm
1
I just got one of these things and I cant figure out which board option to use…
The specs say it contains an ESP32-PICO-D4
This thing has WiFi and BLE which makes it awesome for BLE proxy for plant sensors, switchbot, and anything else BLE you need to connect to. But I cant figure out which board to use… The web-installer works great and sets it up for onboarding but its not telling me what board to use…
nickrout
(Nick Rout)
April 22, 2022, 9:04pm
2
One from here (which is searchable) PlatformIO Registry
cdrom1028
(cdrom1028)
April 24, 2022, 5:57am
3
I figured it out… now I need to get the screen to work.
nickrout
(Nick Rout)
April 24, 2022, 5:59am
4
Thanks for enlightening the rest of us
cdrom1028
(cdrom1028)
April 24, 2022, 6:21am
5
Here is the base config I got up and running…
substitutions:
devicename: m5-atomu-test
friendly_name: M5 AtomU test
esphome:
name: $devicename
esp32:
board: esp32dev
# framework:
# type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${friendly_name}"
password: "!secret ap_password"
captive_portal:
web_server:
port: 80
text_sensor:
- platform: version
name: "${friendly_name} ESPHome Version"
icon: mdi:information-outline
hide_timestamp: True
- platform: template
name: "${friendly_name} Uptime"
id: uptime_human
icon: mdi:clock-start
- platform: wifi_info
ip_address:
name: ESP IP Address
ssid:
name: ESP Connected SSID
bssid:
name: ESP Connected BSSID
mac_address:
name: ESP Mac Wifi Address
scan_results:
name: ESP Latest Scan Results
I got two devices (M5 AtomU and M5 StickC PLUS ) that use the same base. Now I can build out the rest of the functionality. These devices are just loaded with tech options!
like the StickC Plus has a ST7789V TFT LCD but I need to figure out the pinout.
1 Like
cdrom1028
(cdrom1028)
April 26, 2022, 2:07am
6
Ok if you found this thread, you should move over to he thread that has better info on this topic…
I got my M5Stick Cplus working too!
I am sharing my unfinished code as the screen is working and others can use it as an example on top of what you shared. The rest of the code is not fully functional yet (ideally it will control a fan in a network rack based on temperature, and Home Assistant will be able to override things such as disabling the fans so one can watch a movie without the noise - rack is in my media room).
The code below only works after placing the files from Ian Geiser in the…
blackie333
(Blackie333)
September 11, 2023, 8:42am
7
Any AtomU owner with working Voice Assistance config for the microphone?
I have tested several microphone configurations but still no success…
substitutions:
device_name: "m5stack-atomu"
friendly_name: "M5Stack AtomU"
esphome:
name: ${device_name}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
project:
name: esphome.mic-to-stt
version: "1.0"
on_boot:
priority: -100
then:
- light.turn_on:
id: status_led
brightness: 20%
red: 0%
green: 100%
blue: 0%
- delay: 5s # stop the light after 5s
esp32:
board: m5stack-atom
framework:
type: arduino
# type: esp-idf
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: .lan
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${device_name}
password: !secret wifi_ap_password
captive_portal:
# Enable Home Assistant API & OTA
api:
encryption:
key: !secret ESPHome_secret
ota:
password: !secret OTA_password
# Enable logging
logger:
improv_serial:
# WiFi signal diagnostic sensors
sensor:
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
id: wifi_signal_db
name: "WiFi Signal dB"
update_interval: 60s
entity_category: "diagnostic"
- platform: copy # Reports the WiFi signal strength in %
id: wifi_signal_percent
name: "WiFi Signal Percent"
source_id: wifi_signal_db
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "%"
entity_category: "diagnostic"
## Device-specific
light:
- platform: neopixelbus
type: GRB
variant: SK6812
pin: 27
num_leds: 1
id: status_led
internal: true
name: Light
default_transition_length: 0.1s
i2s_audio:
id: adc_mic
i2s_lrclk_pin: GPIO5
#i2s_bclk_pin: false
#i2s_mclk_pin: false
microphone:
- platform: i2s_audio
id: atomu_microphone
adc_type: external
i2s_audio_id: adc_mic
pdm: true
channel: right
i2s_din_pin: GPIO19
on_data:
- logger.log:
format: "Received %d bytes"
args: ['x.size()']
voice_assistant:
microphone: atomu_microphone
binary_sensor:
- platform: gpio
pin:
number: GPIO39
inverted: true
name: Button
id: button
on_press:
- light.turn_on:
id: status_led
brightness: 100%
red: 100%
green: 0%
blue: 0%
- voice_assistant.start:
on_release:
- voice_assistant.stop:
- light.turn_on:
id: status_led
brightness: 20%
red: 0%
green: 100%
blue: 0%
1 Like
WaltL
(Walt Lillyman)
October 18, 2023, 11:50pm
8
@blackie333 Did you have any luck getting AtomU to work with Voice Assistant?
blackie333
(Blackie333)
October 19, 2023, 5:09am
9
Not yet, will try again today after ESPHome 10.1 update…
blackie333
(Blackie333)
October 19, 2023, 5:07pm
10
Still nothing but I don’t know how to test whether the microphone configuration is correct.
Don’t know why some simple microphone test function is not available in ESPhome?
Testing via full voice assistant workflow is very frustrating because you can’t be sure whether the voice was just not recognized or microphone config is incorrect…
blackie333
(Blackie333)
December 6, 2023, 11:20pm
11
I have modified an Echo official version for AtomU which is quite OK, at least the microphone is working. Some stability problems arise after VA generates response probably because of missing speaker or high load on AtomU but not sure (maybe the echo has similar problems).
substitutions:
device_name: "m5stack-atomu"
friendly_name: "M5Stack AtomU"
esphome:
name: ${device_name}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
project:
name: m5stack.atomu-voice-assistant
version: "1.0"
min_version: 2023.11.1
esp32:
board: m5stack-atom
framework:
type: esp-idf
external_components:
- source: github://pr#5230
components:
- esp_adf
refresh: 0s
esp_adf:
dashboard_import:
package_import_url: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: .lan
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${device_name}
password: !secret wifi_ap_password
on_connect:
- delay: 5s # Gives time for improv results to be transmitted
- ble.disable:
on_disconnect:
- ble.enable:
captive_portal:
# Enable Home Assistant API & OTA
api:
encryption:
key: !secret ESPHome_secret
ota:
password: !secret OTA_password
# Enable logging
logger:
level: verbose
improv_serial:
# WiFi signal diagnostic sensors
sensor:
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
id: wifi_signal_db
name: "WiFi Signal dB"
update_interval: 60s
entity_category: "diagnostic"
- platform: copy # Reports the WiFi signal strength in %
id: wifi_signal_percent
name: "WiFi Signal Percent"
source_id: wifi_signal_db
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "%"
entity_category: "diagnostic"
## Device-specific
globals:
- id: init_in_progress
type: bool
restore_value: no
initial_value: 'true'
light:
- platform: esp32_rmt_led_strip
id: led
name: None
disabled_by_default: true
entity_category: config
pin: GPIO27
default_transition_length: 0s
chipset: SK6812
num_leds: 1
rgb_order: grb
rmt_channel: 0
effects:
- pulse:
name: "Slow Pulse"
transition_length: 250ms
update_interval: 250ms
min_brightness: 50%
max_brightness: 100%
- pulse:
name: "Fast Pulse"
transition_length: 100ms
update_interval: 100ms
min_brightness: 50%
max_brightness: 100%
button:
- platform: factory_reset
id: factory_reset_btn
name: Factory reset
i2s_audio:
i2s_lrclk_pin: GPIO5
i2s_bclk_pin: false
i2s_mclk_pin: true
microphone:
- platform: i2s_audio
id: atomu_microphone
adc_type: external
pdm: true
channel: left
i2s_din_pin: GPIO19
#on_data:
#- logger.log:
# format: "Received %d bytes"
# args: ['x.size()']
speaker:
- platform: i2s_audio
id: dummy_speaker
i2s_dout_pin: GPIO33 #GPIO22 for Atom Echo
dac_type: external
mode: mono
voice_assistant:
id: va
microphone: atomu_microphone
speaker: dummy_speaker
noise_suppression_level: 2
auto_gain: 31dBFS
volume_multiplier: 2.0
vad_threshold: 3
on_listening:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
effect: "Slow Pulse"
on_stt_vad_end:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
effect: "Fast Pulse"
on_tts_start:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
brightness: 100%
effect: none
on_end:
- delay: 100ms
- wait_until:
not:
speaker.is_playing:
- script.execute: reset_led
on_error:
- light.turn_on:
id: led
red: 100%
green: 0%
blue: 0%
brightness: 100%
effect: "Slow Pulse"
- delay: 1s
- script.execute: reset_led
on_client_connected:
- if:
condition:
switch.is_on: use_wake_word
then:
- voice_assistant.start_continuous:
- script.execute: reset_led
on_client_disconnected:
- if:
condition:
switch.is_on: use_wake_word
then:
- voice_assistant.stop:
- light.turn_off: led
binary_sensor:
- platform: gpio
pin:
number: GPIO39
inverted: true
name: Button
disabled_by_default: true
entity_category: diagnostic
id: push_button
on_multi_click:
- timing:
- ON for at least 250ms
- OFF for at least 50ms
then:
- if:
condition:
switch.is_off: use_wake_word
then:
- if:
condition: voice_assistant.is_running
then:
- voice_assistant.stop:
- script.execute: reset_led
else:
- voice_assistant.start:
else:
- voice_assistant.stop
- delay: 1s
- script.execute: reset_led
- script.wait: reset_led
- voice_assistant.start_continuous:
- timing:
- ON for at least 10s
then:
- button.press: factory_reset_btn
script:
- id: reset_led
then:
- if:
condition:
- switch.is_on: use_wake_word
- switch.is_on: use_listen_light
then:
- light.turn_on:
id: led
red: 0%
green: 100%
blue: 0%
brightness: 50%
effect: none
else:
- light.turn_off: led
switch:
- platform: template
name: Use wake word
id: use_wake_word
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
on_turn_on:
- lambda: id(va).set_use_wake_word(true);
- if:
condition:
not:
- voice_assistant.is_running
then:
- voice_assistant.start_continuous
- script.execute: reset_led
on_turn_off:
- voice_assistant.stop
- lambda: id(va).set_use_wake_word(false);
- script.execute: reset_led
- platform: template
name: Use Listen Light
id: use_listen_light
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
on_turn_on:
- script.execute: reset_led
on_turn_off:
- script.execute: reset_led
1 Like
rct
December 15, 2023, 8:49pm
12
Thanks for this. If you make any progress, please keep us posted.
(I just found I had an AtomU sitting in a box. The Atom Echo Development kit is currently out of stock.)