ZoneGroupTopology service
Zone config stuff, eg getting all the configured sonos zones
The ZoneGroupTopology service is available on these models: v2-S1 / v2-S13 / v2-S14 / v2-S18 / v2-S21 / v2-S27 / v2-S3 / v2-S33 / v2-S38 / v2-S6 / v2-S9 / v2-Sub.
const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.ZoneGroupTopologyService.OneOfTheMethodsBelow({...})
All actions that require input expect an object with the specified parameters, even if it only requires one parameter.
- BeginSoftwareUpdate
- CheckForUpdate
- GetZoneGroupAttributes
- GetZoneGroupState
- RegisterMobileDevice
- ReportAlarmStartedRunning
- ReportUnresponsiveDevice
- SubmitDiagnostics
- ZoneGroupTopologyService event
BeginSoftwareUpdate
const result = await sonos.ZoneGroupTopologyService.BeginSoftwareUpdate({ UpdateURL:..., Flags:..., ExtraOptions:... });
Input object:
| property | type | description |
|---|---|---|
| UpdateURL | string | |
| Flags | number | |
| ExtraOptions | string |
This actions returns a boolean whether or not the requests succeeded.
CheckForUpdate
const result = await sonos.ZoneGroupTopologyService.CheckForUpdate({ UpdateType:..., CachedOnly:..., Version:... });
Input object:
| property | type | description |
|---|---|---|
| UpdateType | string | Allowed values: All / Software
|
| CachedOnly | boolean | |
| Version | string |
Output object:
| property | type | description |
|---|---|---|
| UpdateItem | string |
GetZoneGroupAttributes
Get information about the current Zone
const result = await sonos.ZoneGroupTopologyService.GetZoneGroupAttributes();
Output object:
| property | type | description |
|---|---|---|
| CurrentZoneGroupName | string | |
| CurrentZoneGroupID | string | |
| CurrentZonePlayerUUIDsInGroup | string | |
| CurrentMuseHouseholdId | string |
GetZoneGroupState
Get all the Sonos groups, (as XML)
const result = await sonos.ZoneGroupTopologyService.GetZoneGroupState();
Output object:
| property | type | description |
|---|---|---|
| ZoneGroupState | Array<ZoneGroup> | string | xml string, see remarks |
Remarks Some libraries also support GetParsedZoneGroupState that parses the xml for you.
RegisterMobileDevice
const result = await sonos.ZoneGroupTopologyService.RegisterMobileDevice({ MobileDeviceName:..., MobileDeviceUDN:..., MobileIPAndPort:... });
Input object:
| property | type | description |
|---|---|---|
| MobileDeviceName | string | |
| MobileDeviceUDN | string | |
| MobileIPAndPort | string |
This actions returns a boolean whether or not the requests succeeded.
ReportAlarmStartedRunning
const result = await sonos.ZoneGroupTopologyService.ReportAlarmStartedRunning();
This actions returns a boolean whether or not the requests succeeded.
ReportUnresponsiveDevice
const result = await sonos.ZoneGroupTopologyService.ReportUnresponsiveDevice({ DeviceUUID:..., DesiredAction:... });
Input object:
| property | type | description |
|---|---|---|
| DeviceUUID | string | |
| DesiredAction | string | Allowed values: Remove / TopologyMonitorProbe / VerifyThenRemoveSystemwide
|
This actions returns a boolean whether or not the requests succeeded.
SubmitDiagnostics
const result = await sonos.ZoneGroupTopologyService.SubmitDiagnostics({ IncludeControllers:..., Type:... });
Input object:
| property | type | description |
|---|---|---|
| IncludeControllers | boolean | |
| Type | string |
Output object:
| property | type | description |
|---|---|---|
| DiagnosticID | number |
ZoneGroupTopologyService event
const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.ZoneGroupTopologyService.Events('serviceEvent', (data) => {
console.log(data);
});
The ZoneGroupTopologyService emits events with these properties. Not all properties are emitted every time.
| parameter | type | possible values |
|---|---|---|
| AlarmRunSequence | string | |
| AreasUpdateID | string | |
| AvailableSoftwareUpdate | string | |
| DiagnosticID | number | |
| MuseHouseholdId | string | |
| NetsettingsUpdateID | string | |
| SourceAreasUpdateID | string | |
| ThirdPartyMediaServersX | string | |
| ZoneGroupID | string | |
| ZoneGroupName | string | |
| ZoneGroupState | Array<ZoneGroup> | string | |
| ZonePlayerUUIDsInGroup | string |
This file is automatically generated with @svrooij/sonos-docs, do not edit manually.