Skip to content

D. Development

H. Klages edited this page Apr 15, 2024 · 9 revisions

Player Addressing

Player may be identified by

  • SONOS-Playername (aka room, zone) - you can edit it in the SONOS-App

  • ipv4 address (DNS names are rejected by SONOS) - you can define in your local network (static address)

  • serial number (build from mac address).

  • mac address

  • UUID (build from mac address and port with leading 0): RINCON_${macAddressDigitsOnly}0${port}

  • the config name (which points to IP address or serial number)

See a list of all players and there data in section Examples!

baseUrl is is http://${ipaddress}:${port} such as "http://192.168.178.51:1400" Caution: for direct access SONOS rejects DNS names - it needs the pure ipv4 address!

TransportURI

player.play.streamhttp - node-sonos: setAVTransportURI

Type TransportURI prefix

joiner

x-rincon:${UUID of coordinator}

SONOS-Queue

x-rincon-queue:${UUID}=0

SONOS-Playlist

file:///jffs/settings/savedqueues.rsq=

TV

x-sonos-htastream:${UUID}:spdif

Line in

x-rincon-stream:${UUID}

Music-Library

x-file-cifs:*

Music-Library Album

x-rincon-playlist:${UUID}=A:ALBUM*

stream, Amazon station

x-sonosapi-radio:*

stream, TuneIn

x-sonosapi-stream:*

stream

x-rincon-mp3radio:*

stream (app)

x-sonos-vli:*

Spotify

x-sonos-spotify:spotify*

Napster

x-sonos-http:ondemand*

Napster playlist

x-rincon-cpcontainer:*

Amazon album/playlist

x-rincon-cpcontainer:*

Spotify album/playlist

x-rincon-cpcontainer:*

Amazon track

x-sonosapi-hls-static:*

TV and line are only available on specific player.

  • Amazon x-sonosapi-radio:catalog%2fstations%2%2f%23chunk-?sid=201&flags=8300&sn=14

  • Internet x-rincon-mp3radio://http://www.fritz.de/live.m3u

Caution: Part of the amazon string is masked with *.

More radio stations (are here) - you must add the x-rincon-mp3radio

CurrentURI is of type TransportURI

STREAMS: Play a Radio Station

Using "My Sonos" / "Universal". Works for TuneIn, AmazonPrime, Apple, Deezer, Napster, …​

TuneIn id

Universal group.play.tunein

TuneIn Radio id is a string with leading digits e. g. s24896.

Since 2022 the radio id is not anymore part of the SONOS DIDL metadata / uri. Therefore you have to visit the TuneIn web page, play the station and extract the radio id from the url.

SONOS-Queue: Insert a playlist, album, song and activate/play

Insert Playlist

Using "My Sonos" - export.item and "Univeral" nodes play.export are the recommended ways to insert songs into the SONOS-Queue.

Music-Library and SONOS-Playlist can be inserted without adding them to My Sonos.

library.export.playlist

x-file-cifs://nas2019/Multimedia/Music/MyMusic/Playlists/ML10CC.wpl

SONOS-Playlist

file:///jffs/settings/savedqueues.rsq=8

Insert a Song/Album into SONOS-Queue

Music Library

  • song x-file-cifs://nas2019/Multimedia/Music/MyMusic/Rihanna/Diamonds/Rihanna%20-%20Diamonds.mp3

  • album x-rincon-playlist:RINCON_000E58FE3AEA01400=A:ALBUM/Diamond%20Life

Activate SONOS-Queue(must not be empty) and play first song

node-sonos: selectQueue (→ setAVTransportURI with x-rincon-queue:RINCON_5CAAFD00223601400=0)

Further information

node-sonos:

  • setAVTransportURI uses avTransportService().SetAVTransportURI with generated metadata

  • queue uses uses avTransportService().AddURIToQueue with generated metadata

6. Components (Free style :-)

Components