Hej.
I vissa automationsappar där man kan lägga in SONOS, kan man välja att starta en SONOS-spellista om t.ex. en rörelsesensor blir triggad.
Är detta möjligt med Krikroffs SONOS VD/QuickApp? Eller går det att lösa på något sätt?
Krikroffs SONOS VD/QuickApp - starta spellista?
Lite osäker om spellista - det går att spela filer eller streams eller göra en restart på kön.
Sonos ZC 1.3.1
-------------------------------------------------------------------------------------------
-- Actions available
-------------------------------------------------------------------------------------------
-- Restart the QA Device
-- EX:
--fibaro.call(1673, "restart")
-- Set device debug state
--fibaro.call(1673, "setDebug", true)
-- Set device debug state level
-- EX:
--fibaro.call(1673, "setDebugLevel", "trace")
-- Initiate playback.
-- EX:
--fibaro.call(1673, "play")
-- Toogle playback.
-- EX:
--fibaro.call(1673, "togglePlay")
-- Pause playback
-- EX:
--fibaro.call(1673, "pause")
-- Stop playback.
-- EX:
--fibaro.call(1673, "stop")
-- Skip to the previous track.
-- EX:
--fibaro.call(1673, "previous")
-- Skip to the next track.
-- EX:
--fibaro.call(1673, "next")
-- Get player volume and mute state.
-- EX:
--fibaro.call(1673, "getVolume")
-- Set player volume to a specific level and unmute the player if muted.
--fibaro.call(1673, "setVolume", 10, "MASTER")
-- Increase or decrease player volume.
-- EX:
--fibaro.call(1673, "setRelativeVolume", -5, "MASTER")
-- Mute or unmute the player.
-- EX:
--fibaro.call(1673, "setMute", true)
-- Get player mute state
-- EX:
--fibaro.call(1673, "getMute")
-- Toogle player mute state
-- EX:
--fibaro.call(1673, "toggleMute")
-- Get player loudness state
-- EX:
--fibaro.call(1673, "getLoudness")
-- Set player loudness state
--fibaro.call(1673, "setLoudness", true)
-- Toogle player loudness state
-- EX:
--fibaro.call(1673, "toggleLoudness")
-- Get group LED state
-- EX:
--fibaro.call(1673, "getLEDState")
-- Set group LED state
-- EX:
--fibaro.call(1673, "setLEDState", true)
-- Set and load desired radio station (by index) and initiate playback.
-- EX:
--fibaro.call(1673, "playRadio", 1)
-- Set and load desired playlist (from saved queues) by index and initiate playback
-- EX:
--fibaro.call(1673, "playSavedQueue", 1)
-- Make a snapshot
-- EX:
--fibaro.call(1673, "snapshot")
-- Revert to latest snapshot if available
-- EX:
--fibaro.call(1673, "revert")
-- Play a file available on local network and registrered in SONOS music library
-- @param string path
-- @param string restore [boolean:true(default)|false] makes a snapshot before and restore after has played the file
-- @param number volume : the volume
-- EX:
--fibaro.call(1673, "playFile", "WIN-35HTGV34R7S/Musique/CD/Dream Theater/A Change of Seasons/01-A Change of Seasons [Medley].flac")
--fibaro.call(1673, "playFile", "192.168.1.200/Musique/TTS/Google parle aussi en Français.mp3", true, 10)
-- Play a stream from uri (ressource or internet radio for example)
-- @param string uri : the uri
-- @param boolean restore [true(default)|false] makes a snapshot before and restore after has played the file
-- @param number volume : the volume
-- @param number duration : the duration in milliseconds
-- EX:
--fibaro.call(1673, "playStream", "http://listen.radionomy.com/fuzzy-and-groovy.m3u", true, nil, 5000)
--fibaro.call(1673, "playStream", "https://s3.amazonaws.com/smartapp-media/sonos/bell1.mp3", true, 10, 8000)
-- Try to remove all tracks from queue
-- EX:
--fibaro.call(1673, "clearQueue")
-- Try to start current queue
-- EX:
--fibaro.call(1673, "startQueue")
-- Add URI to current queue
-- EX:
--fibaro.call(1673, "addURIToQueue", "file:///jffs/settings/savedqueues.rsq#1")
-- Get current trable value
-- EX:
--fibaro.call(1673, "getTreble")
-- Set desired trable value
-- EX:
--fibaro.call(1673, "setTreble", 0)
-- Get current value
-- EX:
--fibaro.call(1673, "getBass")
-- Set desired bass value
-- EX:
--fibaro.call(1673, "setBass", 0)
-- Seeks to a given position (HH:MM:SS or H:MM:SS) in the current track or track number x
-- @param string type 'REL_TIME' for time position (xx:xx:xx) or 'TRACK_NR' for track in current queue
-- @param string position 'xx:xx:xx' or track number x
-- EX:
--fibaro.call(1673, "seek", {type = "TRACK_NR", position = 1})
------------------------------------------------------------------------------------------
Sonos ZC 1.3.1
-------------------------------------------------------------------------------------------
-- Actions available
-------------------------------------------------------------------------------------------
-- Restart the QA Device
-- EX:
--fibaro.call(1673, "restart")
-- Set device debug state
--fibaro.call(1673, "setDebug", true)
-- Set device debug state level
-- EX:
--fibaro.call(1673, "setDebugLevel", "trace")
-- Initiate playback.
-- EX:
--fibaro.call(1673, "play")
-- Toogle playback.
-- EX:
--fibaro.call(1673, "togglePlay")
-- Pause playback
-- EX:
--fibaro.call(1673, "pause")
-- Stop playback.
-- EX:
--fibaro.call(1673, "stop")
-- Skip to the previous track.
-- EX:
--fibaro.call(1673, "previous")
-- Skip to the next track.
-- EX:
--fibaro.call(1673, "next")
-- Get player volume and mute state.
-- EX:
--fibaro.call(1673, "getVolume")
-- Set player volume to a specific level and unmute the player if muted.
--fibaro.call(1673, "setVolume", 10, "MASTER")
-- Increase or decrease player volume.
-- EX:
--fibaro.call(1673, "setRelativeVolume", -5, "MASTER")
-- Mute or unmute the player.
-- EX:
--fibaro.call(1673, "setMute", true)
-- Get player mute state
-- EX:
--fibaro.call(1673, "getMute")
-- Toogle player mute state
-- EX:
--fibaro.call(1673, "toggleMute")
-- Get player loudness state
-- EX:
--fibaro.call(1673, "getLoudness")
-- Set player loudness state
--fibaro.call(1673, "setLoudness", true)
-- Toogle player loudness state
-- EX:
--fibaro.call(1673, "toggleLoudness")
-- Get group LED state
-- EX:
--fibaro.call(1673, "getLEDState")
-- Set group LED state
-- EX:
--fibaro.call(1673, "setLEDState", true)
-- Set and load desired radio station (by index) and initiate playback.
-- EX:
--fibaro.call(1673, "playRadio", 1)
-- Set and load desired playlist (from saved queues) by index and initiate playback
-- EX:
--fibaro.call(1673, "playSavedQueue", 1)
-- Make a snapshot
-- EX:
--fibaro.call(1673, "snapshot")
-- Revert to latest snapshot if available
-- EX:
--fibaro.call(1673, "revert")
-- Play a file available on local network and registrered in SONOS music library
-- @param string path
-- @param string restore [boolean:true(default)|false] makes a snapshot before and restore after has played the file
-- @param number volume : the volume
-- EX:
--fibaro.call(1673, "playFile", "WIN-35HTGV34R7S/Musique/CD/Dream Theater/A Change of Seasons/01-A Change of Seasons [Medley].flac")
--fibaro.call(1673, "playFile", "192.168.1.200/Musique/TTS/Google parle aussi en Français.mp3", true, 10)
-- Play a stream from uri (ressource or internet radio for example)
-- @param string uri : the uri
-- @param boolean restore [true(default)|false] makes a snapshot before and restore after has played the file
-- @param number volume : the volume
-- @param number duration : the duration in milliseconds
-- EX:
--fibaro.call(1673, "playStream", "http://listen.radionomy.com/fuzzy-and-groovy.m3u", true, nil, 5000)
--fibaro.call(1673, "playStream", "https://s3.amazonaws.com/smartapp-media/sonos/bell1.mp3", true, 10, 8000)
-- Try to remove all tracks from queue
-- EX:
--fibaro.call(1673, "clearQueue")
-- Try to start current queue
-- EX:
--fibaro.call(1673, "startQueue")
-- Add URI to current queue
-- EX:
--fibaro.call(1673, "addURIToQueue", "file:///jffs/settings/savedqueues.rsq#1")
-- Get current trable value
-- EX:
--fibaro.call(1673, "getTreble")
-- Set desired trable value
-- EX:
--fibaro.call(1673, "setTreble", 0)
-- Get current value
-- EX:
--fibaro.call(1673, "getBass")
-- Set desired bass value
-- EX:
--fibaro.call(1673, "setBass", 0)
-- Seeks to a given position (HH:MM:SS or H:MM:SS) in the current track or track number x
-- @param string type 'REL_TIME' for time position (xx:xx:xx) or 'TRACK_NR' for track in current queue
-- @param string position 'xx:xx:xx' or track number x
-- EX:
--fibaro.call(1673, "seek", {type = "TRACK_NR", position = 1})
------------------------------------------------------------------------------------------
-
- Site Admin
- Posts: 276
- Joined: 10 Dec 2011, 11:43
- 12
Problemet är om kön blivit tömd eller ersatt för att barnen vill lyssna på Crazy Frog el. liknande....
Kliver man sen själv in i badrummet så får man lyssna på Crazy Frog tills man ersätter kön på nytt.
I och med att lösningen finns i andra appar (Aqara t.ex.) så borde det ju rent teoretiskt gå att lösa
Kliver man sen själv in i badrummet så får man lyssna på Crazy Frog tills man ersätter kön på nytt.
I och med att lösningen finns i andra appar (Aqara t.ex.) så borde det ju rent teoretiskt gå att lösa
Man ska kunna tilldela radio och sparade köer på knapparna längst ner i gränssnittet och sedan spela dessa.
Sedan är jag tyvärr ingen stor användare av Sonos så jag vet inte hur man sparar köer eller tilldelar radiokanaler...
Code: Select all
-----
-- Set and load desired radio station (by index) and initiate playback.
-- EX:
--fibaro.call(1673, "playRadio", 1)
-- Set and load desired playlist (from saved queues) by index and initiate playback
-- EX:
--fibaro.call(1673, "playSavedQueue", 1)
-
- Site Admin
- Posts: 276
- Joined: 10 Dec 2011, 11:43
- 12
Hmm OK, det kan stämma.
Hur skriver man det i EventRunner 4?
Ovan fungerade inte
EDIT: detta funkade
Hur skriver man det i EventRunner 4?
Code: Select all
rule("motions:breached => SONOS, "playSavedQueue", 1")
EDIT: detta funkade
Code: Select all
rule("motions:breached => fibaro.call(SONOS, 'playSavedQueue', 1)")
-
- Site Admin
- Posts: 276
- Joined: 10 Dec 2011, 11:43
- 12
Med denna version av Eventrunner ( version:v0.5fix46 (QA toolbox 0.24) och 1.3.8 av Krikroffs Sonos QA så fungerar inte följande:
--- badrum nere ---
rule("badrum.sensor:breached & 06:00..22:00 => badrum.lamp:value=99")
rule("badrum.sensor:breached & 06:00..22:00 => fibaro.call(badrum.SONOS,'play')")
Den tänder lampan, och skickar PLAY till SONOS, men SONOS startar inte.
DÄREMOT -- om jag gör en rule som bara är styrd av tid, typ:
rule("@05:31 => fibaro.call(badrum.SONOS, 'play')")
Så fungerar det.... Varför?
--- badrum nere ---
rule("badrum.sensor:breached & 06:00..22:00 => badrum.lamp:value=99")
rule("badrum.sensor:breached & 06:00..22:00 => fibaro.call(badrum.SONOS,'play')")
Den tänder lampan, och skickar PLAY till SONOS, men SONOS startar inte.
DÄREMOT -- om jag gör en rule som bara är styrd av tid, typ:
rule("@05:31 => fibaro.call(badrum.SONOS, 'play')")
Så fungerar det.... Varför?
-
- Site Admin
- Posts: 276
- Joined: 10 Dec 2011, 11:43
- 12
Hmm - ibland fungerar det, ibland inte. Verkar vara lite delay på knapptryck för sonos...
Verkar underligt. Speciellt varför det fungerar i det andra fallet.forumadmin wrote: ↑11 Feb 2021, 12:34 Med denna version av Eventrunner ( version:v0.5fix46 (QA toolbox 0.24) och 1.3.8 av Krikroffs Sonos QA så fungerar inte följande:
--- badrum nere ---
rule("badrum.sensor:breached & 06:00..22:00 => badrum.lamp:value=99")
rule("badrum.sensor:breached & 06:00..22:00 => fibaro.call(badrum.SONOS,'play')")
Den tänder lampan, och skickar PLAY till SONOS, men SONOS startar inte.
DÄREMOT -- om jag gör en rule som bara är styrd av tid, typ:
rule("@05:31 => fibaro.call(badrum.SONOS, 'play')")
Så fungerar det.... Varför?
Fungerar
rule("badrum.sensor:breached => fibaro.call(badrum.SONOS,'play')")