Get Device State

The Get Device State action returns the current state of a device. The device must be defined on the same node as the trigger.

The Get Device State action is part of the Technology Preview Extension

This action is part of the Technology Preview Extension, which is also referred to as the sandbox package. The action will be found in the Devices trigger action category upon successful deployment of the sandbox package,
See Technology Preview Extension for information on obtaining and installing the extension.

Parameter descriptions

Parameter Description
Action Input Type The manner in which the device name parameter is defined. There are two options:
  • Static - The name of the device will be selected from the list shown in the Device Name parameter.
    The image above shows the Get Device State action when the Static option is selected.
  • Dynamic - The name of the device is defined in the Device Name parameter on the Input tab.
Device Name Available when the Action Input Type is Static.
The name of the device selected from the drop down list of devices.

Input tab

Parameter Description
Device Name Available when the Action Input Type is Dynamic.
The variable that contains the name of the device. This can be a variable or be a constant string.

Output tab

Parameter Description
Device State

An unsigned, one byte integer that contains the current state of the device.
The values are:

  • 1 = Started
  • 2 = Stopped
  • 3 = Disabled
  • 4 = Starting
  • 5 = Stopping