" 15 Minute Holiday Hack " ---- WiFi Media Player (TTS/Audio) for around 20 Euros

I

I bought following Bluetooth speaker with AUX input

If the AUX is plugged in this speaker will NOT turn off. Which is good.
(Of course you can use any other speaker with AUX input, just make sure it does not turn off if there is no audio signal for some time)

Next I got an M5 Atom Lite for 9 Euros. Integrate the ATOM into HA ESPHome with the YAML at end of this post.

For the Audio connection get a Grove-connector-pigtail and a 3.5mm Audio plug. Connect the GND pin from Grove to the sleeve of the 3.5mm plug, and connect pinG26 to ring and
tip of the 3.5mm plug. That’s it ! Audio output is ok for TTS (text to speech) , a bit noisy (ESP DAC output) but ok for the money.

The ATOM also has a multi-color LED and a button which may be used within HA.


YAML:

 esphome:

  name: atom1

esp32:

  board: m5stack-atom

  framework:

    type: arduino

# Enable logging

logger:

# Enable Home Assistant API

api:

  encryption:

    key: "YepG0NPvvvvvvvvvvvvvvvo+1UMftYc="

ota:

  password: "8c57b3vvvvvvvvvvvvvvvvvv9f4"

wifi:

#  ssid: !secret wifi_ssid

#  password: !secret wifi_password

  ssid: "JvvvvvvvvvvT"

  password: "vvvvvvvvvvvvvc"

  # Enable fallback hotspot (captive portal) in case wifi connection fails

  ap:

    ssid: "M5Stick Fallback Hotspot"

    password: "Svvvvvvvvvvvvvv9zF"

captive_portal:

   

# Example configuration entry

media_player:

  - platform: i2s_audio

    name: ESPHome I2S Media Player

    dac_type: internal

    #i2s_lrclk_pin: GPIO33

    #i2s_dout_pin: GPIO26

    #i2s_bclk_pin: GPIO19

    #mode: mono

    mode: left

## Device-specific

light:

  - platform: fastled_clockless

    chipset: WS2812B

    pin: 27

    num_leds: 1

    rgb_order: GRB

    id: status_led

    name: ${friendly_name} Light

    effects:

      - random:

      - flicker:

      - addressable_rainbow:

binary_sensor:

  - platform: gpio

    pin:

      number: 39

      inverted: true

    name: ${friendly_name} Button

    on_press:

      then:

        - light.toggle: status_led
5 Likes

Is that a standard 4-pin Grove Connector?
Or some other variation?

Yes standard Grove connector. But you only use G26 and GND (G) for the mono audio signal. On the other end of cable is a 3.5mm connector which plugs into AUX of the speaker.

Connect GND to the sleeve of a 3.5mm connector, G26 goes to TIP and RING of the 3.5mm connector.

2 Likes

Working this morning on embedding and connecting the M5 Atom Lite inside the Jam HX-P190 speaker. All the signals necessary come from the 4-pin Grove connector. If you remove the outer plastic shell from the M5 Atom Lite, and cover it with shrink wrap tubing, it will tuck into the base beside the battery (red ellipse in second photo below). It’s a tight fit, but the screws should pull the base and top back together.

ERROR/CORRECTION: The pin originally shown as +5VDC is actually +3.7VDC. It will not properly power the M5 Atom Lite device. :frowning: +5VDC originates from the indicated outer conductor of the USB connection.

Pictures below.

2 Likes