Routines, presets and zone parameters can be controlled by sending simple http requests to the Zone unit. The unit will reply with a simple JSON message to confirm receipt or the requested parameter.
This is useful for 3rd party control and can be scripted to configure the Zone to a known state.
Routines
A routine is recalled by sending the following http url:
http://<ip address>/api/routines/recall?id=<routine_id>
The id of the routine to be triggered can be found when editing it in WebApp:
The zone unit responds as follows:
{"routine": 50}
If the id is missing, the following message will be returned:
{"error": "Missing 'id' parameter"}
Presets
A preset is recalled by sending the following http url:
http://<ip address>/api/presets/recall?id=<routine_id>&zone=<zone>
The preset id can be found by pressing Edit, then Rename:
For presets stored for level and source controls in a zone, the zone parameter is ignored as these can only be recalled to the zone they were stored in.
The zone unit responds as follows. Please note there is currently no error reporting for invalid presets or zone ids, the message is ignored.
{"preset": 1000, "zone": 1}
If the id is missing, the following message will be returned:
{"error": "Missing 'id' parameter"}
For system settings presets, these can be recalled to different zones where the audio object and parameters are the same - the definition of "zone" is a bit wider here and applies to input sources, line outputs and amp outputs. For example a preset stored on one output channel can be recalled to a different channel by changing the zone.
Valid zone ids are as follows:
Zone_LOCAL = 0,
Actual zones "User Zones"
ZONE_1 = 1,
ZONE_2 = 2,
ZONE_3 = 3,
ZONE_4 = 4,
ZONE_5 = 5,
ZONE_6 = 6,
ZONE_7 = 7,
ZONE_8 = 8,
Input sources
LINE_IN_1 = 9,
LINE_IN_2 = 10,
LINE_IN_3 = 11,
LINE_IN_4 = 12,
HDMI_1 = 13,
HDMI_2 = 14,
LOCAL_MIC_1 = 15,
LOCAL_MIC_2 = 16,
PAGING_MIC_1 = 17,
PAGING_MIC_2 = 18,
Outputs
OUTPUT_1 = 19,
OUTPUT_2 = 20,
OUTPUT_3 = 21,
OUTPUT_4 = 22,
OUTPUT_5 = 23,
OUTPUT_6 = 24,
OUTPUT_7 = 25,
OUTPUT_8 = 26,
Parameter set
A parameter can be set by sending the following http url:
http://<ip address>/api/set?zone=<zone_id>&musiclevel=30
The zone unit responds as follows. Please note there is currently no error reporting for invalid zones, parameters or sources, the message is ignored.
{"zone": 1, "parameter": "musiclevel", "value": 30}
If any of the parameters are missinf, the unit responds with:
{"error": "Missing parameters"}
Valid parameters are:
musiclevel
miclevel
sysmic1level
sysmic2level
source
the range of levels is in percentage from 0 to 100.
valid source ids are as follows:
LOCAL_Input = 1,
LINE_IN_1 = 2,
LINE_IN_2 = 3,
LINE_IN_3 = 4,
LINE_IN_4 = 5,
HDMI_1 = 6,
HDMI_2 = 7
Parameter get
A parameter can be retrieved from the unit by sending the following http url:
http://<ip address>/api/get?zone=<zone_id>&musiclevel
The zone unit responds as follows. Please note there is currently no error reporting for invalid zones, parameters or sources, the message is ignored.
{"zone": 1, "parameter": "musiclevel", "value": 30}
If any of the parameters are missinf, the unit responds with:
{"error": "Missing parameters"}
Parameters and source ids are identical to the Parameter set message.