Sep 26, 2020
Sep 26, 2020
Sep 29, 2020
Sonos Player v0.1 (c) tinman
This QA provides all the simple functionality one might need to simply play something without any overhead of things that might be not necessary for lot of situations.
The idea behind : keep it simple!
IPAddress -> the IP of your Sonos (master if any) speaker
interval-volume -> refresh time for volume slider (and "volume" property). If you don't need to watch volume update set to 0 (value in second)
interval-status -> refresh time for "state" property (see below). If you don't need the status, set it to 0 (value in seconds)
HOW TO USE:
This QA shows up in block scene with "play", "stop", "pause", "next", "prev", "mute" and "setVolume" functionality. You might use them of course from LUA as well.
Additionally to these you might call below function (LUA only) to play from URI or CFIS like:
play from radio source:
play from http source:
play from network share source:
fibaro.call(SonosQAID, "playFromCIFS","192.168.199.33/2Pac/Me and My Girlfriend.mp3")
You can get the current player status (PLAYING, STOPPED, PAUSED_PLAYBACK, TRANSITIONING) from your LUA code, to get some more control, like "when playing do stop", or e.g. when "TRANSITIONING" after "PLAYING" change source (e.g. ding dong played once, than radio/cifs stream)
You can get the current URI (to play it later, e.g. after ding-dong.mp3) with code below. I decided to not update it automatically, to save resources. When you need it, call it:
fibaro.sleep(1000) -- if necessary
You can even trigger in LUA scenes based on Sonos state, to e.g. turn party light on when Sonos is playing like this (1234 is the Sonos QA id)
For comments and questions visit:
Oder hier: https://intuitech.de/intuitech-forum/topic/sonos-player-quick-app/
Btw, if you need much more advanced Sonos Zone Controller, check