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

Sometimes there are some things left behind after flashing that’s why i suggested erasing flash. Good luck.

Well, no doesnt work either.

It is so frustrating! I do everything correct. I fill in all details, it connects to my wifi, alle works fine. As soon as I power off and on the D1 mini it starts broedcasting “MrDIY Notifier” SSID and alle starts over… It just doesn’t save! All 3 do not. I also tried to turn OFF wifi. no difference.

Thank you, I have use 3 brand new D1’s and initially flashed them, erased, them, flashed tasmota (works well), erased, flashed this bin, no difference. Thanks though for suggestion.

Thank you for an awesome project, i will surely give it a try… :blush:

Hi, I would realy like some help n the saving of the config!

Hi sender, the logs are disabled in the bin file but if you download the source code and set DEBUG, you will see the serial debug output - that might give you something to work with.

Sorry, I am not able to replicate the issue on my end. I checked with some people who got it working and they don’t seem to have this issue.

Update:

I uploaded a new bin file with debug mode enabled. Connect the device to your computer and check your Arduino IDE serial output. Let me know how that goes.

Would be great indeed.

Hi, done. see below… this is the 1st part for a “working” 1st setup:

Connection to AP.
Configuration page requested.
Rendering 'iwcThingName' with value: MrDIY Notifier
Rendering 'iwcApPassword' with value: <hidden>
Rendering 'iwcWifiSsid' with value:
Rendering 'iwcWifiPassword' with value: <hidden>
Rendering 'mqttServer' with value:
Rendering 'mqttUser' with value:
Rendering 'mqttPass' with value: <hidden>
Updating configuration
Value of arg 'iwcThingName' is:MrDIY Notifier
iwcThingName='MrDIY Notifier'
Value of arg 'iwcApPassword' is:mrdiy.ca
iwcApPassword was set
Value of arg 'iwcWifiSsid' is:IOTDOM
iwcWifiSsid='IOTDOM'
Value of arg 'iwcWifiPassword' is:hidden
iwcWifiPassword was set
Value of arg 'mqttServer' is:192.168.1.142
mqttServer='192.168.1.142'
Value of arg 'mqttUser' is:mqtt
mqttUser='mqtt'
Value of arg 'mqttPass' is:hidden
mqttPass was set
Saving config 'iwcThingName'= 'MrDIY Notifier'
Saving config 'iwcApPassword'= <hidden>
Saving config 'iwcWifiSsid'= 'IOTDOM'
Saving config 'iwcWifiPassword'= <hidden>
Saving config 'iwcApTimeout'= '30'
Saving config 'mqttServer'= '192.168.1.142'
Saving config 'mqttUser'= 'mqtt'
Saving config 'mqttPass'= <hidden>
Disconnected from AP.
State changing from: 1 to 3
Connecting to [IOTDOM] (password is hidden)
State changed from: 1 to 3
WiFi connected
IP address: 192.168.6.7
State changing from: 3 to 4
Accepting connection

==================================================================
  MrDIY Notifier
==================================================================

Connected to Wifi [192.168.6.7]

status: connected

Connected to MQTT: mrdiynotifier

status: idle
State changed from: 3 to 4

Then I play a barking dog successfully:

Requested [/mrdiynotifier/play] http://192.168.1.142:8123/local/dog8-1s.mp3

status: playing
Free: 7000  (256 lost)  Fragmentation: 4%
Free: 11960  (2504 lost)  Fragmentation: 20%
...#Interrupted!


status: idle

Then POWER OFF - POWER ON:
< nothing > on console.

SSID “MrDIY Notifier” available again, then I can go to begin of this post (connect to ssid) and see:
Connection to AP.
etc…

Interesting. Usually when the wifi is not setup, you would see something like this when it boots:

Wrong config version.
SkipApStartup is requested, but either no WiFi was set up, or configButton was pressed.
AP password was not set in configuration
State changing from: 0 to 1
Setting up AP: MrDIY Notifier
With default password: <hidden>
AP IP address: 192.168.4.1
State changed from: 0 to 1

But you don’t even see that?

1 Like

No I dont see that as the wifi IS setup (!) I can reach the device and use the device normally. but it looses after reboot.

One other thing… upon sending an MP3 file there is a hard “ticking sound” on the start and stop of the MP3… is that normal?

I updated the BIN file with a newer version that should be compatible with more ESP8266 modules.

The initial one was more specific to the WemosD1Mini ESP12E 4M version.

Give that a try and let me know if anyone still having the “Credentials not retained on power cycle” issue.

Finally, after hours of testing with mrdiy :-), it now works and wifi is saved…

2 more things:

  1. be able to change the mqtt topic
  2. there is lots of noise when playing mp3 (before and after the file)
2 Likes

The source is there :slight_smile:

I always look for destinations :slight_smile:

1 Like

You also don’t get ad revenue when your channel has 125 subscribers, so that’s not it :wink: I understand you just want to get on with it, but the video is honestly pretty well put together.

Looking forward to building a couple of these. I’m using a Xiaomi Aqara Gateway as a chime for a doorbell which cannot be heard very well in some rooms. I’d also love to integrate this functionality into ESPHome that I’m already using for a few things if only I could find the time.

Good job OP and thanks for sharing!

1 Like

Yep, would also love to get this into ESPHome. Might take a stab at it myself, but pretty strapped for time already…

That was a reply to a particular post. See: Turn an ESP8266 WemosD1Mini into an audio notifier for Home Assistant: Play MP3, TTS & RTTL

No need for your sycophantic white knighting.

And just to add, I don’t mind videos, it would just be helpful to have a post that points to the source as well as the video.

Sycophantic? White knighting? Eh, give me a break. Not sure why you seem offended by my comment, I thought it was pretty neutral/light hearted. Your “ad revenue” comment wasn’t actually posted as a reply to any particular comment, and I missed the later one you just linked.

You might want to think twice before throwing big clever words at people who mean no harm :slight_smile: