I have a more complicated scene but have narrowed down an issue to these lines of code.
Most of the time my 5 Sonos devices follow the Living Room which is device 73. The bedroom is device 75.
luup.call_action("urn:upnp-org:serviceId:AVTransport","BecomeCoordinatorOfStandaloneGroup",0,75) luup.call_action("urn:micasaverde-com:serviceId:Sonos1","PlayURI",{URIToPlay="pndrradio:[i]station[/i]"},75)
These two lines are meant to pull device 75 out of the group and play something new on device 75 (bedroom).
Instead, the other Sonos play the station on the second line, led by device 73. Device 75 leaves the group but plays nothing (but Sonos shows the queue with what was playing prior to device 75 joining 73’s zone.
If I run this code again (after device 75 is out of the group) then device 75 does play the right thing.
Seems like the second line is getting read by the master zone player (device 73) prior to device 75 being fully out of the group.
I’ve added a leaveGroup line and get the same results.
Any ideas?