Skip to content

driskell/homebridge-sonos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sonos Platform

Example config.json:

{
  "platform": "Sonos",
  "suffix": " Speakers",
  "port": 50200,
  "spotify_rincon_id": "2311",
  "scenes": {
      "Piano Collection": {
          "playlist": "spotify:user:12345678:playlist:XXXXXXXXXXXXXXXXXXXXXX",
          "zones": ["Lounge"],
          "volume": {
            "Lounge": 10
          },
          "sleepTimer": "2:00:00"
      },
      "Party Music": {
          "playlist": "spotify:user:username:playlist:XXXXXXXXXXXXXXXXXXXXXX",
          "zones": ["Lounge", "Kitchen", "Hallway"]
      }
  }
}

The suffix parameter is optional and the default is shown above. In HomeKit your devices will given a name formed from their zone followed by the suffix. For example, a Sonos device in zone "Lounge" will be named "Lounge Speakers".

The port parameter is also optional. It specifies the port to listen on for device discovery and communication. It uses both UDP and TCP so open this port on your firewall for both.

The spotify_rincon_id is optional and defaults to "2311". It is not clear what this value means but it is related to Spotify regions. In the UK (and possibly the EU) the default of "2311" is fine. US citizens will need to set this to "3079" for the playlists to work.

Adding scenes is also optional. Each entry inside it is the name of a switch to create that will set a Sonos "scene". This includes forming a group, setting a Spotify playlist, enabling shuffle, and optionally setting the volumes for each zone and a sleep timer. The sleep timer configuration must be in the format H:MM:SS. The playlist can also be set to "audoinput:zone", where zone is the name of a Play 5 zone which has a Audio Component Line In.)

NOTE: The scenes functionality only works for Spotify at this time.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%