Turn an ESP8266 WemosD1Mini into an audio notifier for Home Assistant: Play MP3, TTS & RTTL

Finally done with this project!

I am now able to use an ESP8266 module, or a board like the Wemos D1 Mini, to play MP3 directly - no external storage or decoder needed thanks to a library called ESP8266Audio. It is controlled by MQTT messages. I have also added the ability to do very basic TTS (kinda retro lol) and RTTL tones without any external dependencies.

I put everything in an easy to load bin file which creates an AP that asks for the Wi-Fi and MQTT credentials/info.

I created an Instructables page and demo-ed it on my YouTube channel.

Instructables page to get the bin file and step-by-step instructions:

Download BIN file and souce code:

Let me know what you think!

57 Likes

For heaven’s sake can’t you just point to your source code without having to put people through the trauma of a youtube video?

To save others, here it is https://gitlab.com/MrDIYca/mrdiy-audio-notifier/-/blob/master/esp8266_mrdiy_mqtt_local_notifier

18 Likes

+1 @nickrout

The proliferation of 10min howto videos on YouTube that contain information that can be condensed to two or three succinct sentences is maddening.

13 Likes

You don’t get ad revenue from 2 or 3 sentences, or short videos. It’s why most 10 minute videos should only be 3 minutes long but are padded out.

6 Likes

Well done and well deserved view for youtube!

8 Likes

good stuff!

2 Likes

Love it! Appreciate the video of ideas. Just needs another node with a mike and camera and a button for a remote door bell over mqtt! I might use an old phone for that. Keep it up!

3 Likes

I will follow you for modding a Google hub as standalone audio notifier! Great stuff! Great video’s!

1 Like

Ok, done it. flashed, logged in via phone, added WiFi pass etc. now I see “mrdiynotifier” in mqtt explorer. IP address is known of device.

I have some questions:

  1. what is the username password for the web interface I am prompted with when connecting to my own WiFi.
  2. How can it save the config? When I am able to ping the device on my home WiFi and I disconnect power and reconnect it is gone from my home WiFi and I have to go back to my phone to go to the MrDIY notifier SSID again… why not saved?

Can’t play anything… see a topic appearing but no sound:
Not with:
topic: /mrdiynotifier/play
payload: http://192.168.1.142:8123/local/No Limit.mp3

and not with:
topic: /mrdiynotifier/play
payload: http://192.168.1.142:8123:/local/No Limit.mp3

When I go to browser to http://192.168.1.142:8123/local/No Limit.mp3 it works fine.

And there is a typo in your manual???


ther should not be a : after the port number?

I do see:
image
but no sound

1 time I have “a sound” but not very successful, only very short and did not know what it was…

1 Like

sender,

  1. username is “admin” and password is the same as the AP password - if you didn’t change it, it will be mrdiy.ca. When there is something playing it skips the web interface to give more priority to the real time audio - just make sure you are not playing anything before visiting the internal IP of the device.

  2. It should save the wifi info to eeprom. When it is unable to connect to Wifi it opens the AP again. Make sure you disconnect from the ‘MrDIY Notifier’ wifi from your phone/laptop and mark it ‘don’t connect automatically’ - or it could get stuck in setup mode.

Good catch!! I had a mistake in my documentation. The MQTT topics should NOT have a leading “/”. So send to “mrdiynotifier/play” and subscribe to “mrdiynotifier/status”.

**** UPDATE ****

I uploaded a new bin file version that uses the leading “/” in the MQTT topics. This way the video matches the bin file and everyone should be able to follow along the video without any issues.

1 Like

So, it’s only monophonic audio?

Yes! works with:
topic: mrdiynotifier/play
payload: http://192.168.1.142:8123/local/nolimit.mp3

I cannot get the wifi to save! I logged in via my pc and the wifi ip address (thus it accepts the config) but upon powering it is lost again…

this works also:
image

  - platform: mqtt
    state_topic: "mrdiynotifier/status"
    name: "D1-Mini-Player-01"

fantastic project. Thank you very much

3 Likes

How do we get this to be part of esphome? Also can I use it as a mic as well?

Asking the real question here :slight_smile:

1 Like

Please, some guidance on the saving of the wifi password? I cannot get it so save at all…

Wow! Enough from the haters! If you don’t like watching 10 minute YouTube videos, then don’t. Some people here may not be as advanced as you are and find some value in it. This is a great idea complete with documentation and a video. Thanks Onada.

10 Likes

I really need to know how to save the wifi consistently!

I really LOVE this! I have barking dos when on holiday and the door opens :slight_smile:

image

Just to be clear, I liked nick’s post for linking the source and I thought the 5 minute video was well paced and edited to be succinct without the revenue padding I was explaining to Wibbly.

I’m certainly going to give this a try to replace my Chromecast Audio so as to have one less big-data collecting device (I’ll have none actually, if this works for me).

1 Like

@MrDIY This looks great, I’m certainly interested in the Google Mini conversion you are doing.

If you are able to utilise the microphones from the Google Mini then maybe it could be used with something like rhasspy (with rhasspy running remotely obviously) as a mic/speaker so that you have a fully offline smart speaker…

1 Like