-
-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
Description
I would like to get the GroupId of each SonosDevice similary to the GroupName getter.
For example:
manager.Devices.forEach(d => {
console.log('Device %s (%s) is joined in %s', d.Name, d.Uuid, d.GroupId)
....
Another solution that would work, is to add the groupId to the related group events data.
This would be helpful when dealing with Group Events:
const onGroupRenderingChanged = async (data) => {
const sonosDevice = manager.Devices.find(data.coordinatorId)
const timestamp = Date.now()
const deviceGroupId = sonosDevice.GroupId
const eventGroupId = data.GroupId
//const groupId = await sonosDevice.ZoneGroupTopologyService.GetZoneGroupAttributes()
// .then(attributes => attributes.CurrentZoneGroupID)
const event = { groupId, data, timestamp }
events.emit('group-rendering', event)
}
.....
const id = sonosDevice.uuid
sonosDevice.GroupRenderingControlService.Events.on(ServiceEvent, data => onGroupRenderingChanged({ id, data })
....
....
Reactions are currently unavailable