ESP32-Audio-Kit (ESP32-A1S) with Squeezelite for Notifications

Reading this Home assistant community addons : Logitech Media Server (lms) & Squeezelite Leads me to believe yes,a lms server is needed on your network. Be it from the LMS ( ̶h̶a̶s̶s̶.̶i̶o̶ ) HassOS (still forget the proper name) addon or from a LMS server setup elsewhere on your network.

1 Like

That’s right.

1 Like

It’s real easy to have notifications with the ESP32 audio kit!

  1. Setup a LMS server ether by the experimental addon (it works well) or somewhere on your network. I ultimately choose to install LMS on my media server.

  2. Then install the squeezelite-esp32 firmware (GitHub - sle118/squeezelite-esp32: ESP32 Music streaming based on Squeezelite, with support for multi-room sync, AirPlay, Bluetooth, Hardware buttons, display and more) and with the help of the howto links in the post above for the firmware on the Audio kit.
    And there is is another (long) thread that has good nuggets of knowledge if you dig through it. And ask for help in that thread if needed. (ANNOUNCE: Squeezelite-ESP32 (dedicated thread))

  3. After you have LMS up and running and the Audio kit flashed, log in to LMS and you should be able to use the Audio kit as a player by looking for it in the upper right of the LMS server page and choosing it in the drop down box:
    lms-1
    I named my kit Testbox =)

4.Then add the Logitech Squeezebox integration to Hass. It maybe discovered all ready for you. If not, you will need to add it by hand via the:
intagtion2

Once added you you should see something like this within the Squeezebox integration :
lms-int

  1. Make sure you have ether:
    default_config: or media_source:
    in your config.yaml. If it is you should be able to use Hass’s media browser to view your media collection.

  2. Now lets say you have a button/device named “doorbell” and a .mp3 clip named “doorbell ring chime.mp3” in your LMS media collection. You can create an automation like:

Your done! Easy as that.

My first attempt at a tutorial. So is rough on the edges.
Hope it’s of help

4 Likes

Good work, but 1. and 3. are the same. (It may confuse some)

Also I think most of us still appreciate the yaml versions of autmomations.

But your automation is easy to implement from your instructions.

Was editing that as you wrote. fixed =)
I to use .yaml most of the time.
But Hey the Dev,s made it easy for anyone to add complex automation’s without knowing Yaml at all. might as well use it once in a wile.

Missing an ‘e’.

Fixed. i think.

1 Like

I made ESP32 Audio Kit (Ai Thinker ESP32-A1S) working with ESPHome I2S Media Player.

Model: ESP32-A1S 2974 (DAC: ES8388)

Here is the ESPHome Yaml: ESP32 Audio Kit (Ai Thinker ESP32-A1S) - ESPHome I2S Media Player - Pastebin.com

See it here: [ESPHome] ESP32-Audio-Kit (ESP32-A1S) - YouTube

esphome:
  name: esp32-audio-kit
 
esp32:
  board: esp-wrover-kit
  framework:
    type: arduino
 
logger:
api:
  password: "api-password-here"
 
ota:
  password: "ota-password-here"
 
wifi:
  ssid: "your-ssid-here"
  password: "your-ssid-password-here"
 
  ap:
    ssid: "esp32-audio-kit Fallback Hotspot"
    password: "fallback-hotspot-password-here"
 
captive_portal:
i2c:
  sda: GPIO33
  scl: GPIO32
 
external_components:
  - source: github://pr#3552
    components: [es8388]
    refresh: 0s
 
es8388:
media_player:
  - platform: i2s_audio
    name: "ESP32 Audio Kit"
    dac_type: external
    i2s_lrclk_pin: GPIO25
    i2s_dout_pin: GPIO26
    i2s_bclk_pin: GPIO27
    mode: stereo
    mute_pin:
      number: GPIO21
      inverted: true
 
switch:
  - platform: gpio
    pin: GPIO21
    name: "AMP Switch"
    restore_mode: ALWAYS_ON
 
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
      mode:
        input: true
    name: "Jack Status"
 
light:
  - platform: binary
    name: "Test LED 1"
    output: light_output_1
  - platform: binary
    name: "Test LED 2"
    output: light_output_2
 
output:
  - id: light_output_1
    platform: gpio
    pin: GPIO22
    inverted: true
  - id: light_output_2
    platform: gpio
    pin: GPIO19
    inverted: true
9 Likes

Nice, This works well :+1:

Although, I’m not sure that I have ES8388 My board marking says ESP32 Audio Kit V2.2 A210.

I’m also able to get the Keys 1-3 working, and 4-6 is making a lot of noise! After taking a look, I see those Keys are missing capacitors compare to keys 1-3 :sob:

Anyone interested, I Added these as binary_sensors:

  - platform: gpio
    pin:
      number: GPIO036
      inverted: true
    name: "Key 1"
    filters:
      - delayed_off: 10ms

  - platform: gpio
    pin:
      number: GPIO013
      inverted: true
    name: "Key 2"
    filters:
      - delayed_off: 10ms
  - platform: gpio
    pin:
      number: GPIO019
      inverted: true
    name: "Key 3"
    filters:
      - delayed_off: 10ms
3 Likes

just bough an ESP32 Audio Kit V2.2 -for use as a notifyer /smart music player
and i am wondering how to flash squeezelite-esp32 firmware onto it
wondering if any one can tell uss what we can use to flash the firmware

i manged to get the firmware.bin files for the board(squeezelite-esp32-ESP32-A1S.32.699.master)

  • just dont know what i can use to flash it /how

Just use the web installer by @balloob.
For the esp32-a1s you should choose the I2S option.

Does anyone know if that squeezelite-esp32 image can do automatic latency adjust like snapcast as there is a snapcast-esp but doesn’t seem complete as lacks certain codecs, but the main problem supposedly was the memory for the buffering even with 512k but maybe it just a lacked bit of support as the GitHub - jorgenkraghjakobsen/snapclient: WIP snapclient on ESP32.

Hence I just got 2x good quality ebay bookshelf speakers 75watt, 2x sure-electronics 100 watt amps & 2x ES9018K2M ES9018 I2S Input Decoding Board but mainly because I had 2x RaspberryPiZero2.
I looked at squeezelite-esp and it just didn’t seem to have the jitter or latency compensation methods to match snapcast and is that correct as still to see any documentation or code?

So a couple of questions really firstly the one about squeezelite-esp and a 2nd has anyone tried GitHub - jorgenkraghjakobsen/snapclient: WIP snapclient on ESP32 as didn’t, as feel far more confdent on the Pi and Python as can hack a bit of C but not much more.

tnx -wil give it a try as soon as my board arives

Ive got it flashed with squeezebox .but i am not getting any output to my speaker . through a 3.5 m audio jack
cant get any sound to it with lms server -for testing

im i missing somthing -

What is the version of the firmware you have flashed? If you have squeezelite-esp32-master-v4.3-I2S-4MFlash-32-1.1034.bin you can choose a preset acording to your variant:


If not you can flash it ota by the updates tab and then upload the bin with the Local File option.
Let me know if you need more help.
It depends on wich dac version you have, there are three variants. Here you can read all about it. In the hardware tab you can fill in thoose values. You can take a shortcut and activate ‘show NVS editor’ in the credits tab and edit the gpio values for your variant there.

im currently runing the fw: I2S-4MFlash.16.1023.master-cmak , mode: Squeezelite-ESP32

and flashed it by using https://github.com/balloob/squeezelite-esp32-install
and selecting the i2s option

Have you connected it to your wifi?

i have conected it -to my wifi -and have conected the board to the lms desktop app server

also have speaker with 3.5 jack pluged into the board

Can you dm me to avoid spamming this thread?

I have the same board and could use some help also… :slight_smile: