28.05.2020, 11:11
(This post was last modified: 28.05.2020, 11:16 by Trond Hoyem.)
(28.05.2020, 11:05)Erwin van der Zwart Wrote: Hi,Hi
Okay, yes then you use another sonos.lp then i did, it's correct we changed this in a later stage to Sonos : Players
I don't understand why you get a error from /www/user/sonos.lua as this file is not needed, did you make a reference to this file or something?
The only file you need on the FTP is sonos.lp, can you try to delete the reference and the LUA file from the user folder?
BR,
Erwin
The only code I have is this:
Code:
require('socket.http')
socket.http.timeout = 5
socket.http.request('http://127.0.0.1/user/sonos.lp?action=getsonosdata')
--socket.http.request('http://127.0.0.1/user/sonos.lp?action=refreshsonosdata')
log(storage.get('Sonos:Players'))
PlayerID = 'RINCON_347E5C3B47D801400' --Kontor
--PlayerID = 'RINCON_347E5C35715E01400' --Stue
audiofile = socket.url.escape('http://192.168.39.10/user/Ringeklokke.mp3')
reply = socket.http.request('http://admin:PASS@127.0.0.1/user/sonos.lp?action=say&uuid=' .. PlayerID .. '&audiofile=' .. audiofile .. '&volume=10&duration=10')
log(reply)
I do not know where I might have a link to sonos.lua. I tried to delete the sonos.lua, and run the script; same error message.
(28.05.2020, 11:10)admin Wrote: /www/user/sonos.lua is used by sonos.lp, removing it won't help. Have you tried using ip instead of player uuid?Same result...
Code:ip = '1.2.3.4' -- change this
reply = socket.http.request('http://admin:PASSWORD@127.0.0.1/user/sonos.lp?action=say&ip=' .. ip .. '&audiofile=' .. audiofile .. '&volume=10&duration=10')
There are 10 kinds of people in the world; those who can read binary and those who don't