jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.84k stars 463 forks source link

Start Clip from preset #738

Closed DeepHyperspace closed 4 years ago

DeepHyperspace commented 4 years ago

Hi guys,

is it possible to start a clip from a json-preset? Like:

{
  "players": [
    { "roomName": "Schlafzimmer", "volume": 80},
    {"roomName": "Küche", "volume": 80}
  ],
  {"command":"clip" , "uri": "alarm.mp3"}
}

i think this is wrong, but i dont find a example in the documentation.

jishi commented 4 years ago

There is no clip support for presets since it wasn't really the use case for a preset. You can use a preset without any action and a paused state, followed by a clip command, or you can provide a preset with the clip command if you only want to use the grouping/volume, using the clippreset action. the documentation is sparse on it, but you can look at https://github.com/jishi/node-sonos-http-api/issues/426#issuecomment-337385754 for reference.