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

Hi Cao_Hoa, what configuration are you refering to?

hello MrDIY
Your configuration file
This is my configuration
Sensor:

  • platform: mqtt
    state_topic: “mrdiynotifier / status”
    name: “Player-local”

you give me your configuration please

Hi, I don’t have a configuration. I used the automation to send the audio directly using MQTT. You can see my example at https://youtu.be/SPa9SMyPU58?t=250

If you are looking to configure an MQTT mediaplayer, then I don’t think that is supported by the curent HA version - maybe someone can correct me here.

If you just want to have a status sensor then you can use this:

sensor:
  - platform: mqtt
    state_topic: "/mrdiynotifier/status"
    name: "MrDIY Player"

Someone just added a custom component for a mqtt media player. Media Player as MQTT

ok thanks
I will try to flash it again

nice project!!
any possibility to integrate it within esphome?

i have made 3 of these. they work perfectly however when nothing is playing i tent to get some crackle/clicking sounds through my speakers. anyone else get this and if so any ideas on a fix?

I have that as well… the author has said to look into this…

do you mean the author is going to look into it?

Yes that…

Troubleshooting and fixing noise is tricky: wires, soldering job, ICs quality, amp, ground loops, EM Interferences …etc.

One option is to try an external DAC. James updated my code to support external I2S DAC (https://www.adafruit.com/product/3006). He was also reporting a pop at the beginning of each audio play and that eliminated it.

The new code is here if you want to give that try https://gitlab.com/MrDIYca/mrdiy-audio-notifier/-/blob/master/esp8266_mrdiy_mqtt_local_notifier.ino

Hi blademckain, not anytime soon unfortunately.

Yes have that pop also. How to connect that dac to d1 mini?

James has documented his I2S DAC setup on his github here.

Of course it’s awesome.and the best of all it works like a champ ,as a google tts announcer.no more static mp3 files

1 Like

This looks great. I have been enjoying your youtube videos BTW. Curious if you have tried implementing this as a custom component via ESP home rather than tasmota such that the service can be called directly without MQTT?

2 Likes

Got it working using your instructions but also getting the static that others have mentioned…
…will keep playing with it.

The only answer to that is to use an external DAC.

1 Like