Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonos Boost: Cannot read property 'homeTheatre' of undefined #88

Closed
mbsaeger opened this issue Jul 24, 2019 · 24 comments
Closed

Sonos Boost: Cannot read property 'homeTheatre' of undefined #88

mbsaeger opened this issue Jul 24, 2019 · 24 comments
Labels

Comments

@mbsaeger
Copy link

Running into the following error once upgrading to 1.0

[7/24/2019, 1:10:56 AM] [Sonos] error: TypeError: Cannot read property 'homeTheatre' of undefined
    at ZpPlatform.logTopology (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:376:16)
    at ZpPlatform.parseZones (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:331:12)
    at ZpPlatform.handleZonePlayerZoneGroupTopologyEvent (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:363:12)
    at ZpClient.zpClient.on (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:240:18)
    at ZpClient.emit (events.js:203:15)
    at IncomingMessage.request.on (/usr/lib/node_modules/homebridge-zp/lib/ZpListener.js:99:22)
    at process._tickCallback (internal/process/next_tick.js:68:7)
@Spy-1
Copy link

Spy-1 commented Jul 24, 2019

same here

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

Could you please attach the full debug logfile and list the output of zp topology -v?

@Spy-1
Copy link

Spy-1 commented Jul 24, 2019

? I, for my part, don´t know how!

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

See https://github.com/ebaauw/homebridge-hue#debug-log-file how to create a debug log file.

zp is a command line utility included in homebridge-zp. In a terminal window issue:

$ zp -H xx.xx.xx.xx topology -v

where xx.xx.xx.xx is the IP address of one of your zone players.

@Spy-1
Copy link

Spy-1 commented Jul 24, 2019

pi@pi-Backup:~ $ zp -H 192.168.178.29 topology -v
-bash: zp: Kommando nicht gefunden.

@mbsaeger
Copy link
Author

{
  "BOOST": {
    "master": null,
    "name": "BOOST",
    "zonePlayers": {
      "BOOST": {
        "address": "10.0.0.106",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.0.106:1400",
        "bootSeq": 189,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_B8E93700192201400",
        "lastSeen": 0,
        "modelName": "Sonos Boost",
        "modelNumber": "BR200",
        "name": "BOOST",
        "role": "slave",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "BOOST",
        "zoneName": "BOOST"
      }
    }
  },
  "Dining Room": {
    "master": "Dining Room",
    "name": "Dining Room",
    "zonePlayers": {
      "Dining Room": {
        "address": "10.0.0.107",
        "airPlay": false,
        "audioIn": true,
        "balance": true,
        "baseUrl": "http://10.0.0.107:1400",
        "bootSeq": 194,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_000E5864A58A01400",
        "lastSeen": 0,
        "modelName": "Sonos Play:5",
        "modelNumber": "S5",
        "name": "Dining Room",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Dining Room",
        "zoneName": "Dining Room"
      }
    }
  },
  "Garage": {
    "master": "Garage",
    "name": "Garage",
    "zonePlayers": {
      "Garage": {
        "address": "10.0.7.130",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.7.130:1400",
        "bootSeq": 251,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_5CAAFD20E6D601400",
        "lastSeen": 0,
        "modelName": "Sonos Play:1",
        "modelNumber": "S1",
        "name": "Garage",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Garage",
        "zoneName": "Garage"
      }
    }
  },
  "Guest Bathroom": {
    "master": "Guest Bathroom",
    "name": "Guest Bathroom",
    "zonePlayers": {
      "Guest Bathroom": {
        "address": "10.0.0.108",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.0.108:1400",
        "bootSeq": 209,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_000E58C03BEA01400",
        "lastSeen": 0,
        "modelName": "Sonos Play:1",
        "modelNumber": "S1",
        "name": "Guest Bathroom",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Guest Bathroom",
        "zoneName": "Guest Bathroom"
      }
    }
  },
  "Kitchen": {
    "master": "Kitchen",
    "name": "Kitchen",
    "zonePlayers": {
      "Kitchen": {
        "address": "10.0.0.109",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.0.109:1400",
        "bootSeq": 144,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_5CAAFD20E6B801400",
        "lastSeen": 0,
        "modelName": "Sonos Play:1",
        "modelNumber": "S1",
        "name": "Kitchen",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Kitchen",
        "zoneName": "Kitchen"
      }
    }
  },
  "Patio": {
    "master": "Patio",
    "name": "Patio",
    "zonePlayers": {
      "Patio": {
        "address": "10.0.7.200",
        "airPlay": true,
        "audioIn": true,
        "balance": true,
        "baseUrl": "http://10.0.7.200:1400",
        "bootSeq": 7,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_347E5C053F6D01400",
        "lastSeen": 0,
        "modelName": "Sonos Amp",
        "modelNumber": "S16",
        "name": "Patio",
        "role": "master",
        "stereoPair": false,
        "tvIn": true,
        "version": "10.3",
        "zoneDisplayName": "Patio",
        "zoneName": "Patio"
      }
    }
  },
  "Pool": {
    "master": "Pool",
    "name": "Pool",
    "zonePlayers": {
      "Pool": {
        "address": "10.0.7.186",
        "airPlay": false,
        "audioIn": true,
        "balance": true,
        "baseUrl": "http://10.0.7.186:1400",
        "bootSeq": 60,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_949F3EB2FE5A01400",
        "lastSeen": 0,
        "modelName": "Sonos Connect",
        "modelNumber": "S15",
        "name": "Pool",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Pool",
        "zoneName": "Pool"
      }
    }
  }
}

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

@mbsaeger thanks! I haven’t come across a Sonos Boost before. It seems to be the only player in a zone of its own, but its marked invisible, causing homebridge-zp to think it’s a slave player. I think it chokes because it cannot find the corresponding master player for the zone.

Could you please run ph -H 10.0.0.106 description -S > boost.json and attach boost.json here? This lists the SOAP services supported by the Boost, so I can see whether there’s something useful to support (e.g. the status LED) or whether best to ignore it completely.

@Spy-1 do you also have a Boost? The zp command should be installed to /usr/bin or /usr/local/bin, depending on how you installed NodeJS. It should be the same bin directory that homebridge is in.

@mbsaeger
Copy link
Author

@ebaauw interesting.. The boost should be ignored completely - it's just the Sonos Network box basically (e.g. all of the Sonos connect wirelessly to the Boost versus my WiFi.

  "specVersion": {
    "major": 1,
    "minor": 0
  },
  "device": {
    "deviceType": "urn:schemas-upnp-org:device:ZonePlayer:1",
    "friendlyName": "10.0.0.106 - Sonos Boost",
    "manufacturer": "Sonos, Inc.",
    "manufacturerUrl": "http://www.sonos.com",
    "modelNumber": "BR200",
    "modelDescription": "Sonos Boost",
    "modelName": "Sonos Boost",
    "modelUrl": "http://www.sonos.com/store/products/BR200",
    "softwareVersion": "51.1-66240",
    "swGen": 1,
    "hardwareVersion": "1.12.1.2-1",
    "serialNum": "B8-E9-37-00-19-22:C",
    "macAddress": "B8:E9:37:00:19:22",
    "udn": "uuid:RINCON_B8E93700192201400",
    "iconList": [
      {
        "id": 0,
        "mimetype": "image/png",
        "width": 48,
        "height": 48,
        "depth": 24,
        "url": "/img/icon-BR200.png"
      }
    ],
    "minCompatibleVersion": "50.0-00000",
    "legacyCompatibleVersion": "36.0-00000",
    "displayVersion": "10.3",
    "extraVersion": "",
    "roomName": "BOOST",
    "displayName": "Boost",
    "zoneType": 11,
    "feature1": "0x00000000",
    "feature2": "0x00008173",
    "feature3": "0x00030000",
    "seriesid": "A100",
    "variant": 0,
    "internalSpeakerSize": "-1",
    "memory": 64,
    "flash": 16,
    "serviceList": [
      {
        "serviceType": "urn:schemas-upnp-org:service:DeviceProperties:1",
        "serviceId": "urn:upnp-org:serviceId:DeviceProperties",
        "controlUrl": "/DeviceProperties/Control",
        "eventSubUrl": "/DeviceProperties/Event",
        "scpdUrl": "/xml/DeviceProperties1.xml",
        "scpd": {
          "specVersion": {
            "major": 1,
            "minor": 0
          },
          "serviceStateTable": [
            {
              "sendEvents": "no",
              "name": "HouseholdID",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "SettingsReplicationState",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ZoneName",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "Icon",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "Configuration",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "Invisible",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "IsZoneBridge",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "AirPlayEnabled",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "SupportsAudioIn",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "SupportsAudioClip",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "IsIdle",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "MoreInfo",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ChannelMapSet",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "HTSatChanMapSet",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "HTFreq",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "HTBondedZoneCommitState",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "Orientation",
              "dataType": "i4"
            },
            {
              "sendEvents": "yes",
              "name": "LastChangedPlayState",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "RoomCalibrationState",
              "dataType": "i4"
            },
            {
              "sendEvents": "yes",
              "name": "AvailableRoomCalibration",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "SatRoomUUID",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "LEDState",
              "dataType": "string",
              "allowedValueList": [
                "On",
                "Off"
              ]
            },
            {
              "sendEvents": "no",
              "name": "SerialNumber",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "SoftwareVersion",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "DisplaySoftwareVersion",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "HardwareVersion",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "IPAddress",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "MACAddress",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "CopyrightInfo",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "ExtraInfo",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "HTAudioIn",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "Flags",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "AutoplayIncludeLinkedZones",
              "dataType": "boolean"
            },
            {
              "sendEvents": "no",
              "name": "AutoplayRoomUUID",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "AutoplaySource",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "AutoplayVolume",
              "dataType": "ui2",
              "allowedValueRange": {
                "minimum": 0,
                "maximum": 100,
                "step": 1
              }
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_SettingID",
              "dataType": "ui4",
              "allowedValueRange": {
                "minimum": 0,
                "maximum": 65535
              }
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_SettingURI",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "AutoplayUseVolume",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "TVConfigurationError",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "HdmiCecAvailable",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "WirelessMode",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "WirelessLeafOnly",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "HasConfiguredSSID",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "ChannelFreq",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "BehindWifiExtender",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "WifiEnabled",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "ConfigMode",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "SecureRegState",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_ConfigModeOptions",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_ConfigModeState",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_ButtonState",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "ButtonLockState",
              "dataType": "string",
              "allowedValueList": [
                "On",
                "Off"
              ]
            },
            {
              "sendEvents": "yes",
              "name": "VoiceConfigState",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "MicEnabled",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "KeepGrouped",
              "dataType": "boolean"
            }
          ],
          "actionList": [
            {
              "name": "SetLEDState",
              "argumentList": [
                {
                  "name": "DesiredLEDState",
                  "direction": "in",
                  "relatedStateVariable": "LEDState"
                }
              ]
            },
            {
              "name": "GetLEDState",
              "argumentList": [
                {
                  "name": "CurrentLEDState",
                  "direction": "out",
                  "relatedStateVariable": "LEDState"
                }
              ]
            },
            {
              "name": "AddBondedZones",
              "argumentList": [
                {
                  "name": "ChannelMapSet",
                  "direction": "in",
                  "relatedStateVariable": "ChannelMapSet"
                }
              ]
            },
            {
              "name": "RemoveBondedZones",
              "argumentList": [
                {
                  "name": "ChannelMapSet",
                  "direction": "in",
                  "relatedStateVariable": "ChannelMapSet"
                },
                {
                  "name": "KeepGrouped",
                  "direction": "in",
                  "relatedStateVariable": "KeepGrouped"
                }
              ]
            },
            {
              "name": "CreateStereoPair",
              "argumentList": [
                {
                  "name": "ChannelMapSet",
                  "direction": "in",
                  "relatedStateVariable": "ChannelMapSet"
                }
              ]
            },
            {
              "name": "SeparateStereoPair",
              "argumentList": [
                {
                  "name": "ChannelMapSet",
                  "direction": "in",
                  "relatedStateVariable": "ChannelMapSet"
                }
              ]
            },
            {
              "name": "SetZoneAttributes",
              "argumentList": [
                {
                  "name": "DesiredZoneName",
                  "direction": "in",
                  "relatedStateVariable": "ZoneName"
                },
                {
                  "name": "DesiredIcon",
                  "direction": "in",
                  "relatedStateVariable": "Icon"
                },
                {
                  "name": "DesiredConfiguration",
                  "direction": "in",
                  "relatedStateVariable": "Configuration"
                }
              ]
            },
            {
              "name": "GetZoneAttributes",
              "argumentList": [
                {
                  "name": "CurrentZoneName",
                  "direction": "out",
                  "relatedStateVariable": "ZoneName"
                },
                {
                  "name": "CurrentIcon",
                  "direction": "out",
                  "relatedStateVariable": "Icon"
                },
                {
                  "name": "CurrentConfiguration",
                  "direction": "out",
                  "relatedStateVariable": "Configuration"
                }
              ]
            },
            {
              "name": "GetHouseholdID",
              "argumentList": [
                {
                  "name": "CurrentHouseholdID",
                  "direction": "out",
                  "relatedStateVariable": "HouseholdID"
                }
              ]
            },
            {
              "name": "GetZoneInfo",
              "argumentList": [
                {
                  "name": "SerialNumber",
                  "direction": "out",
                  "relatedStateVariable": "SerialNumber"
                },
                {
                  "name": "SoftwareVersion",
                  "direction": "out",
                  "relatedStateVariable": "SoftwareVersion"
                },
                {
                  "name": "DisplaySoftwareVersion",
                  "direction": "out",
                  "relatedStateVariable": "DisplaySoftwareVersion"
                },
                {
                  "name": "HardwareVersion",
                  "direction": "out",
                  "relatedStateVariable": "HardwareVersion"
                },
                {
                  "name": "IPAddress",
                  "direction": "out",
                  "relatedStateVariable": "IPAddress"
                },
                {
                  "name": "MACAddress",
                  "direction": "out",
                  "relatedStateVariable": "MACAddress"
                },
                {
                  "name": "CopyrightInfo",
                  "direction": "out",
                  "relatedStateVariable": "CopyrightInfo"
                },
                {
                  "name": "ExtraInfo",
                  "direction": "out",
                  "relatedStateVariable": "ExtraInfo"
                },
                {
                  "name": "HTAudioIn",
                  "direction": "out",
                  "relatedStateVariable": "HTAudioIn"
                },
                {
                  "name": "Flags",
                  "direction": "out",
                  "relatedStateVariable": "Flags"
                }
              ]
            },
            {
              "name": "SetAutoplayLinkedZones",
              "argumentList": [
                {
                  "name": "IncludeLinkedZones",
                  "direction": "in",
                  "relatedStateVariable": "AutoplayIncludeLinkedZones"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "GetAutoplayLinkedZones",
              "argumentList": [
                {
                  "name": "IncludeLinkedZones",
                  "direction": "out",
                  "relatedStateVariable": "AutoplayIncludeLinkedZones"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "SetAutoplayRoomUUID",
              "argumentList": [
                {
                  "name": "RoomUUID",
                  "direction": "in",
                  "relatedStateVariable": "AutoplayRoomUUID"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "GetAutoplayRoomUUID",
              "argumentList": [
                {
                  "name": "RoomUUID",
                  "direction": "out",
                  "relatedStateVariable": "AutoplayRoomUUID"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "SetAutoplayVolume",
              "argumentList": [
                {
                  "name": "Volume",
                  "direction": "in",
                  "relatedStateVariable": "AutoplayVolume"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "GetAutoplayVolume",
              "argumentList": [
                {
                  "name": "CurrentVolume",
                  "direction": "out",
                  "relatedStateVariable": "AutoplayVolume"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "ImportSetting",
              "argumentList": [
                {
                  "name": "SettingID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_SettingID"
                },
                {
                  "name": "SettingURI",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_SettingURI"
                }
              ]
            },
            {
              "name": "SetUseAutoplayVolume",
              "argumentList": [
                {
                  "name": "UseVolume",
                  "direction": "in",
                  "relatedStateVariable": "AutoplayUseVolume"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "GetUseAutoplayVolume",
              "argumentList": [
                {
                  "name": "UseVolume",
                  "direction": "out",
                  "relatedStateVariable": "AutoplayUseVolume"
                },
                {
                  "name": "Source",
                  "direction": "in",
                  "relatedStateVariable": "AutoplaySource"
                }
              ]
            },
            {
              "name": "AddHTSatellite",
              "argumentList": [
                {
                  "name": "HTSatChanMapSet",
                  "direction": "in",
                  "relatedStateVariable": "HTSatChanMapSet"
                }
              ]
            },
            {
              "name": "RemoveHTSatellite",
              "argumentList": [
                {
                  "name": "SatRoomUUID",
                  "direction": "in",
                  "relatedStateVariable": "SatRoomUUID"
                }
              ]
            },
            {
              "name": "EnterConfigMode",
              "argumentList": [
                {
                  "name": "Mode",
                  "direction": "in",
                  "relatedStateVariable": "ConfigMode"
                },
                {
                  "name": "Options",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_ConfigModeOptions"
                },
                {
                  "name": "State",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_ConfigModeState"
                }
              ]
            },
            {
              "name": "ExitConfigMode",
              "argumentList": [
                {
                  "name": "Options",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_ConfigModeOptions"
                }
              ]
            },
            {
              "name": "GetButtonState",
              "argumentList": [
                {
                  "name": "State",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_ButtonState"
                }
              ]
            },
            {
              "name": "SetButtonLockState",
              "argumentList": [
                {
                  "name": "DesiredButtonLockState",
                  "direction": "in",
                  "relatedStateVariable": "ButtonLockState"
                }
              ]
            },
            {
              "name": "GetButtonLockState",
              "argumentList": [
                {
                  "name": "CurrentButtonLockState",
                  "direction": "out",
                  "relatedStateVariable": "ButtonLockState"
                }
              ]
            }
          ]
        }
      },
      {
        "serviceType": "urn:schemas-upnp-org:service:SystemProperties:1",
        "serviceId": "urn:upnp-org:serviceId:SystemProperties",
        "controlUrl": "/SystemProperties/Control",
        "eventSubUrl": "/SystemProperties/Event",
        "scpdUrl": "/xml/SystemProperties1.xml",
        "scpd": {
          "specVersion": {
            "major": 1,
            "minor": 0
          },
          "serviceStateTable": [
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_VariableName",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_VariableStringValue",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountType",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountUID",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountUDN",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountID",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountPassword",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountNickname",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountCredential",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AccountMd",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_IsExpired",
              "dataType": "boolean"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_StubsCreated",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_RDMEnabled",
              "dataType": "boolean"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_OAuthDeviceID",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AuthorizationCode",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_UserIdHashCode",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_RedirectURI",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "CustomerID",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "UpdateID",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "UpdateIDX",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "VoiceUpdateID",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "ThirdPartyHash",
              "dataType": "string"
            }
          ],
          "actionList": [
            {
              "name": "SetString",
              "argumentList": [
                {
                  "name": "VariableName",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_VariableName"
                },
                {
                  "name": "StringValue",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_VariableStringValue"
                }
              ]
            },
            {
              "name": "GetString",
              "argumentList": [
                {
                  "name": "VariableName",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_VariableName"
                },
                {
                  "name": "StringValue",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_VariableStringValue"
                }
              ]
            },
            {
              "name": "Remove",
              "argumentList": [
                {
                  "name": "VariableName",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_VariableName"
                }
              ]
            },
            {
              "name": "GetWebCode",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "WebCode",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_VariableStringValue"
                }
              ]
            },
            {
              "name": "ProvisionCredentialedTrialAccountX",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "AccountID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountID"
                },
                {
                  "name": "AccountPassword",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountPassword"
                },
                {
                  "name": "IsExpired",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_IsExpired"
                },
                {
                  "name": "AccountUDN",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_AccountUDN"
                }
              ]
            },
            {
              "name": "AddAccountX",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "AccountID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountID"
                },
                {
                  "name": "AccountPassword",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountPassword"
                },
                {
                  "name": "AccountUDN",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_AccountUDN"
                }
              ]
            },
            {
              "name": "AddOAuthAccountX",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "AccountToken",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountCredential"
                },
                {
                  "name": "AccountKey",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountCredential"
                },
                {
                  "name": "OAuthDeviceID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_OAuthDeviceID"
                },
                {
                  "name": "AuthorizationCode",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AuthorizationCode"
                },
                {
                  "name": "RedirectURI",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_RedirectURI"
                },
                {
                  "name": "UserIdHashCode",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_UserIdHashCode"
                },
                {
                  "name": "AccountUDN",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_AccountUDN"
                },
                {
                  "name": "AccountNickname",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_AccountNickname"
                }
              ]
            },
            {
              "name": "RemoveAccount",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "AccountID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountID"
                }
              ]
            },
            {
              "name": "EditAccountPasswordX",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "AccountID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountID"
                },
                {
                  "name": "NewAccountPassword",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountPassword"
                }
              ]
            },
            {
              "name": "SetAccountNicknameX",
              "argumentList": [
                {
                  "name": "AccountUDN",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountUDN"
                },
                {
                  "name": "AccountNickname",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountNickname"
                }
              ]
            },
            {
              "name": "RefreshAccountCredentialsX",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "AccountUID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountUID"
                },
                {
                  "name": "AccountToken",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountCredential"
                },
                {
                  "name": "AccountKey",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountCredential"
                }
              ]
            },
            {
              "name": "EditAccountMd",
              "argumentList": [
                {
                  "name": "AccountType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountType"
                },
                {
                  "name": "AccountID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountID"
                },
                {
                  "name": "NewAccountMd",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountMd"
                }
              ]
            },
            {
              "name": "DoPostUpdateTasks"
            },
            {
              "name": "ResetThirdPartyCredentials"
            },
            {
              "name": "EnableRDM",
              "argumentList": [
                {
                  "name": "RDMValue",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_RDMEnabled"
                }
              ]
            },
            {
              "name": "GetRDM",
              "argumentList": [
                {
                  "name": "RDMValue",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_RDMEnabled"
                }
              ]
            },
            {
              "name": "ReplaceAccountX",
              "argumentList": [
                {
                  "name": "AccountUDN",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountUDN"
                },
                {
                  "name": "NewAccountID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountID"
                },
                {
                  "name": "NewAccountPassword",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountPassword"
                },
                {
                  "name": "AccountToken",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountCredential"
                },
                {
                  "name": "AccountKey",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_AccountCredential"
                },
                {
                  "name": "OAuthDeviceID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_OAuthDeviceID"
                },
                {
                  "name": "NewAccountUDN",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_AccountUDN"
                }
              ]
            }
          ]
        }
      },
      {
        "serviceType": "urn:schemas-upnp-org:service:ZoneGroupTopology:1",
        "serviceId": "urn:upnp-org:serviceId:ZoneGroupTopology",
        "controlUrl": "/ZoneGroupTopology/Control",
        "eventSubUrl": "/ZoneGroupTopology/Event",
        "scpdUrl": "/xml/ZoneGroupTopology1.xml",
        "scpd": {
          "specVersion": {
            "major": 1,
            "minor": 0
          },
          "serviceStateTable": [
            {
              "sendEvents": "yes",
              "name": "AvailableSoftwareUpdate",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ZoneGroupState",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ThirdPartyMediaServersX",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "AlarmRunSequence",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "MuseHouseholdId",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ZoneGroupName",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ZoneGroupID",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ZonePlayerUUIDsInGroup",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_UpdateType",
              "dataType": "string",
              "allowedValueList": [
                "All",
                "Software"
              ]
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_CachedOnly",
              "dataType": "boolean"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_UpdateItem",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_UpdateURL",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_UpdateFlags",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_UpdateExtraOptions",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_Version",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_MemberID",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_UnresponsiveDeviceActionType",
              "dataType": "string",
              "allowedValueList": [
                "Remove",
                "TopologyMonitorProbe",
                "VerifyThenRemoveSystemwide"
              ]
            },
            {
              "sendEvents": "no",
              "name": "DiagnosticID",
              "dataType": "ui4"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_IncludeControllers",
              "dataType": "boolean"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_Origin",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_MobileDeviceName",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_MobileDeviceUDN",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_MobileIPAndPort",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "AreasUpdateID",
              "dataType": "string"
            }
          ],
          "actionList": [
            {
              "name": "CheckForUpdate",
              "argumentList": [
                {
                  "name": "UpdateType",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_UpdateType"
                },
                {
                  "name": "CachedOnly",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_CachedOnly"
                },
                {
                  "name": "Version",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_Version"
                },
                {
                  "name": "UpdateItem",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_UpdateItem"
                }
              ]
            },
            {
              "name": "BeginSoftwareUpdate",
              "argumentList": [
                {
                  "name": "UpdateURL",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_UpdateURL"
                },
                {
                  "name": "Flags",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_UpdateFlags"
                },
                {
                  "name": "ExtraOptions",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_UpdateExtraOptions"
                }
              ]
            },
            {
              "name": "ReportUnresponsiveDevice",
              "argumentList": [
                {
                  "name": "DeviceUUID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_MemberID"
                },
                {
                  "name": "DesiredAction",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_UnresponsiveDeviceActionType"
                }
              ]
            },
            {
              "name": "ReportAlarmStartedRunning"
            },
            {
              "name": "SubmitDiagnostics",
              "argumentList": [
                {
                  "name": "DiagnosticID",
                  "direction": "out",
                  "relatedStateVariable": "DiagnosticID"
                },
                {
                  "name": "IncludeControllers",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_IncludeControllers"
                },
                {
                  "name": "Type",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_Origin"
                }
              ]
            },
            {
              "name": "RegisterMobileDevice",
              "argumentList": [
                {
                  "name": "MobileDeviceName",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_MobileDeviceName"
                },
                {
                  "name": "MobileDeviceUDN",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_MobileDeviceUDN"
                },
                {
                  "name": "MobileIPAndPort",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_MobileIPAndPort"
                }
              ]
            },
            {
              "name": "GetZoneGroupAttributes",
              "argumentList": [
                {
                  "name": "CurrentZoneGroupName",
                  "direction": "out",
                  "relatedStateVariable": "ZoneGroupName"
                },
                {
                  "name": "CurrentZoneGroupID",
                  "direction": "out",
                  "relatedStateVariable": "ZoneGroupID"
                },
                {
                  "name": "CurrentZonePlayerUUIDsInGroup",
                  "direction": "out",
                  "relatedStateVariable": "ZonePlayerUUIDsInGroup"
                },
                {
                  "name": "CurrentMuseHouseholdId",
                  "direction": "out",
                  "relatedStateVariable": "MuseHouseholdId"
                }
              ]
            },
            {
              "name": "GetZoneGroupState",
              "argumentList": [
                {
                  "name": "ZoneGroupState",
                  "direction": "out",
                  "relatedStateVariable": "ZoneGroupState"
                }
              ]
            }
          ]
        }
      },
      {
        "serviceType": "urn:schemas-upnp-org:service:GroupManagement:1",
        "serviceId": "urn:upnp-org:serviceId:GroupManagement",
        "controlUrl": "/GroupManagement/Control",
        "eventSubUrl": "/GroupManagement/Event",
        "scpdUrl": "/xml/GroupManagement1.xml",
        "scpd": {
          "specVersion": {
            "major": 1,
            "minor": 0
          },
          "serviceStateTable": [
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_MemberID",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_TransportSettings",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_AVTransportURI",
              "dataType": "string"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_BufferingResultCode",
              "dataType": "i4"
            },
            {
              "sendEvents": "no",
              "name": "A_ARG_TYPE_BootSeq",
              "dataType": "ui4"
            },
            {
              "sendEvents": "yes",
              "name": "GroupCoordinatorIsLocal",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "LocalGroupUUID",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "VirtualLineInGroupID",
              "dataType": "string"
            },
            {
              "sendEvents": "yes",
              "name": "ResetVolumeAfter",
              "dataType": "boolean"
            },
            {
              "sendEvents": "yes",
              "name": "VolumeAVTransportURI",
              "dataType": "string"
            }
          ],
          "actionList": [
            {
              "name": "AddMember",
              "argumentList": [
                {
                  "name": "MemberID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_MemberID"
                },
                {
                  "name": "BootSeq",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_BootSeq"
                },
                {
                  "name": "CurrentTransportSettings",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_TransportSettings"
                },
                {
                  "name": "CurrentURI",
                  "direction": "out",
                  "relatedStateVariable": "A_ARG_TYPE_AVTransportURI"
                },
                {
                  "name": "GroupUUIDJoined",
                  "direction": "out",
                  "relatedStateVariable": "LocalGroupUUID"
                },
                {
                  "name": "ResetVolumeAfter",
                  "direction": "out",
                  "relatedStateVariable": "ResetVolumeAfter"
                },
                {
                  "name": "VolumeAVTransportURI",
                  "direction": "out",
                  "relatedStateVariable": "VolumeAVTransportURI"
                }
              ]
            },
            {
              "name": "RemoveMember",
              "argumentList": [
                {
                  "name": "MemberID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_MemberID"
                }
              ]
            },
            {
              "name": "ReportTrackBufferingResult",
              "argumentList": [
                {
                  "name": "MemberID",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_MemberID"
                },
                {
                  "name": "ResultCode",
                  "direction": "in",
                  "relatedStateVariable": "A_ARG_TYPE_BufferingResultCode"
                }
              ]
            }
          ]
        }
      }
    ],
    "deviceList": []
  }
}

@Spy-1
Copy link

Spy-1 commented Jul 24, 2019 via email

ebaauw added a commit that referenced this issue Jul 24, 2019
Set Sonos Boost as zone master, even though it's invisible.  The role remains slave, so it's not exposed as Sonos not TV accessorory. See #88.
@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

By the looks of it, the Boost does keep track of the topology and grouping, and could be useful discovering other players. Also, the LED can also be controlled, so I might expose it when "leds" is set in config.json.

Could you try v1.0.2-0, install thru sudo npm -g i homebridge-zp@beta. zp topology should list the zone master as BOOST, but still report the zone player's role as slave. This should prevent the error, and prevent exposing the Boost as Sonos or TV accessory. It should be exposed as LED accessory, when leds is set. There might still be some error trying to set/clear the Child Lock, thought.

@mbsaeger
Copy link
Author

@ebaauw still getting the same error after updating:

[7/24/2019, 6:46:37 PM] [Sonos] found 7 zones
[7/24/2019, 6:46:37 PM] [Sonos] error: TypeError: Cannot read property 'homeTheatre' of undefined
    at ZpPlatform.logTopology (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:375:16)
    at ZpPlatform.parseZones (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:330:12)
    at ZpPlatform.handleZonePlayerZoneGroupTopologyEvent (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:362:12)
    at ZpClient.zpClient.on (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:239:18)
    at ZpClient.emit (events.js:203:15)
    at IncomingMessage.request.on (/usr/lib/node_modules/homebridge-zp/lib/ZpListener.js:99:22)
    at process._tickCallback (internal/process/next_tick.js:68:7)```

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

Bugger. Could you please try another zp topology?

@mbsaeger
Copy link
Author

mbsaeger commented Jul 24, 2019

you bet!

{
  "BOOST": {
    "master": "BOOST",
    "name": "BOOST",
    "zonePlayers": {
      "BOOST": {
        "address": "10.0.0.106",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.0.106:1400",
        "bootSeq": 189,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_B8E93700192201400",
        "lastSeen": 0,
        "modelName": "Sonos Boost",
        "modelNumber": "BR200",
        "name": "BOOST",
        "role": "slave",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "BOOST",
        "zoneName": "BOOST"
      }
    }
  },
  "Dining Room": {
    "master": "Dining Room",
    "name": "Dining Room",
    "zonePlayers": {
      "Dining Room": {
        "address": "10.0.0.107",
        "airPlay": false,
        "audioIn": true,
        "balance": true,
        "baseUrl": "http://10.0.0.107:1400",
        "bootSeq": 194,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_000E5864A58A01400",
        "lastSeen": 0,
        "modelName": "Sonos Play:5",
        "modelNumber": "S5",
        "name": "Dining Room",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Dining Room",
        "zoneName": "Dining Room"
      }
    }
  },
  "Garage": {
    "master": "Garage",
    "name": "Garage",
    "zonePlayers": {
      "Garage": {
        "address": "10.0.7.130",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.7.130:1400",
        "bootSeq": 251,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_5CAAFD20E6D601400",
        "lastSeen": 0,
        "modelName": "Sonos Play:1",
        "modelNumber": "S1",
        "name": "Garage",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Garage",
        "zoneName": "Garage"
      }
    }
  },
  "Guest Bathroom": {
    "master": "Guest Bathroom",
    "name": "Guest Bathroom",
    "zonePlayers": {
      "Guest Bathroom": {
        "address": "10.0.0.108",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.0.108:1400",
        "bootSeq": 209,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_000E58C03BEA01400",
        "lastSeen": 0,
        "modelName": "Sonos Play:1",
        "modelNumber": "S1",
        "name": "Guest Bathroom",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Guest Bathroom",
        "zoneName": "Guest Bathroom"
      }
    }
  },
  "Kitchen": {
    "master": "Kitchen",
    "name": "Kitchen",
    "zonePlayers": {
      "Kitchen": {
        "address": "10.0.0.109",
        "airPlay": false,
        "audioIn": false,
        "balance": false,
        "baseUrl": "http://10.0.0.109:1400",
        "bootSeq": 144,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_5CAAFD20E6B801400",
        "lastSeen": 0,
        "modelName": "Sonos Play:1",
        "modelNumber": "S1",
        "name": "Kitchen",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Kitchen",
        "zoneName": "Kitchen"
      }
    }
  },
  "Patio": {
    "master": "Patio",
    "name": "Patio",
    "zonePlayers": {
      "Patio": {
        "address": "10.0.7.200",
        "airPlay": true,
        "audioIn": true,
        "balance": true,
        "baseUrl": "http://10.0.7.200:1400",
        "bootSeq": 7,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_347E5C053F6D01400",
        "lastSeen": 0,
        "modelName": "Sonos Amp",
        "modelNumber": "S16",
        "name": "Patio",
        "role": "master",
        "stereoPair": false,
        "tvIn": true,
        "version": "10.3",
        "zoneDisplayName": "Patio",
        "zoneName": "Patio"
      }
    }
  },
  "Pool": {
    "master": "Pool",
    "name": "Pool",
    "zonePlayers": {
      "Pool": {
        "address": "10.0.7.186",
        "airPlay": false,
        "audioIn": true,
        "balance": true,
        "baseUrl": "http://10.0.7.186:1400",
        "bootSeq": 60,
        "channel": null,
        "homeTheatre": false,
        "id": "RINCON_949F3EB2FE5A01400",
        "lastSeen": 0,
        "modelName": "Sonos Connect",
        "modelNumber": "S15",
        "name": "Pool",
        "role": "master",
        "stereoPair": false,
        "tvIn": false,
        "version": "10.3",
        "zoneDisplayName": "Pool",
        "zoneName": "Pool"
      }
    }
  }
}```

@ebaauw ebaauw added the bug label Jul 24, 2019
ebaauw added a commit that referenced this issue Jul 24, 2019
Set master of Boost zone to Boost, see #88.
@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

Could you try v1.0.2-1? That should also handle the absence of physical buttons.

@ebaauw ebaauw changed the title Cannot read property 'homeTheatre' of undefined Sonos Boost: Cannot read property 'homeTheatre' of undefined Jul 24, 2019
@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

Unrelated: how many speaker pairs do you have connected to your Sonos Amp? If more than one: how do you control these? Do they share the input source, play/pause? The volume, mute, loudness, equaliser settings?

@mbsaeger
Copy link
Author

I've only got one speaker pair connected, but you can connect up to three speaker pairs. They all are treated as one zone, same source, volume, mute, loudness, etc.

@mbsaeger
Copy link
Author

mbsaeger commented Jul 24, 2019

@ebaauw it runs without error now! New issue; thinking the BOOST needs to be a slave or invisible as when I try to play/pause/volume it immediately reverts to off. Thinking its sending the request to the boost instead of the speaker perhaps?

[7/24/2019, 7:54:38 PM] [Sonos] Dining Room Sonos: On changed from false to true
[7/24/2019, 7:54:39 PM] [Sonos] Dining Room Sonos: set On from true to false

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

I've only got one speaker pair connected, but you can connect up to three speaker pairs. They all are treated as one zone, same source, volume, mute, loudness, etc.

Ah, ok. No special handling needed, then.

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

the BOOST needs to be a slave or invisible

Is the BOOST exposed as Sonos accessory? What does homebridge-zp log for found zones and zoneplayers?

Thinking its sending the request to the boost instead of the speaker perhaps?

The request should be sent to the coordinator of the group that the zone player is in. I doubt the Boost can be a coordinator. Does the Sonos app show the Dining Room Sonos in any group? What group does the Eve app show for it?

when I try to play/pause/volume it immediately reverts to off

Immediately as in half a second? This could happen when there's no input selected. What Track is displayed in the Eve app? If you start play from the Sonos app, can you then pause/stop from HomeKit. And then play (because now there's an input?).

Immediately as in 1-2 seconds? Sometimes this might happen when the zone player takes some time to buffer the audio source. It sends multiple events in succession for connecting..., buffering..., playing. In this case, it should switch to on automatically when playing starts. If you run homebridge -D you get a debug messsage for each event.

@mbsaeger
Copy link
Author

Not sure what the BOOST is or should be exposed as - essentially its the newer version of the Sonos Bridge. It has no real controls and isn't considered the "master" for any of the speakers based on zpinfo, each speaker shows as its own 'Master'.

Somehow every speaker was ungrouped and all tracks cleared (maybe there was a power outage I missed) but once queue-ing up some tracks in all zones I'm able to get it working again! I am specifying the "exclude airplay" flag and my AirPlay zone is showing up - but that could be due to an accessory cache or something.

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

I am specifying the "exclude airplay" flag and my AirPlay zone is showing up - but that could be due to an accessory cache or something.

Yes, I still need to implement the removal of accessories.

The accessories are cached in ~/.homebridge/accessories/cachedAccessories. This is a regular json file and can be edited when homebridge has exited. Not for the faint-hearted, though, and be sure to double-check it before restarting homebridge.

If you run homebridge -R without loading homebridge-zp, it will remove the stale accessories. Specify the "plugins" key in config.json and don't list homebridge-zp, or uninstall homebridge-zp to prevent homebridge from loading it.

As last resort, you can simply remove the file (when homebridge is not running) and restart homebridge. You will lose all cached accessories by all dynamic platform plugins. They will likely be re-created by their respective plugins, but HomeKit will treat them as new accessories, and you'll lose any HomeKit room, scene, automations, etc assignments.

maybe there was a power outage I missed

You can check bootSeq in zp info or zp topology - it increases each time a zone player is restarted. Homebridge-zp should detect zone player reboots and re-establish its subscriptions.

@mbsaeger
Copy link
Author

Perfect - that did it! Thank you very much.. Think we can safely close this issue now 👍

@ebaauw
Copy link
Owner

ebaauw commented Jul 24, 2019

Cool. v1.0.2 is out.

@ebaauw
Copy link
Owner

ebaauw commented Jul 26, 2019

I am specifying the "exclude airplay" flag and my AirPlay zone is showing up

That's an omission on my part alright, see #92.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants