25.06.2021, 13:49
Here's a sample event script for volume control (0..100%). Change IP as needed:
You can implement other controls the same way just check the documentation on which URL path and parameters must be used. If you have a player with several nodes in one then use port 11010 for zone 2 instead of 11000. Status retrieval can be done via a resident script but it's more complicated. See if control works for you first.
Code:
volume = event.getvalue()
ip = '192.168.1.100'
url = 'http://' .. ip .. ':11000/Volume?level=' .. volume .. '&tell_slaves=1'
res, err = require('socket.http').request(url)
log(res, err)
You can implement other controls the same way just check the documentation on which URL path and parameters must be used. If you have a player with several nodes in one then use port 11010 for zone 2 instead of 11000. Status retrieval can be done via a resident script but it's more complicated. See if control works for you first.