I have an automation which has been working fine since past 2 years. Nothing has been changed. However since past week it fails to play the mp3 and jut skips to the next step in the automation.
Any insights on this issue? The script worked flawlessly for past two years. I could change it but this script simplified a two path automation to just one.
I checked traces and it shows the automation ran till the end. All steps are in fact executed and work perfectly… like turning on the media receiver outlet, waiting for a minute, muting the TV receiver if the TV is on. But the moment it reaches to play the mp3 it immediately skips it and traces show that if played and then it goes to the next step of checking to to see if the media receiver has completed playing and turned idle so that it can power off the media receiver.
Last night I completely removed the entire script and just used the gui to break it down into two steps. It ran fine when I ran it manually to play the media. Also tested in developer tools. But this morning it was exactly the same behavior. It just skipped or I would say executed the step and moved to the next step in less than a second.
Has there been some major Media Player breaking changes that may be causing this? I use the Google Chromecast to play the media. Manual play works but play in automation does not work.
Here is the simple default mp3 play code which works perfectly under developer tools.
I may have found the solution. My automation played the mp3 file now but will have to test it the next time the automation runs on the precise time.
I changed the media_content_type: from audio/mp3 to music
Not sure why it was working with audio/mp3 all these months and suddenly it woudn’t like that and changing to music works in the automation. What’s more confusing is that in developer tools audio/mp3 works and so does music but in automation audio/mp3 fails to play but changing to music works.
Which integration are you using for this automation. The info you’ve provided isn’t very helpful. The logs will tell us.
Go to Settings, System, Logs, then click on the down arrow in the top right corner. It will download the log file. Open it with a text editor like notepad or something similar.
Copy it, then paste here as a reply but be sure to type ``` before it and then again after it so it keeps the formatting.
@123 Just a gentle nudge. You had helped me last year fine tuning this same automation. Maybe you know what is causing this not to work suddenly with no change to the automation.
I can run the mp3 straight from the browser providing the full path of HA. HA pickups the file and runs locally as well from /local as I tested it in Developer Tools.
The mp3 runs based on the trigger id which runs only on a specific template time sensor which updates once a day. I just ran the step removing the trigger in developer tools and it works… the mp3 plays. I am attaching the automation traces snapshot. You can see it run right through it till the very end. I will provide the logs in about 20 mins. The sensor.maghrib_prayer_offset will turn on at 4:40.
My automation worked! … I was skeptical but I added extra two tasks before playing the mp3. I added a task to “turn on” the google chromecast and add a 2 second wait … which was not needed prior… No changes to the original automation steps… just an extra task now added. Has to be something to do with HA and how it looks at the google chromecast.