b0mbays / continuously_casting_dashboards

HACS Integration for continuously casting a Home Assistant dashboard to your Google Chromecast Displays
MIT License
230 stars 11 forks source link

Interupt spotify playing #57

Closed Lekskog closed 6 months ago

Lekskog commented 7 months ago

When i listen to spotify it will interupt the music i play and cast the dashboard sometimes directly sometime after a 2-3 songs.

Update: It also recasting the dashboard Here is the config file i have setup:

Casta till Hubben

continuously_casting_dashboards: logging_level: warning #Required: Set the logging level - debug/info/warning (default is 'warning' - try 'debug' for debugging) cast_delay: 45 #Required: Time (in seconds) for casting checks between each device. start_time: "06:00" #Optional: Global start time of the casting window (format: "HH:MM") - Default is set to "07:00" and can be individually overwritten per device below. end_time: "22:00" #Optional: Global end time of the casting window (format: "HH:MM") and must be after "00:00". Default is set to "01:00" and can be individually overwritten per device below. devices: "Hubben": #Required: Display name of your device. Find this on the actual device's settings or inside the Google Home app.

b0mbays commented 7 months ago

Do you have just one display? I have seen this issue on mine very rarely. I think the issue is the check is checking the display so frequently that in-between songs the device is reporting "not playing" and if you only have one device, then it will be continuously checking and will eventually fall in-between a song.

I'll make a change to delay the check to avoid this from happening

Lekskog commented 7 months ago

Do you have just one display? I have seen this issue on mine very rarely. I think the issue is the check is checking the display so frequently that in-between songs the device is reporting "not playing" and if you only have one device, then it will be continuously checking and will eventually fall in-between a song.

I'll make a change to delay the check to avoid this from happening

I have multiple chromecast devices but only one nest hub I cast to. It starts in the middle of the song. I have made an automation now that check of the chromecast is in the "off state" for like 15 seconds and if it have been it it starts to cast. Maybe add that as option to?

wimpie007 commented 6 months ago

I have the same issue. Only one nest display, and casting HA screen works fine. BUT, when playing music with spotify or TuneIn (radio), it stops playing after x seconds and restarts casting HA screen.

b0mbays commented 6 months ago

I'll take a look later and try and fix this issue. Apologies!

wimpie007 commented 6 months ago

tried different versions, 1.26, 1.30, all the same problem. Casting takes over after 10-30 seconds. No need for apologies! appreciate your work!

EDIT: extra info: it has something to do with speaker groups: in google home app, my default speaker was a speaker group, of wich one device is not turned on. In that case, the script doesnt seem to notice that the google nest is playing something... If i force the music to play on 1 device, it works.

b0mbays commented 6 months ago

tried different versions, 1.26, 1.30, all the same problem. Casting takes over after 10-30 seconds. No need for apologies! appreciate your work!

EDIT: extra info: it has something to do with speaker groups: in google home app, my default speaker was a speaker group, of wich one device is not turned on. In that case, the script doesnt seem to notice that the google nest is playing something... If i force the music to play on 1 device, it works.

Hey, just seen this sorry. If you are using a speaker group then you will need to add a section for your speaker group. That will be why the casting is overtaking spotify. You can find an example here for each device.

wimpie007 commented 6 months ago

Thanks man!! That will be the problem indeed... Appreciate your work!

b0mbays commented 6 months ago

Hi @Lekskog i've made the media check more robust and reliable in the latest release v1.3.3 - If you restart HA and update you should not face this issue anymore 👍

Lekskog commented 6 months ago

Hi @Lekskog i've made the media check more robust and reliable in the latest release v1.3.3 - If you restart HA and update you should not face this issue anymore 👍

Awesome will see if I can try it out this weekend!