Control Plug

Control the on/off state of a plug by setting a hold on the plug. Creates a hold for the on or off state of the plug for the specified duration. Note that an event is created regardless of whether the program is in the same state as the requested state.

Since Version: 1

Type: controlPlug

Plug States

The following plug states may be specified:

Plug State Description
on Sets the plug into the on state for the start/end period specified. Creates a plug hold in the on state.
off Sets the plug into the off state for the start/end period specified. Creates a plug hold in the off state.
resume Causes the plug to resume its regular program and to follow it. Removes the currently active plug hold, if no hold is currently running, nothing happens. No other optional properties are used.

Hold Types

Hold Type Description
dateTime Use the provided startDate, startTime, endDate and endTime for the event. If start date/time is not provided, it will be assumed to be right now. End date/time is required.
nextTransition The end date/time will be set to the next climate transition in the program.
indefinite The hold will not end and require to be cancelled explicitly.
holdHours Use the value in the "holdHours" parameter to set the end date/time for the event.

Hold types ease the calculation of end times for holds. You are always free to provide the startDate and startTime for the hold and it will be honoured, except where documented. The endDate and endTime depend on the hold type chosen. Default is indefinite.


Name Type Required Description
plugName String yes The name of the plug. Ensure each plug has a unique name.
plugState Enum yes The state to put the plug into. Valid values: on, off, resume.
startDate String no The start date in thermostat time.
startTime String no The start time in thermostat time.
endDate String no The end date in thermostat time.
endTime String no The end time in thermostat time.
holdType Enum no The hold duration type. Valid values: dateTime, nextTransition, indefinite, holdHours.
holdHours Integer no The number of hours to hold for, used and required if holdType='holdHours'.

All writable the properties of the Event Object are available.

Back To Top