14 . JSON Control Interface
/JSON?request=controldevicebyvalue&ref=###&value=#
/JSON?request=controldevicebylabel&ref=###&label=label
/JSON?request=getevents
/JSON?
request=runevent&group=GROUPNAME&name=EVENTNAME
A2ZLink
_Forward = 8
_Rewind = 9
_Repeat = 10
_Shuffle = 11
ControlValue = The value for this pair, use when controlling the
device.
R a n g e = Specifies the range of this pair. This is used for pairs that
represent multiple values, such as the dim level of a light. A light may
specifiy a range of 1-99 for the dim levels. The range also specifies
the label using RangeStatusPrefix (such as "Dim"), and
RangeStatusSuffix (such as "%"). The formatted status of the device will
then be formatted as "Dim ## %".
Control a device given the device's reference number "ref", and value
"value". For example, if a light has a value of 0 for off, the following
would turn off the device with reference # 3570:
/JSON?request=controldevicebyvalue&ref=3570&value=0
The return is the current JSON formatted status of the device (same
return as "getstatus"), or the string "error".
Control a device by label, this is the label as returned by the
"getcontrol" parameter. For example, if the device has a label "On" to
turn a device on, the following URL would turn it on:
/JSON?request=controldevicebylabel&ref=3570&label=On
The return is the current JSON formatted status of the device (same
return as "getstatus"), or the string "error".
Returns the names of all events in the system. An event is an action to
be performed such as controlling a light, a sequence of lights, a
thermostat, etc. Events have two properties, a group name and an
event name. This command returns the group name and event name
for all events. These two pieces of information are used to control an
event.
Example:
{
"Name":"HomeSeer Events",
"Version":"1.0",
"Events":
[
{
"Group":"Lighting",
"Name":"Outside Lights Off"
}, (MORE EVENTS FOLLOW)
This command will execute the actions of an event. Pass the group
name and event name. The group and name are not case sensitive.
N o t e : Only available if A2Z-Link is enabled for automation.