Hi
I have finally got around to fixing some of my earlier issues and one that I am stumped on is that when I have multiple Sonos speakers setup I cannot control the one I target.
Setup below
things
Thing sonos:PLAY3:blah1[udn="blah1", refresh=60, notificationVolume=25]
Thing sonos:PLAY1:blah2[udn="blah2", refresh=60, notificationVolume=25]
items
Group Sonos <player>
Player Sonos_Controller "Controller" (Sonos) {channel="sonos:PLAY3:blah1:control"}
Group Sonos2 <player>
Player Sonos_Controller_Kitchen "Kitchen Controller" (Sonos2) {channel="sonos:PLAY1:blah2:control"}
Habpanel template
<style>
.sonosbutton {width: 90%; height: 4em; border: 0; color: white; background-color: transparent;}
.sonosctrl {width: 90%; height: 3em; border: 0; color: white; background-color: transparent;}
.sonosbuttontxt_white {width: 100%;height: 4em; border: 0; color: white;font-size: 10pt; background-color: transparent;}
.sonosbuttontxt_red {width: 100%;height: 4em; border: 0; color: red;font-size: 10pt; background-color: transparent;}
.butticon {font-size:1em;}
</style>
<div class="row">
<div class="col-md-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller_Kitchen', 'PREVIOUS')">
<i class="glyphicon glyphicon-step-backward butticon" alt="Step Backward"></i>
</button>
</div>
<div class="col-md-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller_Kitchen', 'PAUSE')">
<i class="glyphicon glyphicon-pause butticon" alt="PAUSE"></i>
</button>
</div>
<div class="col-xs-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller_Kitchen', 'PLAY')">
<i class="glyphicon glyphicon-play butticon" alt="Play"></i>
</button>
</div>
<div class="col-xs-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller_Kitchen', 'NEXT')">
<i class="glyphicon glyphicon-step-forward butticon" alt="Step Forward"></i>
</button>
</div>
</div>
<div class="row">
<div class="col-md-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller', 'PREVIOUS')">
<i class="glyphicon glyphicon-step-backward butticon" alt="Step Backward"></i>
</button>
</div>
<div class="col-md-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller', 'PAUSE')">
<i class="glyphicon glyphicon-pause butticon" alt="PAUSE"></i>
</button>
</div>
<div class="col-xs-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller', 'PLAY')">
<i class="glyphicon glyphicon-play butticon" alt="Play"></i>
</button>
</div>
<div class="col-xs-3 modgrid">
<button class="sonosctrl" style="background-size: contain; background-repeat: no-repeat;background-position: center center;font-size:40px;"
ng-click="sendCmd('Sonos_Controller', 'NEXT')">
<i class="glyphicon glyphicon-step-forward butticon" alt="Step Forward"></i>
</button>
</div>
</div>
Gives the following view.
The controls on the top should control the kitchen speakers and the controls at the bottom should control the other speaker (Lets say dining room) Whats actually happening is that all controls are having an effect on the kitchen speakers
If I press pause (Already playing) and then play on the top controls I get the following entries
events.log
2018-10-27 17:12:08.860 [ome.event.ItemCommandEvent] - Item 'Sonos_Controller_Kitchen' received command PAUSE
2018-10-27 17:12:14.116 [ome.event.ItemCommandEvent] - Item 'Sonos_Controller_Kitchen' received command PLAY
2018-10-27 17:12:14.136 [vent.ItemStateChangedEvent] - Sonos_Controller_Kitchen changed from PAUSE to PLAY
2018-10-27 17:12:14.465 [vent.ItemStateChangedEvent] - Sonos_State_Kitchen changed from STOPPED to TRANSITIONING
2018-10-27 17:12:14.469 [vent.ItemStateChangedEvent] - Sonos_Controller_Kitchen changed from PLAY to UNDEF
2018-10-27 17:12:19.695 [vent.ItemStateChangedEvent] - Sonos_State_Kitchen changed from TRANSITIONING to PLAYING
2018-10-27 17:12:19.704 [vent.ItemStateChangedEvent] - Sonos_Controller_Kitchen changed from UNDEF to PLAY
Doing the same on the bottom controls yields the following
events.log
2018-10-27 17:13:56.097 [ome.event.ItemCommandEvent] - Item 'Sonos_Controller' received command PAUSE
2018-10-27 17:13:56.470 [vent.ItemStateChangedEvent] - Sonos_State_Kitchen changed from PLAYING to STOPPED
2018-10-27 17:13:56.485 [vent.ItemStateChangedEvent] - Sonos_Controller_Kitchen changed from PLAY to PAUSE
2018-10-27 17:14:06.179 [ome.event.ItemCommandEvent] - Item 'Sonos_Controller' received command PLAY
2018-10-27 17:14:06.194 [vent.ItemStateChangedEvent] - Sonos_Controller changed from PAUSE to PLAY
2018-10-27 17:14:06.421 [vent.ItemStateChangedEvent] - Sonos_State_Kitchen changed from STOPPED to TRANSITIONING
2018-10-27 17:14:06.427 [vent.ItemStateChangedEvent] - Sonos_Controller_Kitchen changed from PAUSE to UNDEF
2018-10-27 17:14:07.218 [vent.ItemStateChangedEvent] - Sonos_State_Kitchen changed from TRANSITIONING to PLAYING
2018-10-27 17:14:07.224 [vent.ItemStateChangedEvent] - Sonos_Controller_Kitchen changed from UNDEF to PLAY
Am I missing something really obvious here?