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

what do your logs say? And what version of HA?

I’m using 2022.11.0 on home assistant and the logs says:
Setup of media_player platform dlna_dmr is taking over 10 second
Thats all I have.
Could it be the names of device or the pins I’m using?

What about your esphome logs?

[16:43:29][C][wifi:367]: Hostname: ‘media-player-front-door’
[16:43:29][C][wifi:369]: Signal strength: -59 dB ▂▄▆█
[16:43:29][C][wifi:373]: Channel: 11
[16:43:29][C][wifi:374]: Subnet: 255.255.255.0
[16:43:29][C][wifi:375]: Gateway: 192.168.0.1
[16:43:29][C][wifi:376]: DNS1: 0.0.0.0
[16:43:29][C][wifi:377]: DNS2: 0.0.0.0
[16:43:29][C][logger:293]: Logger:
[16:43:29][C][logger:294]: Level: DEBUG
[16:43:29][C][logger:295]: Log Baud Rate: 115200
[16:43:29][C][logger:296]: Hardware UART: UART0
[16:43:29][C][captive_portal:088]: Captive Portal:
[16:43:29][C][mdns:103]: mDNS:
[16:43:29][C][mdns:104]: Hostname: media-player-front-door
[16:43:29][C][ota:093]: Over-The-Air Updates:
[16:43:29][C][ota:094]: Address: 192.168.0.242:3232
[16:43:29][C][ota:097]: Using Password.
[16:43:29][C][api:138]: API Server:
[16:43:29][C][api:139]: Address: 192.168.0.242:6053
[16:43:29][C][api:141]: Using noise encryption: YES
[16:43:29][C][audio:135]: Audio:

It doesn’t seem to have connected to HA yet. Does it eventually?

Also, you have connected it via the HA integration ?

I tried a different esp32 and it did connect. but doesn’t show in home assistant

[16:57:51][C][wifi:367]: Hostname: ‘media-player-front-door’
[16:57:51][C][wifi:369]: Signal strength: -52 dB ▂▄▆█
[16:57:51][C][wifi:373]: Channel: 11
[16:57:51][C][wifi:374]: Subnet: 255.255.255.0
[16:57:51][C][wifi:375]: Gateway: 192.168.0.1
[16:57:51][C][wifi:376]: DNS1: 0.0.0.0
[16:57:51][C][wifi:377]: DNS2: 0.0.0.0
[16:57:51][C][logger:293]: Logger:
[16:57:51][C][logger:294]: Level: DEBUG
[16:57:51][C][logger:295]: Log Baud Rate: 115200
[16:57:51][C][logger:296]: Hardware UART: UART0
[16:57:51][C][captive_portal:088]: Captive Portal:
[16:57:51][C][mdns:103]: mDNS:
[16:57:51][C][mdns:104]: Hostname: media-player-front-door
[16:57:51][C][ota:093]: Over-The-Air Updates:
[16:57:51][C][ota:094]: Address: 192.168.0.242:3232
[16:57:51][C][ota:097]: Using Password.
[16:57:51][C][api:138]: API Server:
[16:57:51][C][api:139]: Address: 192.168.0.242:6053
[16:57:51][C][api:141]: Using noise encryption: YES
[16:57:51][C][audio:135]: Audio:
[16:58:46][D][api:102]: Accepted ::FFFF:C0A8:FA
[16:58:47][D][api.connection:917]: ESPHome Logs 2022.11.1 (::FFFF:C0A8:FA): Connected successfully

What do you mean by HA integration?

Settings/Devices & services/add integraton.

Do you mean the esphome integration?

Yes that is what I am asking!

Yes I do, and I have 18 different esp devices that all work perfectly. I have a muse proto that works great with music and TTS I just thought that with the esp32’s I had around, I could throw together something cheaper and I have crashed and burned. I was beginning to think that i knew what I was doing until now.

I’m at a bit of a loss because I don’t get an entity to show up even though it seems to connect.
I have looked at the Proto board yaml and copied a lot of it trying different things.
Didn’t work

What does the ha device page show?

At first it showed the name of the board but no entities and now after I have changed everything around and changed esp’s it doesnt even show up in the esphome intergration.

If it doesn’t show up in the integration, you probably didn’t add it to the integration.

It has always added new entities automatically before.
How do you manually add it?

That worked, thank you very much.
Wayne

They are not always auto discovered.

1 Like

Hello again. My UDA1334A I2S finally arrived and I successfully got it configured with esphome. I am able test tts and it plays a local mp3 file ok. Is it possible to stream a url?

I have tried with this test, but nothing happens. Is this correct settings??

Nice work!

yes, sure, it works for me but you should type “music” instead “audio/mp4” in “Content type” field!

Arg. I have tried each one every one below. Still no sound. The player stays in idle state. There is no error in Ha and in esphome log it shows the url I am trying to play.

A media type. Must be one of music, tvshow, video, episode, channel or playlist.

Update: Further testing. It seems I am unable to play external url. I created a local test mp3 file locally. Both of these url can play via a browser, but only the local url can be play using service: media_player.play_media. Is there something I need to enable??

http://192.168.1.20:8123/local/alerts/en/minecraft-theme.mp3
http://external.urllink.com/local/alerts/en/minecraft-theme.mp3