b0mbays / continuously_casting_dashboards

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

CCD interrupts music playing if device is part of a group #21

Closed klasenby closed 8 months ago

klasenby commented 1 year ago

I have a Chromecast group called "main floor". If I start playing music on the group, it is interrupted by the dashboard cast.

Presumably this is because the device I'm casting the dashboard to is not the device name that's playing, it's the group it's part of.

Hopefully there's a way to check the group membership

b0mbays commented 1 year ago

Hi, I haven't tried creating a group within Google Home and if it's compatible with this integration but I can take a look when I get some time soon and figure out a solution 👍

goldrake1981 commented 1 year ago

Hello and congratulations on this project. I also have several Nest Hubs in my house and when I try to play music on them the CCD stops the music

b0mbays commented 12 months ago

I'll revisit this soon. Apologies

dan0878 commented 10 months ago

I have fudged this to work as I was getting complaints from the family! The catt 'status' does not return anything useful when the device is in group mode. However, if you call catt 'info' if will return additional information that can be used to detect whether the device is active. I have added some code to detect whether the display_name = Backdrop which is my screensaver, this will be something else when active. If this is showing then we assume the device is doing nothing and therefore allow the cast to occur.

goldrake1981 commented 10 months ago

Can you share the changes for those like me who are not capable? Thanks

LukasSolf commented 8 months ago

@b0mbays any news on when this topic will be fixed? Currently, CCD can't be used because the media being played is always stopping if the device is assigned to a group.

b0mbays commented 8 months ago

@LukasSolf Apologies. I'll take a look today

b0mbays commented 8 months ago

I have a fix working for this, I'll upload a new release tomorrow! 🚀

You will be able to supply the name of a speaker group per device. I just need to do some more testing in the morning before releasing 😄

b0mbays commented 8 months ago

I have fudged this to work as I was getting complaints from the family! The catt 'status' does not return anything useful when the device is in group mode. However, if you call catt 'info' if will return additional information that can be used to detect whether the device is active. I have added some code to detect whether the display_name = Backdrop which is my screensaver, this will be something else when active. If this is showing then we assume the device is doing nothing and therefore allow the cast to occur.

The incoming fix will work by calling the speaker group using catt -d {speaker-group-name} status which is given per device in the config and if it's playing, then skip the cast. Google creates a new 'device' essentially (just like another hub) when you create a new group which we can then call and ask for it's status 👍

LukasSolf commented 8 months ago

Awesome, thanks for the fast reaction! I'll give it a try later.

b0mbays commented 8 months ago

I have published a new release v1.3.1 - after updating to the new version, update your configuration then restart again.

Let me know if you have any issues 👍 CCD should now skip any devices that are playing audio on a speaker group.