sonos script on homeLynk - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: sonos script on homeLynk (/showthread.php?tid=863) |
sonos script on homeLynk - stevesu - 22.06.2017 hello, i'am trying to get the sonos script ,i found on the forum, to simulate a doorbell. when i give the value's to the groupadress manually ( value = 1 " for stopping the current player", value =20 "adding playlist", value = 30 "playing from queue" , value = 19 "clearing current queue") and even getting in it sequence a part of it, but only the stopping of the player gives me a error. this is a piece of the script i used and partly modified Code: -- Action on object value 20 if someone could look into it an d give me hand with it ... greatings steven RE: sonos script on homeLynk - Erwin van der Zwart - 22.06.2017 Hi, The easiest way to control your Sonos is to install the Sonos app from the appstore, even if you don't plan to use the app you can use the API that is build in to control your Sonos devices, by installing the app you automaticly have access to that API. Look into this thread to see all possible commands to the Sonos App API: https://forum.logicmachine.net/showthread.php?tid=415 BR, Erwin RE: sonos script on homeLynk - stevesu - 23.06.2017 hi Erwin, thanks for the reply. I thought the app store was exclusive for LM because i didn't found him, but after looking around i found it . thank you so much !!!! RE: sonos script on homeLynk - stevesu - 06.07.2017 hi Erwin, i installed the sonos app but still i'am struggling with the doorbell function. i uploaded the sound file to the homelynk ftp/user, and its there i cheked it, but when i execute the script the player stops playing the current radio station and in the sonos app the file name witch i uploaded gets loaded in the player but it wound play , when i hit the play button i'am getting the message "can't play <soundfile>, becuase server can't be reached". local reply = socket.http.request('http://admin:put7856@192.168.0.203/apps/data/sonos/sonos.lp?action=say&name=Keuken&audiofile=ftp://apps:apps@192.168.0.203/user/there_is_someone_at_the_door.mp3&volume=30&duration=5') i'am using firmware 2.0.1 i hope you can help me out . greatings steven RE: sonos script on homeLynk - admin - 06.07.2017 You need to escape the audiofile parameter and it's better to use http to access files in user folder: Code: require('socket.url') |