Set Actuator state (new)

Description

Sets the state of a specified Smappee Switch, Comfort plug or Output Module. The StateId is returned in the overview of the available states for each actuator in the "Get Servicelocation Info" call.

For Smappee Switches and Comfort plugs, this can be done for a specific period or infinite.

Resource URL

https://app1pub.smappee.net/dev/v3/servicelocation/[SERVICELOCATIONID]/actuator/[ACTUATORID]/[STATEID]

HTTP method

POST

HTTP header

Authorization: Bearer [ACCESS_TOKEN]

 [ACCESS_TOKEN] being the access token received from the Get token or Refresh token authentication calls.

HTTP body

{"duration": [DURATION]}

Parameters

Parameter

Type

Description

SERVICELOCATIONID

Path Parameter

The actual id of an accessible service location (see Get Servicelocations)

ACTUATORID

Path Parameter

The id of the actuator object that will be turned on (see Get Servicelocation Info)

STATEID

Path Parameter

The id of the state of the actuator that you want to activate (see Get Servicelocation Info)

duration

JSON attribute

This is (currently) only supported for Smappee Switch or Comfort Plug.

The duration in seconds the actuator should be turned on.

Possible values are:

  • 300

  • 900

  • 1800

  • 3600

Any other value results in turning on for an infinite period of time.

Example

https://app1pub.smappee.net/dev/v3/servicelocation/123/actuator/2/ON_ON

HTTP body:

{"duration": 900}

Note that the example above is for a Smappee Switch or a Comfort Plug that support durations.

Result

Empty body

Versioning

Version 3

This call was introduced in version 3 of the api for the purpose of supporting output modules that have more complex states than just ON and OFF that we have for Smappee Switches and Comfort Plugs.

For backwards compatibility, we still support StateId "on" and "off" but only for Smappee Switches and Comfort Plugs.





Content