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

Update to version 0.5 :

  • NEW: increase and decrease volume with MQTT commands (+ and -)
  • NEW: increase and decrease volume physical buttons on GPIO 13 and 14
2 Likes

Great work!

1 Like

Thanks to the readme of this repo and this reddit post it is now possible to use MrDIY Notifier with Home Assistant TTS.
It use an atomation which replicate the current audio source from another player to the MrDIY Notifier.
It could be nice to have a real entity media player dedicated to MrDiy Notifier but in the meantime it helps.

alias: Send audio to MrDIY Notifier
description: ''
trigger:
  - platform: state
    entity_id: media_player.GoogleHome
    to: playing
condition: []
action:
  - service: mqtt.publish
    data:
      topic: diy/play
      payload_template: >-
        {{
        states.media_player.GoogleHome.attributes['media_content_id']}}
mode: single
2 Likes

Iā€™m looking for a way to transform MrDiy Notifier into a real Media Player entity in Home Assistant.

After some research, Media_player.template (Community post & Github repo) seems very nice too !

Edit : hass-multiroom-mqtt-mediaplayer github & community post could be an alternative too.

1 Like

Hiya Mr. Schmurtz!

I just wanted to stop by and say thank you for your efforts on this project. I was pointed to your code two days ago by Mr DIY and I just got my I2C circuit up and running. This works really well and I canā€™t wait to transfer it from breadboard to soldered circuit. Iā€™ll be doing that step next.

I am running version 0.4 and just randomly stumbled upon this post saying you upgrading to 0.5 yesterday! Iā€™ll flash it ASAP.

Thank you and thank you Mr DIY for this project. This was just challenging enough for a beginner like me to Home Automation, Home Assistant, ESP8266 and MQTT to get working. You guys are awesome, keep up the great work

3 Likes

Thanks @HurstOlds , happy to see that someone else than me use it :sweat_smile:
This is typically the best feedback that we could expect when we work on this kind of project :wink:

Good news : you can now declare MrDiy Notififier as media player in Home Assistant so sending TTS to the notifier is even easier.
image

This new feature is in progress, not sure which MQTT media player I will use at the end but for now itā€™s starting to work with ā€œmedia-player-templateā€, see my post about it here (still in progressā€¦).

May be the Notifier status would be easier to retrieve with hass-multiroom-mqtt-mediaplayer or hass-mqtt-mediaplayerā€¦ We will see that later ā€¦

2 Likes

Edit: I didnā€™t see your link in the post on how to implement this as a media player. I look thru that and give it a try.

Also, I flashed version 0.5 and reported a bug Iā€™ve been having when trying to use /googlevoice/ commands. I reported the bug over on your github page.

I so far have two of these speakers up and running. One is 0.5 and the other is 0.4. Iā€™ll reflash to 0.5 when I get a chance. I have at least one more Iā€™m looking to assemble this week. The DAC circuit that you provided is awesome. Works really well and there are none of the hiss and pops that my previous circuit had that I built off the original MrDIY schematic.

Iā€™m really enjoying this project. I still have to work on setting up a local HFS style file share for streaming/playing MP3 files on these speakers. Iā€™ll be working on that this week as well. Thank you!!

Yes this is an identified bug. Iā€™ve made a complete answer on your issue on Github. But when you use it like a media player this is a good workaround to use Google TTS without problems :wink:

About the new 0.5 : there is no big difference : it just allow to manage volume in a handier way. I donā€™t know if you see that : at the bottom of the web UI thereā€™s a link to upload new firmware easily !

1 Like

Version 0.6 released : no more long hang after Google TTS playback. Not totally perfect but a lot better than before :wink:

As a reminder, since version 0.4 you can set the default google TTS language in the web UI or override it directly in your MQTT command :
Bonjour,fr
or
Guten Tag,de-DE

Awesome, Iā€™m going to flash it now.

I have a question about updating firmware, that I havenā€™t been able to find in any of the readme docs. How do you use the GUI firmware update option? When I click on it, thereā€™s an option to update the firmware, or update the filesystem.

Do I just pick the bin I need and do firmware? You have other files in the firmware folder, are those for updating the filesystem? (boot_app0, partitions.bin, bootloader_qio)

I just went from 0.5 to 0.6 by only flashing the firmware via the GUI and itā€™s not working correctly. I figured there must be more to it, in terms of updating via the GUI.

Also, as a feature request, do you think you can make the main GUI display which version of the software itā€™s running? Iā€™m going to have upwards of 5 of these bad boys throughout the house, itā€™ll help track which firmware is on each one.

For now, to get to 0.6, Iā€™ll just pull it out of my enclosure and flash it manually to see if 0.6 works that way.

Okay, so I had a chance to do some further testing. Looks like just choosing to flash the firmware bin to the unit works for upgrade. sending the /samvoice/ command is what was broken. I posted /samvoice/ as an issue on the github for version 0.6

After some further testing, here is what Iā€™m seeing. I am running two of these speaker notifiers.
Speaker 1 was running firmware 0.4
Speaker 2 was running firmware 0.5

I upgraded speaker 2 to version 0.6 and it works, just samvoice is broken.

I just now upgraded speaker 1 to version 0.6 and thereā€™s a problem running both at version 0.6 This was an issue I saw when running Mr DIY original firmware one more than one speaker. Itā€™s basically created a MQTT storm, where both units keep firing off messages saying theyā€™re idle and connected. When this happens, I canā€™t send commands to either speaker.

To further test, I downgraded speaker 1 to version 0.5. speaker 2 running version 0.6 and it has the same problem. Both are firing messages non stop via MQTT, causing neither of them to work.

So I stepped speaker 1 back down to version 0.4 . Speaker 2 is running latest 0.6 version, and now both work as expected. I presume version 0.5 introduced an issue that causes multiple notifiers to break.

One further test to confirm:

If both speaker/notifiers are running firmware version 0.4, they both work correctly. No issues with contention and no MQTT storm of broadcasts from the notifiers.

Thanks for all your test and feedback, it helps a lot to improve quickly the project !

To update firmware from the UI, just click on ā€œbrowseā€ in the firmware section and pick one firmware file (I give compiled firmware directly in the github repo) like ā€œFW_v0.61_ESP8266_d1_mini.binā€.
You donā€™t need to update filesystem.

Iā€™ve just release version 0.61 which fix the MQTT storm when you have 2 Notifiers simultaneously and the crash problem with SAM voice TTS on ESP8266. :wink:

I tested it out and the issues I had reported on the github are all resolved in version 0.61. Thank you! Iā€™ll be spinning up a couple more of these speakers over the next few days :slight_smile:

Hello
Iā€™m starting your project, I have an esp32 devkitc on hand.
On the ESP32 I also use GND and RX same ESP8266 ?, is there anything else to know about the ESP32?
Thank you for your work.

Hi April,

Did you find the full circuit schematic for this project? It shows all of the pins you need to connect. Itā€™s more than just the RX

Hi there, I havenā€™t seen a full schematic, unless you mean the text one here:

However the pinouts for esp32 and esp8266 are here:

Thank you for your help, I will test it.
sorry but Iā€™m new to ESP32
With computer amplified speakers I have to use internal DAC or no DAC ?

Use the no dac settings.

Thanks you Nickrout