Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: TTS to a group of players #62

Open
Liver64 opened this issue Jan 23, 2017 · 5 comments
Open

Question: TTS to a group of players #62

Liver64 opened this issue Jan 23, 2017 · 5 comments
Milestone

Comments

@Liver64
Copy link

Liver64 commented Jan 23, 2017

Hi Duncan,
you did an amazing job on getting this library coded, this is the most robust coding i've seen to control Sonos.
I did some php development to integrate Sonos into Loxone Home Automation based on the old PHPSonos.inc.php which i adopted and updated frequently, actually i'm stucked and think of to change my baseline you your code.
One of the favorit functions of my user is that they e.g. actually can play something in a group, then build a new group for TTS, adjust the new group volume by Sonos "groupvolume", play generated or stored TTS and regroup to the old status. The Standard TTS Volume per Speaker is stored in the config, but there are some cases where they want to influence the volume up or down.
Now my question: Can i code something similiar by using your API?
Thanks in advance
Oliver

Linkt to: LoxBerry

@duncan3dc
Copy link
Owner

Hi Oliver, thanks for your message, I'm glad you like the library.

I presume you've seen the interrupt feature, and you're talking about something similar to that, but allowing groupings to change?

So something like if the Kitchen was playing Pop, and the Garage was playing Rock, then you could do:

$group = new TemporaryGroup;
$group->addSpeaker($sonos->getSpeakerByRoom("Kitchen"));
$group->addSpeaker($sonos->getSpeakerByRoom("Garage"));

$group->interrupt($track);

And after the interruption the Kitchen would go back to Pop and the Garage back to Rock?

@Liver64
Copy link
Author

Liver64 commented Jan 23, 2017

Hi Craig,
thx for your quick answer. I recognized the interrupt function, but i wasn't sure if the function meet my needs. I give you a more detailed example:
Group is playing Radio:
Kitchen (Coordinator)
Living Room (member)
Kids 1 (member)

Now i want to announce to:
Kitchen
Living Room
Kids 2
a TTS.
From the old group Kids 1 is now the new Coordinator and is still playing radio.
Now i want to adjust volume for each speaker up or down (i use groupvolume) and play TTS (i know to send the TTS only to Coordinator).
After the text has been announced i want that Kitchen and Living Room join back to the old group where Kids 1 is the Coordinator.
Can i realize it somehow with your coding?
Thanks in advance
Oliver

@Liver64
Copy link
Author

Liver64 commented Feb 25, 2017

Does anyone else get this running or can answer the question?

@duncan3dc
Copy link
Owner

Hi Oliver, yes I think you're asking for the TemporaryGroup feature I described above, I'm working on getting 2.0 out the door at the moment, but once that's released I'll look at adding this feature

@duncan3dc duncan3dc added this to the 2.1 milestone Jul 21, 2018
@duncan3dc
Copy link
Owner

I've taken a look at this but it's quite complicated to do in a reliable way that handles all the possible scenarios.

I'll give it another crack when I get some time. You can take a look at the work in progress here if you like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants