06.04.2018, 06:37
You must escape the audio file parameter:
Code:
require('socket.url')
require('socket.http')
file = socket.url.escape('http://admin:sonos123@192.168.1.50/user/Meditation-bell-sound.mp3')
socket.http.TIMEOUT = 5
reply = socket.http.request('http://admin:sonos123@127.0.0.1/apps/data/sonos/sonos.lp?action=say&ip=192.168.1.6&audiofile=' .. file .. '&volume=50&duration=10')
log(reply)