StartStop Trait Schema

action.devices.traits.StartStop - This trait covers starting and stopping the device.

Starting and stopping a device serves a similar function to turning it on and off. Devices that inherit this trait function differently when turned on and when started. Certain washing machines, for instance, are able to be turned on and have their settings modified before actually starting operation.

Unlike devices that simply have an on and off state, some devices that can start and stop are also able to pause while performing an operation. Devices that can pause will cease operation, but upon resume will continue in the same state as when they were paused. Unpausing differs from starting/restarting as regardless of the current state of the device, this will begin operation from the beginning.

Some devices may support running in certain zones. For example, a sprinkler may have various watering zones and support the ability to water particular zones separately, while a vacuum may support cleaning specific rooms.

Device COMMANDS

Command Parameters/Definition
action.devices.commands.StartStop

start Boolean. True when command is to start, false to stop.

zone Optional. String indicating zone in which to start running (stop in zone not supported).

action.devices.commands.PauseUnpause

pause Boolean. True when command is to pause, false to unpause.

Sample EXECUTE Request

Start the washing machine.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "sheepdip"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.StartStop",
          "params": {
            "start": true
          }
        }]
      }]
    }
  }]
}
Vacuum the kitchen.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "sheepdip"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.StartStop",
          "params": {
            "start": true,
            "zone": "kitchen"
          }
        }]
      }]
    }
  }]
}
Pause the vacuum.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "sheepdip"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.PauseUnpause",
          "params": {
            "pause": true
          }
        }]
      }]
    }
  }]
}