This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SONOS
#7
It probably does not work because you have password enabled for apps. Create user with login sonos and password sonos123

Then create an event script mapped to 1-byte scale object:

Code:
Sonos_Player_IP = '192.168.1.7'
value = event.getvalue() -- 0 to 100 so set object to scale

http = require('socket.http')
http.TIMEOUT = 5
reply = http.request('http://sonos:sonos123@127.0.0.1/apps/data/sonos/sonos.lp?action=setvolume&ip=' .. Sonos_Player_IP .. '&volume=' .. value)

If this still does not work, add this at the end of the script and post what you get in Logs tab:
Code:
log(reply)
Reply


Messages In This Thread
SONOS - by balatis - 23.03.2018, 14:37
RE: SONOS - by balatis - 26.03.2018, 13:45
RE: SONOS - by Erwin van der Zwart - 26.03.2018, 17:20
RE: SONOS - by balatis - 26.03.2018, 19:12
RE: SONOS - by Erwin van der Zwart - 26.03.2018, 21:36
RE: SONOS - by balatis - 27.03.2018, 10:22
RE: SONOS - by admin - 27.03.2018, 11:30
RE: SONOS - by Erwin van der Zwart - 27.03.2018, 11:35
RE: SONOS - by balatis - 27.03.2018, 12:01
RE: SONOS - by admin - 27.03.2018, 12:14
RE: SONOS - by balatis - 27.03.2018, 12:18
RE: SONOS - by admin - 27.03.2018, 12:21
RE: SONOS - by balatis - 27.03.2018, 12:27
RE: SONOS - by admin - 27.03.2018, 12:37
RE: SONOS - by balatis - 27.03.2018, 12:44
RE: SONOS - by admin - 27.03.2018, 13:03
RE: SONOS - by Daniel - 27.03.2018, 13:06
RE: SONOS - by Erwin van der Zwart - 27.03.2018, 13:24
RE: SONOS - by thomasoppida - 15.04.2018, 21:15
RE: SONOS - by Erwin van der Zwart - 16.04.2018, 04:04
RE: SONOS - by thomasoppida - 16.04.2018, 06:32
RE: SONOS - by balatis - 27.03.2018, 13:14

Forum Jump: