Cant set/get volume through HTTP requests

Hi,

I am trying to set/get the SONOS Volume through HTTP requests but I cant get it to work.

http://xxxxx:3480/data_request?id=variableget&DeviceNum=153&serviceId=urn:sonos-com:serviceId:Sonos1&Variable=Volume

I have also tried

http://xxxxx:3480/data_request?id=variableget&DeviceNum=153&serviceId=urn:micasaverde-com:serviceId:Sonos1&Variable=Volume

What am I doing wrong?

The correct id for get and set are “lu_variableget” and “lu_variableset”… for set, append “&Value=yyyy” to the url…

You can use the “lu_invoke” command to verify the urns, actions and variables for your devices:

http://xx.xx.xx.xx:3480/data_request?id=lu_invoke&DeviceNum=153

Thank you!

This seems to work:

To get current the volume

http://xxxxx:3480/data_request?id=lu_variableget&DeviceNum=153&serviceId=urn:upnp-org:serviceId:RenderingControl&Variable=Volume

To set the volume

http://xxxxx:3480/data_request?id=action&DeviceNum=153&serviceId=urn:upnp-org:serviceId:RenderingControl&action=SetVolume&InstanceID=&Channel=&DesiredVolume=7

And how with lua script?