Some background:
My Spotify account is the only one used and as your Setup states there should be no additional settings needed for a single account. Even still, I did put primary_spotcast: “spotify_entity_id” as you described in your setup. After each run it appears there is an error in my spotcast setup (CodePile | Easily Share Piles of Code) running 3.6.29 though I’ve uninstalled and reinstalled twice removing and readding sp_dc and sp_key each time to make sure I didn’t have inaccurate cookies.
What other information would be helpful for you?
You’ve been super helpful, regardless of whether I can get this fixed. Do you get much sleep?
I have indeed mentioned in the docs that you don’t have to specify the Spocast account if you have only one account, however, there was a bug which was fixed in 2.2.0. According to the trace you are running 2.1.0.
So please update to the last version (2.4.3) which will hopefully fix your problem.
@TheFes still no luck. It appears Spotcast is still having issues so maybe once those are resolved I can get this Script to work. Thank you for all your support!
Script now also correctly recognizes Google Cast devices when using a Home Assistant speaker group as target. It will expand the group and check the group members for cast entities.
Sorry life is getting in the way. No, still not working but I’m not seeing errors in the trace like I did before, so I’m fairly confident that it’s my setup with Spotcast. The trace jsons are attached below. I really appreciate the care that you take when replying.
The error seems quite clear: "error": "Expired sp_dc, sp_key",
Check for your current keys following the steps in the Spotcast installation description, and update your spotcast integration configuration.
Thank you @TheFes. The sp_dc, and sp_key are correct. Spotcast is just not working for me. On reboot I get several errors in the logs regarding Spotcast. I integrated it properly as far as I can tell, just not working for me. I believe this is an issue with Spotcast and not with your script.
Again, you’ve been so helpful. Thank you for all your support.
For anyone else who is having this issue, I found if Spotify is configured using Nabu Casa Cloud, Spotcast will not function properly. Now no errors in my logs regarding Spotcast or Spotify. However, I still have the error stating "error": "Expired sp_dc, sp_key"
I’m continuing to dig into Spotcast, when I run the script in the Log it shows Spotcast error Error doing job: Task exception was never retrieved. I’ve reached out the Spotcast repository owner for support. Would love to get this working for multiple automations.
I only have one thnig that is annoying me, but it could be my fault. I have three speakers, and when I send to message to one of them, it plays one chime and then the message. The problema is that now I have the three speakers in one group. When I send a message to the group, it plays at the same time in every speakersm so that’s working fine. The problema is the chimes. They play not at the same time, but one after another. And the big problem is that, I don’t know why, each speaker plays the chime more than one time. So I have three speakers in a group and the play five or six chimes one after the other before the message.
One of them has a screen, and I see that after the first chime it shows the “Welcome to home assistant” blue screen, then the normal idle screen again, and after that it comes the second chime and starts paying the message (showing the reproductor). It’s like it connects with home assistant, the disconnects, and then connect again.
When I use the speaker with the screen alone, not within a group, it chimes, show the “Welcome to home assistant” screen and inmediately after that start de message with the reproductor.It doesn’t show the idle screen between home assistant and the reproductor (nor chimes).
Source: helpers/script.py:1718
Integration: Script ([documentation](https://rc.home-assistant.io/integrations/script), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+script%22))
First occurred: 8:28:58 PM (1 occurrences)
Last logged: 8:28:58 PM
00 🔊 Google Home Resume: Error executing script. Invalid data for call_service at pos 11: invalid slug resume_script_active_ghresume_01G45YVEV85K8ZS1HSNEGV7M8F (try resume_script_active_ghresume_01g45yvev85k8zs1hsnegv7m8f) for dictionary value @ data['object_id']
Are you on the HA 2022.6 beta already? It seems they have changed something which now allows uppercase characters in context.id.
I use this for the unique identifier for the group, and uppercase characters are not allowed there.
I was already working on this, but I’m also including some other changes.
Yes, you could do it like that, but that would mean you’ll have to add another option for each channel.
Easiest would be if you’d listen to BBC Radio 2 using TuneIn
Just ask the Google Home: “Hey Google, listen to BBC Radio 2 on Tunin” and it will work with the original version of the script.