MoritzS
February 13, 2024, 1:14pm
3
I’ve tested with a case where the Temp is at the bottom and LD24** at the top with passive ventilation from bottom to top and the difference between bottom of room and ceiling was greater then with/-out LD****. of course, you can’t use a totally closed case. Then also smoke detection doesn’t work. So the plan in the beginning is to use the hot air from LD**** to suck in more air and have better ventilation and “fresh” air at the sensors at the bottom center.
But with a temp offset in code, this can also be fixed.
5 Likes
@MoritzS I really like your project and will follow closely as you are building the type of device I’ve been looking for quite a while. As for the temperature offset in code, that would require the heat from the LD2410 to affect the BME680 always in the same way. While I don’t have a way to perform professional measurements, I got the impression that it’s effect varies with the environmental temperature so a fixed offset may not be ideal. What do you think?
2 Likes
MoritzS
February 14, 2024, 6:53am
5
There are several issues I already know and you didn’t think about it yet.
Status LED which indicates air quality and light sensor.
Heat and temperature
Radar waves from 2 devices
Air quality pending on humidity
If you look closer at the area above the LED (where LED1-6 is written), there is a 80x3mm area with no parts at all. This is supposed to be covered by a black plastic piece with 2 wholes at the side. So you have an air flow from center bottom, where sensors are, to the side and top where LD2410/50 and BH1750 are.
My hope is to isolate the 2 groups that much, it can’t effect each other. As said before, I’ll have ventilation holes in the case at some spots.
I have an IR thermostat to measure Temp while with/-out mmWave and if there is a continuous higher temp of 1° this can be offset by code. It’s not that the LD24** produce lot of heat one time while on, and no heat other time. So the offset should be always the same (with air coming from bottom first).
This is an interesting concept. I hope it works out as expected.
1 Like
MoritzS
February 21, 2024, 8:17am
7
Besides the microphone, everything works out great at the moment. I already set it up on breadboard while PCB are in production and code is almost finished. Specially the AQS LED and presence detection with LED indicator is nice. Still working on optimisation and try to work out which entity’s I should disable, hide and group. I have over 140 values so far.
VA is as bad as with every single INMP441 microphone I have to admin. Hopefully there will be a big improvement by the mic array.
PCB are in production and will be here end of month I hope.
2 Likes
eskape
February 21, 2024, 3:51pm
8
I am wondering if there is already a way to integrate multiple microphones as an array, e.g. the mentioned INMP441, using ESPHome? Or what kind of microphones will be used on the final board?
MoritzS
February 21, 2024, 3:56pm
9
No, esphome and VA can only have one mic for left or right channel. That’s why I’m using up to 8 pdm microphones with es7210. The 4 onboard are left channel and the 4 additional are right channel.
The mics I’m using are MP34DT05TR-A. With a sensitivity of -26dB and 64dB SNR they sounded promising for the price of 1$.
MoritzS
February 25, 2024, 4:12pm
10
So, according to jlcpcb, I will actually get the PCB prototypes before the contest deadline. They should be finished tomorrow and shipped early this week.
I kinda finished my codebase and besides pin mapping it works like a charm now. I have a nice display of air quality, movement, still presence and target detection. I already dropped the sgp40 sensor and thought “what would I change?”.
So while playing around with code and layout, I actually tried to add a camera interface and split i2s between mic in and speaker out So now, if I didn’t screw up the ES7210 circuit and mic array, I’ll extend my boards with OV5640 and be able to send me a picture of the environment when I have bad air quality or unexpected motion detection.
Fun fact: I used every pin avaible on ESP32-S3-Wroom-1…
Also I’ve moved the LEDs to the very bottom, moved around the microphones, USB connector and light sensor. The code is now on Github and when the PCB are here, I can test the final version and Pin-Mapping. Still need to add more comments and cleanup to fix copy and paste errors.
7 Likes
Alextrical
(Ben Jackson)
March 2, 2024, 10:06pm
11
I was pondering over a project like this, and have been wondering how well XVF-3000 would work for the mic array.
I’m hoping that the eventual hardware the community comes up with will be able to function as a media renderer too, I really want to get rid of those Alexa devices
1 Like
The XVF-3000 is used in respeaker AMD other boards, but I don’t think it can be used with esp32 or similar.
I’m playing around with Voice now for half a year to get rid of Alexa and I don’t think it’s possible by the current implementation in HA. Specially not if you’re using esp32 as satellites…
https://heywillow.io/ is a better approach, but it’s harder to install and setting up the WIS server to get it away from someones cloud. Also wake words are an issue and I don’t like much, willow requires the S3-BOX-3 with touch and no other hardware and sensors… It would be great to have esphome style installation for Willow and customization, but who knows what comes in the future…
By the way, I’ve played around with my PCBs today and lot of failures. Everything is working as expected, besides the es7210. Need to figure this issues tomorrow and get voice up and running. At the moment, the es7210 gets recognized by VA, but the is in a mute state and no voice gets picked up.
Ah, yes after looking over the data sheet again it does look like it’s a USB board. Possibly the XVF3510 could be the version that could work, having I2S and I2C lines for communication.
Unfortunately I’m also thinking the same thing with the ESP32, it’s a wonderful chip but it’s probably not best suited to handle everything we want/need from a satellite.
As for the PCB’s awesome to hear that they work bar a few sensors. For now possibly try to not bite off more than you can chew and focus on improving what works. At the moment I think the ideal solution would be something that can replicate/replace an Echo Dot V3, i.e far field audio and a decent playback speaker, with the addition of a couple of simple sensors (Temp, humidity, lux)
Alextrical:
As for the PCB’s awesome to hear that they work bar a few sensors. For now possibly try to not bite off more than you can chew and focus on improving what works. At the moment I think the ideal solution would be something that can replicate/replace an Echo Dot V3, i.e far field audio and a decent playback speaker, with the addition of a couple of simple sensors (Temp, humidity, lux)
Well, I was reading hunderts of pages last night and this morning to figure out where I f***ed it… It doesn’t look like it’s the hardware, but the ES7210 components and ESP-ADF handling of pins and busses. For example
opened 11:19AM - 26 Dec 23 UTC
### The problem
Hello,
Voice Assistant is installed on the ESP32-S3-BOX-3.
Af… ter activating i2c. The Voice Assistant pipeline no longer activates after a few hours. A factory reset does not help. Only deactivating the i2c components and reflashing helps.
The Red Button under the Display does not work either.
Best regards,
M.
### Which version of ESPHome has the issue?
2023.12.3
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
2023.12.3
### What platform are you using?
ESP32-IDF
### Board
ESP32-S3-BOX-3
### Component causing the issue
Voice assistant
### Example YAML snippet
```yaml
substitutions:
name: esp32-s3-box-3-5ace4c
friendly_name: ESP32 S3 Box 3
loading_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/loading_320_240.png
idle_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/idle_320_240.png
listening_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/listening_320_240.png
thinking_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/thinking_320_240.png
replying_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/replying_320_240.png
error_illustration_file: https://github.com/esphome/firmware/raw/main/voice-assistant/casita/error_320_240.png
loading_illustration_background_color: '000000'
idle_illustration_background_color: '000000'
listening_illustration_background_color: 'FFFFFF'
thinking_illustration_background_color: 'FFFFFF'
replying_illustration_background_color: 'FFFFFF'
error_illustration_background_color: '000000'
voice_assist_idle_phase_id: '1'
voice_assist_listening_phase_id: '2'
voice_assist_thinking_phase_id: '3'
voice_assist_replying_phase_id: '4'
voice_assist_not_ready_phase_id: '10'
voice_assist_error_phase_id: '11'
voice_assist_muted_phase_id: '12'
#wifi_update_interval: 3s
#packages:
# esphome.voice-assistant: github://esphome/firmware/voice-assistant/esp32-s3-box-3.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
platformio_options:
board_build.flash_mode: dio
project:
name: esphome.voice-assistant
version: "1.0"
min_version: 2023.11.5
on_boot:
priority: 600
then:
- script.execute: draw_display
- delay: 30s
- if:
condition:
lambda: return id(init_in_progress);
then:
- lambda: id(init_in_progress) = false;
- script.execute: draw_display
api:
encryption:
key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
on_client_connected:
- script.execute: draw_display
on_client_disconnected:
- script.execute: draw_display
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
on_connect:
- script.execute: draw_display
- delay: 5s # Gives time for improv results to be transmitted
- ble.disable:
on_disconnect:
- script.execute: draw_display
- ble.enable:
esp32:
board: esp32s3box
flash_size: 16MB
framework:
type: esp-idf
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
CONFIG_AUDIO_BOARD_CUSTOM: "y"
CONFIG_ESP32_S3_BOX_3_BOARD: "y"
components:
- name: esp32_s3_box_3_board
source: github://jesserockz/esp32-s3-box-3-board@main
refresh: 0s
psram:
mode: octal
speed: 80MHz
external_components:
- source: github://pr#5230
components: esp_adf
refresh: 0s
ota:
logger:
hardware_uart: USB_SERIAL_JTAG
# level: VERBOSE
dashboard_import:
package_import_url: github://esphome/firmware/voice-assistant/esp32-s3-box-3.yaml@main
improv_serial:
esp32_improv:
authorizer: none
button:
- platform: factory_reset
id: factory_reset_btn
name: Factory reset
binary_sensor:
- platform: gt911
name: "Home Button"
index: 1
gt911_id: gt911_touchscreen
on_press:
then:
- light.toggle: led
- platform: gpio
pin:
number: GPIO1
inverted: true
name: "Mute"
disabled_by_default: true
entity_category: diagnostic
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: true
name: Top Left Button
disabled_by_default: true
entity_category: diagnostic
on_multi_click:
- timing:
- ON for at least 10s
then:
- button.press: factory_reset_btn
output:
- platform: ledc
pin: GPIO47
id: backlight_output
light:
- platform: monochromatic
id: led
name: LCD Backlight
entity_category: config
output: backlight_output
restore_mode: RESTORE_DEFAULT_ON
default_transition_length: 250ms
esp_adf:
board: esp32s3box3
microphone:
- platform: esp_adf
id: box_mic
speaker:
- platform: esp_adf
id: box_speaker
voice_assistant:
id: va
microphone: box_mic
speaker: box_speaker
use_wake_word: true
noise_suppression_level: 2
auto_gain: 31dBFS
volume_multiplier: 2.0 #2.0
vad_threshold: 3
on_listening:
- lambda: id(voice_assistant_phase) = ${voice_assist_listening_phase_id};
- script.execute: draw_display
- light.turn_on: led
on_stt_vad_end:
- lambda: id(voice_assistant_phase) = ${voice_assist_thinking_phase_id};
- script.execute: draw_display
on_tts_stream_start:
- lambda: id(voice_assistant_phase) = ${voice_assist_replying_phase_id};
- script.execute: draw_display
on_tts_stream_end:
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
- script.execute: draw_display
- light.turn_off: led
on_error:
- if:
condition:
lambda: return !id(init_in_progress);
then:
- lambda: id(voice_assistant_phase) = ${voice_assist_error_phase_id};
- script.execute: draw_display
- delay: 1s
- if:
condition:
switch.is_off: mute
then:
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
- light.turn_off: led
else:
- lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
- light.turn_on: led
- script.execute: draw_display
on_client_connected:
- if:
condition:
switch.is_off: mute
then:
- wait_until:
not: ble.enabled
- voice_assistant.start_continuous:
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
- light.turn_off: led
else:
- lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
- light.turn_on: led
- lambda: id(init_in_progress) = false;
- script.execute: draw_display
on_client_disconnected:
- lambda: id(voice_assistant_phase) = ${voice_assist_not_ready_phase_id};
- script.execute: draw_display
- light.turn_on: led
script:
- id: draw_display
then:
- if:
condition:
lambda: return !id(init_in_progress);
then:
- if:
condition:
wifi.connected:
then:
- if:
condition:
api.connected:
then:
- lambda: |
switch(id(voice_assistant_phase)) {
case ${voice_assist_listening_phase_id}:
id(s3_box_lcd).show_page(listening_page);
id(s3_box_lcd).update();
break;
case ${voice_assist_thinking_phase_id}:
id(s3_box_lcd).show_page(thinking_page);
id(s3_box_lcd).update();
break;
case ${voice_assist_replying_phase_id}:
id(s3_box_lcd).show_page(replying_page);
id(s3_box_lcd).update();
break;
case ${voice_assist_error_phase_id}:
id(s3_box_lcd).show_page(error_page);
id(s3_box_lcd).update();
break;
case ${voice_assist_muted_phase_id}:
id(s3_box_lcd).show_page(muted_page);
id(s3_box_lcd).update();
break;
case ${voice_assist_not_ready_phase_id}:
id(s3_box_lcd).show_page(no_ha_page);
id(s3_box_lcd).update();
break;
default:
id(s3_box_lcd).show_page(idle_page);
id(s3_box_lcd).update();
}
else:
- display.page.show: no_ha_page
- component.update: s3_box_lcd
else:
- display.page.show: no_wifi_page
- component.update: s3_box_lcd
else:
- display.page.show: initializing_page
- component.update: s3_box_lcd
switch:
- platform: template
name: Mute
id: mute
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
entity_category: config
on_turn_off:
- if:
condition:
lambda: return !id(init_in_progress);
then:
- lambda: id(va).set_use_wake_word(true);
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
- if:
condition:
not:
- voice_assistant.is_running
then:
- voice_assistant.start_continuous
- script.execute: draw_display
on_turn_on:
- if:
condition:
lambda: return !id(init_in_progress);
then:
- voice_assistant.stop
- lambda: id(va).set_use_wake_word(false);
- lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
- script.execute: draw_display
globals:
- id: init_in_progress
type: bool
restore_value: no
initial_value: 'true'
- id: voice_assistant_phase
type: int
restore_value: no
initial_value: ${voice_assist_not_ready_phase_id}
image:
- file: ${error_illustration_file}
id: casita_error
resize: 320x240
type: RGB24
use_transparency: true
- file: ${idle_illustration_file}
id: casita_idle
resize: 320x240
type: RGB24
use_transparency: true
- file: ${listening_illustration_file}
id: casita_listening
resize: 320x240
type: RGB24
use_transparency: true
- file: ${thinking_illustration_file}
id: casita_thinking
resize: 320x240
type: RGB24
use_transparency: true
- file: ${replying_illustration_file}
id: casita_replying
resize: 320x240
type: RGB24
use_transparency: true
- file: ${loading_illustration_file}
id: casita_initializing
resize: 320x240
type: RGB24
use_transparency: true
- file: https://github.com/esphome/firmware/raw/main/voice-assistant/error_box_illustrations/error-no-wifi.png
id: error_no_wifi
resize: 320x240
type: RGB24
use_transparency: true
- file: https://github.com/esphome/firmware/raw/main/voice-assistant/error_box_illustrations/error-no-ha.png
id: error_no_ha
resize: 320x240
type: RGB24
use_transparency: true
color:
- id: idle_color
hex: ${idle_illustration_background_color}
- id: listening_color
hex: ${listening_illustration_background_color}
- id: thinking_color
hex: ${thinking_illustration_background_color}
- id: replying_color
hex: ${replying_illustration_background_color}
- id: loading_color
hex: ${loading_illustration_background_color}
- id: error_color
hex: ${error_illustration_background_color}
spi:
clk_pin: 7
mosi_pin: 6
display:
- platform: ili9xxx
id: s3_box_lcd
model: S3BOX
data_rate: 40MHz
cs_pin: 5
dc_pin: 4
reset_pin:
number: 48
inverted: true
update_interval: never
pages:
- id: idle_page
lambda: |-
it.fill(id(idle_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_idle), ImageAlign::CENTER);
- id: listening_page
lambda: |-
it.fill(id(listening_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_listening), ImageAlign::CENTER);
- id: thinking_page
lambda: |-
it.fill(id(thinking_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_thinking), ImageAlign::CENTER);
- id: replying_page
lambda: |-
it.fill(id(replying_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_replying), ImageAlign::CENTER);
- id: error_page
lambda: |-
it.fill(id(error_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_error), ImageAlign::CENTER);
- id: no_ha_page
lambda: |-
it.image((it.get_width() / 2), (it.get_height() / 2), id(error_no_ha), ImageAlign::CENTER);
- id: no_wifi_page
lambda: |-
it.image((it.get_width() / 2), (it.get_height() / 2), id(error_no_wifi), ImageAlign::CENTER);
- id: initializing_page
lambda: |-
it.fill(id(loading_color));
it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_initializing), ImageAlign::CENTER);
- id: muted_page
lambda: |-
it.fill(Color::BLACK);
i2c:
- id: bus_a
sda: GPIO08
scl: GPIO18
- id: bus_b
sda: GPIO41
scl: GPIO40
sensor:
- platform: aht10
i2c_id: bus_b
variant: AHT20
temperature:
name: "Temperature"
humidity:
name: "Humidity"
update_interval: 60s
- platform: adc
pin: GPIO10
name: "Battery voltage"
id: battery_voltage
unit_of_measurement: "V"
accuracy_decimals: 3
device_class: "voltage"
entity_category: "diagnostic"
update_interval: 30s
attenuation: auto
filters:
- multiply: 4.01
- platform: copy
source_id: battery_voltage
name: "Battery level"
unit_of_measurement: "%"
accuracy_decimals: 1
device_class: "battery"
entity_category: "diagnostic"
filters:
- lambda: return (x - 2.5) / (4.2 - 2.5) * 100;
- clamp:
min_value: 0
max_value: 100
ignore_out_of_range: true
# - platform: uptime
# name: Uptime
# id: uptime_sensor
# entity_category: "diagnostic"
# update_interval: $wifi_update_interval
# on_raw_value:
# then:
# - text_sensor.template.publish:
# id: uptime_human
# state: !lambda |-
# int seconds = round(id(uptime_sensor).raw_state);
# int days = seconds / (24 * 3600);
# seconds = seconds % (24 * 3600);
# int hours = seconds / 3600;
# seconds = seconds % 3600;
# int minutes = seconds / 60;
# seconds = seconds % 60;
# return (
# (days ? to_string(days) + "d " : "") +
# (hours ? to_string(hours) + "h " : "") +
# (minutes ? to_string(minutes) + "m " : "") +
# (to_string(seconds) + "s")
# ).c_str();
# - platform: wifi_signal
# name: "WiFi Signal dB"
# id: wifi_signal_db
# update_interval: 60s
# entity_category: "diagnostic"
- platform: internal_temperature
name: "Internal Temperature"
entity_category: "diagnostic"
touchscreen:
platform: gt911
i2c_id: bus_a
id: gt911_touchscreen
interrupt_pin: GPIO3
on_touch:
# - logger.log:
# format: Touch at (%d, %d)
# args: [touch.x, touch.y]
then:
- light.toggle: led
#text_sensor:
# - platform: wifi_info
# ip_address:
# update_interval: 60s
# name: IP Address
# entity_category: "diagnostic"
# ssid:
# update_interval: 60s
# name: Connected SSID
# entity_category: "diagnostic"
# bssid:
# update_interval: 60s
# name: Connected BSSID
# entity_category: "diagnostic"
# mac_address:
# name: Mac Wifi Address
# entity_category: "diagnostic"
# scan_results:
# update_interval: 60s
# name: Latest Scan Results
# entity_category: "diagnostic"
# Device Uptime Information
# - platform: template
# name: Uptime Human Readable
# id: uptime_human
# icon: mdi:clock-start
```
### Anything in the logs that might be useful for us?
```txt
Log after a factory reset:
[12:14:40][I][app:102]: ESPHome version 2023.12.3 compiled on Dec 26 2023, 11:38:44
[12:14:40][I][app:104]: Project esphome.voice-assistant version 1.0
[12:14:40][C][wifi:573]: WiFi:
[12:14:40][C][wifi:405]: Local MAC: xxxxxxxxxxxxxxx
[12:14:40][C][wifi:410]: SSID: [redacted]
[12:14:40][C][wifi:411]: IP Address: xxxxxxxxxxxxxxx
[12:14:40][C][wifi:413]: BSSID: [redacted]
[12:14:40][C][wifi:414]: Hostname: 'esp32-s3-box-3-5ace4c'
[12:14:40][C][wifi:416]: Signal strength: -47 dB ▂▄▆█
[12:14:40][C][wifi:420]: Channel: 1
[12:14:40][C][wifi:421]: Subnet: 255.255.255.0
[12:14:40][C][wifi:422]: Gateway: xxxxxxxxxx
[12:14:40][C][wifi:423]: DNS1: xxxxxxxxxx
[12:14:40][C][wifi:424]: DNS2: xxxxxxxxxxx
[12:14:40][C][logger:443]: Logger:
[12:14:40][C][logger:444]: Level: DEBUG
[12:14:40][C][logger:445]: Log Baud Rate: 115200
[12:14:40][C][logger:447]: Hardware UART: USB_SERIAL_JTAG
[12:14:40][C][spi:067]: SPI bus:
[12:14:40][C][spi:068]: CLK Pin: GPIO7
[12:14:40][C][spi:069]: SDI Pin:
[12:14:40][C][spi:070]: SDO Pin: GPIO6
[12:14:40][C][spi:072]: Using HW SPI: SPI2_HOST
[12:14:40][C][i2c.idf:061]: I2C Bus:
[12:14:40][C][i2c.idf:062]: SDA Pin: GPIO8
[12:14:40][C][i2c.idf:063]: SCL Pin: GPIO18
[12:14:40][C][i2c.idf:064]: Frequency: 50000 Hz
[12:14:40][C][i2c.idf:067]: Recovery: bus successfully recovered
[12:14:40][I][i2c.idf:077]: Results from i2c bus scan:
[12:14:40][I][i2c.idf:083]: Found i2c device at address 0x18
[12:14:40][I][i2c.idf:083]: Found i2c device at address 0x40
[12:14:40][I][i2c.idf:083]: Found i2c device at address 0x5D
[12:14:40][I][i2c.idf:083]: Found i2c device at address 0x68
[12:14:40][C][i2c.idf:061]: I2C Bus:
[12:14:40][C][i2c.idf:062]: SDA Pin: GPIO41
[12:14:40][C][i2c.idf:063]: SCL Pin: GPIO40
[12:14:40][C][i2c.idf:064]: Frequency: 50000 Hz
[12:14:40][C][i2c.idf:067]: Recovery: bus successfully recovered
[12:14:40][I][i2c.idf:077]: Results from i2c bus scan:
[12:14:40][I][i2c.idf:083]: Found i2c device at address 0x28
[12:14:40][I][i2c.idf:083]: Found i2c device at address 0x38
[12:14:40][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Mute'
[12:14:40][C][gpio.binary_sensor:016]: Pin: GPIO1
[12:14:40][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Top Left Button'
[12:14:40][C][gpio.binary_sensor:016]: Pin: GPIO0
[12:14:40][C][ledc.output:164]: LEDC Output:
[12:14:40][C][ledc.output:165]: Pin GPIO47
[12:14:40][C][ledc.output:166]: LEDC Channel: 0
[12:14:40][C][ledc.output:167]: PWM Frequency: 1000.0 Hz
[12:14:40][C][ledc.output:168]: Bit depth: 14
[12:14:40][C][ili9xxx:069]: ili9xxx
[12:14:40][C][ili9xxx:069]: Rotations: 0 °
[12:14:40][C][ili9xxx:069]: Dimensions: 320px x 240px
[12:14:40][C][ili9xxx:070]: Width Offset: 0
[12:14:40][C][ili9xxx:071]: Height Offset: 0
[12:14:40][C][ili9xxx:077]: Color mode: 16bit
[12:14:40][C][ili9xxx:086]: Data rate: 40MHz
[12:14:40][C][ili9xxx:088]: Reset Pin: GPIO48
[12:14:40][C][ili9xxx:089]: CS Pin: GPIO5
[12:14:40][C][ili9xxx:090]: DC Pin: GPIO4
[12:14:40][C][ili9xxx:092]: Swap_xy: NO
[12:14:40][C][ili9xxx:093]: Mirror_x: YES
[12:14:40][C][ili9xxx:094]: Mirror_y: YES
[12:14:40][C][ili9xxx:099]: Update Interval: never
[12:14:40][C][light:103]: Light 'LCD Backlight'
[12:14:40][C][light:105]: Default Transition Length: 0.2s
[12:14:40][C][light:106]: Gamma Correct: 2.80
[12:14:40][C][template.switch:068]: Template Switch 'Mute'
[12:14:40][C][template.switch:091]: Restore Mode: restore defaults to OFF
[12:14:40][C][template.switch:057]: Optimistic: YES
[12:14:40][C][psram:020]: PSRAM:
[12:14:40][C][psram:021]: Available: YES
[12:14:40][C][psram:024]: Size: 16383 KB
[12:14:40][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'
[12:14:40][C][factory_reset.button:011]: Icon: 'mdi:restart-alert'
[12:14:40][C][aht10:150]: AHT10:
[12:14:40][C][aht10:151]: Address: 0x38
[12:14:40][C][aht10:155]: Temperature 'Temperature'
[12:14:40][C][aht10:155]: Device Class: 'temperature'
[12:14:40][C][aht10:155]: State Class: 'measurement'
[12:14:40][C][aht10:155]: Unit of Measurement: '°C'
[12:14:40][C][aht10:155]: Accuracy Decimals: 2
[12:14:40][C][aht10:156]: Humidity 'Humidity'
[12:14:40][C][aht10:156]: Device Class: 'humidity'
[12:14:40][C][aht10:156]: State Class: 'measurement'
[12:14:40][C][aht10:156]: Unit of Measurement: '%'
[12:14:40][C][aht10:156]: Accuracy Decimals: 2
[12:14:40][C][adc:097]: ADC Sensor 'Battery voltage'
[12:14:40][C][adc:097]: Device Class: 'voltage'
[12:14:40][C][adc:097]: State Class: 'measurement'
[12:14:40][C][adc:097]: Unit of Measurement: 'V'
[12:14:40][C][adc:097]: Accuracy Decimals: 3
[12:14:40][C][adc:107]: Pin: GPIO10
[12:14:40][C][adc:109]: Attenuation: auto
[12:14:40][C][adc:142]: Update Interval: 30.0s
[12:14:40][C][copy.sensor:015]: Copy Sensor 'Battery level'
[12:14:40][C][copy.sensor:015]: Device Class: 'battery'
[12:14:40][C][copy.sensor:015]: State Class: 'measurement'
[12:14:40][C][copy.sensor:015]: Unit of Measurement: '%'
[12:14:40][C][copy.sensor:015]: Accuracy Decimals: 1
[12:14:40][C][internal_temperature:059]: Internal Temperature Sensor 'Internal Temperature'
[12:14:40][C][internal_temperature:059]: Device Class: 'temperature'
[12:14:40][C][internal_temperature:059]: State Class: 'measurement'
[12:14:40][C][internal_temperature:059]: Unit of Measurement: '°C'
[12:14:40][C][internal_temperature:059]: Accuracy Decimals: 1
[12:14:41][C][gt911.touchscreen:105]: GT911 Touchscreen:
[12:14:41][C][gt911.touchscreen:106]: Address: 0x5D
[12:14:41][C][gt911.touchscreen:107]: Interrupt Pin: GPIO3
[12:14:41][C][GT911.binary_sensor:015]: GT911 Button 'Home Button'
[12:14:41][C][GT911.binary_sensor:016]: Index: 1
[12:14:41][C][esp32_ble:379]: ESP32 BLE: bluetooth stack is not enabled
[12:14:41][C][esp32_ble_server:200]: ESP32 BLE Server:
[12:14:41][C][esp32_improv.component:257]: ESP32 Improv:
[12:14:41][C][esp32_improv.component:262]: Status Indicator: 'NO'
[12:14:41][C][mdns:115]: mDNS:
[12:14:41][C][mdns:116]: Hostname: esp32-s3-box-3-5ace4c
[12:14:41][C][ota:097]: Over-The-Air Updates:
[12:14:41][C][ota:098]: Address: esp32-s3-box-3-5ace4c.local:3232
[12:14:41][C][api:139]: API Server:
[12:14:41][C][api:140]: Address: esp32-s3-box-3-5ace4c.local:6053
[12:14:41][C][api:142]: Using noise encryption: YES
[12:14:41][C][improv_serial:032]: Improv Serial:
[12:14:42][D][aht10:097]: AHT10 is busy, waiting...
[12:14:42][D][sensor:094]: 'Temperature': Sending state 38.71040 °C with 2 decimals of accuracy
[12:14:42][D][sensor:094]: 'Humidity': Sending state 22.04561 % with 2 decimals of accuracy
[12:14:42][W][component:214]: Component aht10.sensor took a long time for an operation (0.08 s).
[12:14:42][W][component:215]: Components should block for at most 20-30ms.
[12:14:43][D][button:010]: 'Factory reset' Pressed.
[12:14:43][I][factory_reset.button:013]: Resetting to factory defaults...
[12:14:43][D][esp32.preferences:176]: Cleaning up preferences in flash...
[12:14:43][I][app:134]: Rebooting safely...
INFO Processing expected disconnect from ESPHome API for esp32-s3-box-3-5ace4c @ 192.168.0.167
WARNING Disconnected from API
INFO Successfully connected to esp32-s3-box-3-5ace4c @ 192.168.0.167 in 7.141s
INFO Successful handshake with esp32-s3-box-3-5ace4c @ 192.168.0.167 in 0.320s
[12:14:57][D][voice_assistant:422]: State changed from IDLE to START_MICROPHONE
[12:14:57][D][voice_assistant:428]: Desired state set to WAIT_FOR_VAD
[12:14:57][D][light:036]: 'LCD Backlight' Setting:
[12:14:57][D][light:047]: State: OFF
[12:14:57][D][light:085]: Transition length: 0.2s
[12:14:57][E][spi-esp-idf:081]: Transmit failed - err 101
[12:14:57][W][component:214]: Component voice_assistant took a long time for an operation (0.19 s).
[12:14:57][W][component:215]: Components should block for at most 20-30ms.
[12:14:57][D][esp32_ble:255]: Disabling BLE...
[12:14:57][D][esp-idf:000]: W (14577) BT_APPL: bta_dm_disable BTA_DISABLE_DELAY set to 200 ms
[12:14:58][W][component:214]: Component esp32_ble took a long time for an operation (0.21 s).
[12:14:58][W][component:215]: Components should block for at most 20-30ms.
[12:14:58][D][voice_assistant:159]: Starting Microphone
[12:14:58][D][voice_assistant:422]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[12:14:58][D][esp-idf:000]: I (14818) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=8
[12:14:58][D][esp-idf:000]: I (14825) I2S: I2S0, MCLK output by GPIO2
[12:14:58][D][esp-idf:000]: I (14831) AUDIO_PIPELINE: link el->rb, el:0x3d036c2c, tag:i2s, rb:0x3d037040
[12:14:58][D][esp-idf:000]: I (14834) AUDIO_PIPELINE: link el->rb, el:0x3d036da0, tag:filter, rb:0x3d039080
[12:14:58][D][esp-idf:000]: I (14841) AUDIO_ELEMENT: [i2s-0x3d036c2c] Element task created
[12:14:58][D][esp-idf:000]: I (14848) AUDIO_THREAD: The filter task allocate stack on external memory
[12:14:58][D][esp-idf:000]: I (14851) AUDIO_ELEMENT: [filter-0x3d036da0] Element task created
[12:14:58][D][esp-idf:000]: I (14856) AUDIO_ELEMENT: [raw-0x3d036ed0] Element task created
[12:14:58][D][esp-idf:000]: I (14861) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:16583563 Bytes, Inter:48188 Bytes, Dram:48188 Bytes
[12:14:58][D][esp-idf:000]: I (14868) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:1
[12:14:58][D][esp-idf:000]: I (14872) AUDIO_ELEMENT: [filter] AEL_MSG_CMD_RESUME,state:1
[12:14:58][D][esp-idf:000]: I (14876) RSP_FILTER: sample rate of source data : 16000, channel of source data : 2, sample rate of destination data : 16000, channel of destination data : 1
[12:14:58][D][esp-idf:000]: I (14879) AUDIO_PIPELINE: Pipeline started
[12:14:58][D][esp_adf.microphone:294]: Microphone started
[12:14:58][D][voice_assistant:422]: State changed from STARTING_MICROPHONE to WAIT_FOR_VAD
[12:14:58][D][voice_assistant:176]: Waiting for speech...
[12:14:58][D][voice_assistant:422]: State changed from WAIT_FOR_VAD to WAITING_FOR_VAD
[12:15:05][D][sensor:094]: 'Battery voltage': Sending state 3.56853 V with 3 decimals of accuracy
[12:15:05][D][sensor:094]: 'Battery level': Sending state 62.85499 % with 1 decimals of accuracy
[12:15:27][D][aht10:097]: AHT10 is busy, waiting...
[12:15:27][D][sensor:094]: 'Temperature': Sending state 38.69686 °C with 2 decimals of accuracy
[12:15:27][D][sensor:094]: 'Humidity': Sending state 22.14909 % with 2 decimals of accuracy
[12:15:27][W][component:214]: Component aht10.sensor took a long time for an operation (0.07 s).
[12:15:27][W][component:215]: Components should block for at most 20-30ms.
[12:15:31][D][esp32.preferences:114]: Saving 1 preferences to flash...
[12:15:31][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:15:35][D][sensor:094]: 'Battery voltage': Sending state 3.57047 V with 3 decimals of accuracy
[12:15:35][D][sensor:094]: 'Battery level': Sending state 62.96910 % with 1 decimals of accuracy
[12:15:37][D][esp-idf:000]: I (54079) tsens: Config temperature range [-10°C ~ 80°C], error < 1°C
[12:15:37][D][sensor:094]: 'Internal Temperature': Sending state 40.05940 °C with 1 decimals of accuracy
```
### Additional information
_No response_
and
esphome:dev
← X-Ryl669:i2c-adf
opened 10:03PM - 01 Mar 24 UTC
# What does this implement/fix?
This should fix when it's finished.
When … using ESP-ADF for audio stack, it uses its own I2C bus handling and driver install that's incompatible with ESPHome default `IDFI2CBus`.
This PR is about an implementation for IDFI2CBus that's using ESP-ADF's I2C primitives (should be the same as ESP-IOT I2C primitives, but untested), so it doesn't conflict with ESP-ADF's component.
## Types of changes
- [X] Bugfix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** fixes [#5296](https://github.com/esphome/issues/issues/5296#issue-2056315667)
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):**
No documentation updated since nothing changes from the user point of view. It's only when esp-adf is included (from pr #5230) that the definition changes.
## Test Environment
- [ ] ESP32
- [X] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
- [ ] BK72xx
- [ ] RTL87xx
## Example entry for `config.yaml`:
None. Use github://esphome/firmware/voice-assistant/esp32-s3-box-3.yaml@main
## Checklist:
- [ ] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
shows I can’t use “my” I2C Pins, because they are diffrent from adf and so
external_components:
- source: github://rpatel3001/esphome@es7210
components: [ es7210 ]
- source: github://pr#5230
components:
- esp_adf
does not work. I’m trying today to add a I2S Mic on external pin header and change my pin config completly to match S3-Box-3 for next PT version. This way I could use
without Display part, add camera part from esp32-s3-korvo-2 or S3-EYE… Monday also my pin headers arrive, so I can mount the LD2410 and LD2450 (forgot to order them and don’t want to solder them on PT-PCB). Still longer way to go, but I’m close.
So after the weekend and testing, adjusting and playing with the prototype, here are few videos. Sry about my bad English, it was a long day and short night.
Voice control:
Board and sensors explained:
The Air quality sensor and adjustments:
And last but not least: overview of esphome integration:
Still working on get 4-8 microphones working, but I’m happy it works for now within 3m in a silent room to control by voice and monitor movement, presence and air quality, lux and temperature/humidity. Basically everything I need in every room in future to get rid of all sensors to switch on/off light and heating.
6 Likes
nice board. let me know if you sell it one day
2 Likes
looks great - also interessted to buy it
I will not sell it. I’m still struggling with esp_adf and need some more time and money for few more prototype PCB with es7210 and speakers, but when I’m done, it will be open source.
6 Likes
Love to see more people doing open source. When you release I’ll build one and see if there is anything I can add.
How is the project going ? I am very enthusiastic about the design of the PCB looking so far.
And it’s very nice you will make this a open source project.
Didn’t spend much time into it recently. I stopped because I have to dig into esp-idf framework mich deeper and still need to figure out how to run micro wake word on board and all microphones. Background noice makes it almost impossible to have good detection, even after trying 7 different microphones…
So most time is spent into rebuilding my house, change electric to make every switch smart and working with nWave senors and no voice to control everything.
Sangoku
(Sinisa Culic)
July 16, 2024, 9:08am
22
How can we help?
This seems a really good pcb project. Keep up the good work
3 Likes