Page 1 of 1

Stream different Itunes music to different speakers

PostPosted: Tue Aug 27, 2019 5:48 am
by anupchavda
Hi

I'm VERY new to Indigo (not so much HA in general, with a few years experience on Vera and Homebridge etc)

I'm trying to achieve the following:

When the Shower room light (z-wave) turns on, then stream music to the Airplay2 enabled speakers in the Shower room), and similarly, when the light turns off, then stop the stream.

using the itunes local plugin, i got this working awesomely, however i wanted to mimic the behaviour on the upstairs bathroom as well. Again, i could acheive this using similar methods. where i'm failing, is if the rooms are being used at the same time.

When the showerroom light turns off, it pauses the music, which then stops it in the upstairs bathroom and vice versa. has anyone come across any solutions on how to make this work?

Thanks

Re: Stream different Itunes music to different speakers

PostPosted: Tue Aug 27, 2019 9:41 am
by jay (support)
I think you're going to need a little state machine so that it can decide what to do when both are on and one goes off. It might be as simple as a condition on the trigger that would pause the music that checks to see if the other device is also on (in which case it would fail the condition and wouldn't turn them off).

Re: Stream different Itunes music to different speakers

PostPosted: Tue Aug 27, 2019 9:49 am
by FlyingDiver
And if you actually want DIFFERENT music to each set of speakers (as the title indicates) you're going to need a different solution than iTunes.

Re: Stream different Itunes music to different speakers

PostPosted: Wed Aug 28, 2019 2:10 am
by anupchavda
So, i'm good with the same music being piped into both the shower room and the bathroom, so i dont think that we need to go down another route in that resepect.

I *think* the simplest solution is...have itunes playing the playlist on repeat and shuffle continuously. then when the light is triggered, for Itunes to then select the relevant Airplay Device - the music would then be active in that particular room. When the light is turned off, then the airplay device for that room is disabled again. This should work with multiple airplay sources being switched on at different times, but working concurrently with other sources.

any issues with this scenario?

thanks for the responses so far!

Re: Stream different Itunes music to different speakers

PostPosted: Wed Aug 28, 2019 10:35 am
by jay (support)
anupchavda wrote:
any issues with this scenario?


Try it and see...