Skip to content

Logic Commands

Add a scene.

Field Data type Description
executorCollection Object An ExecutorCollection DTO object.
code examples
Add ExecutorCollection with 3 executors
{
"commandId": "OwnCommandId",
"executorCollection": {
"name": "Executor Room 1",
"description": "Light and Dimmer Room1 Executor",
"executors": [
{
"type": "VALUE",
"position": 0,
"type": "VALUE",
"thingId": "91905b50-bf83-4584-a14b-d4c2800cec1e",
"channelId": "Dimmer",
"value": {
"type": "RAW",
"type": "RAW",
"value": 100.0
}
},
{
"type": "DELAY",
"position": 1,
"type": "DELAY",
"delay": 3000
},
{
"type": "STATE",
"position": 2,
"type": "STATE",
"thingId": "thingIdFud14_2",
"channelId": "Valve",
"state": "OPEN"
}
]
}
}
Add empty ExecutorCollection
{
"commandId": "OwnCommandId"
}

Create a virtual device that can be used to control and display the connected scenes.

Field Data type Description
id String ID of the ExecutorCollection for which a virtual device is to be created.
name String The name of the device to be created.
code examples
CreateExecutorThingDTO
{
"commandId": "OwnCommandId",
"id": "9ece616d-ffbb-432b-bfd7-4362a38f435a",
"name": "ExecutorThing 2"
}

Delete a scene.

Field Data type Description
id String ID of the ExecutorCollection to be deleted.
code examples
DeleteExecutorCollectionDTO
{
"commandId": "OwnCommandId",
"id": "9ece616d-ffbb-432b-bfd7-4362a38f435a"
}

Execute an existing scene once.

Field Data type Description
id String The ID of an existing scene.
code examples
ExecuteExecutorCollectionDTO
{
"commandId": "OwnCommandId",
"id": "9ece616d-ffbb-432b-bfd7-4362a38f435a"
}

Execute an existing or temporary scene once.

Field Data type Description
executorCollection Object An ExecutorCollection DTO object that is to be executed.
code examples
ExecuteExecutorCollectionObjectDTO
{
"commandId": "OwnCommandId",
"executorCollection": {
"id": "76dd6b1f-3f6a-4c02-b6d7-3539cd03201c",
"name": "Executor5",
"description": "Open Valve 5 seconds",
"executors": [
{
"position": 0,
"type": "STATE",
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Valve",
"state": "OPEN"
},
{
"position": 1,
"type": "DELAY",
"delay": 5000
},
{
"position": 2,
"type": "STATE",
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Valve",
"state": "CLOSE"
}
]
}
}
ExecuteExecutorCollectionObjectDTO Example 2
{
"commandId": "OwnCommandId",
"executorCollection": {
"id": "76dd6b1f-3f6a-4c02-b6d7-3539cd03201c",
"name": "TestExecutor",
"description": "",
"executors": [
{
"position": 0,
"type": "VALUE",
"thingId": "91905b50-bf83-4584-a14b-d4c2800cec1e",
"channelId": "Dimmer",
"value": {
"type": "RAW",
"value": 100.0
}
},
{
"position": 1,
"type": "DELAY",
"delay": 5000
},
{
"position": 2,
"type": "VALUE",
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Dimmer",
"value": {
"type": "LINK",
"foreignThingId": "91905b50-bf83-4584-a14b-d4c2800cec1e",
"foreignChannelId": "Dimmer"
}
},
{
"position": 3,
"type": "DELAY",
"delay": 5000
},
{
"position": 4,
"type": "VALUE",
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Dimmer",
"value": {
"type": "CALCULATED",
"expression": "a+b",
"values": {
"a": {
"type": "RAW",
"value": 5.0
},
"b": {
"type": "RAW",
"value": 5.0
}
}
}
}
]
}
}

Retrieves all currently executed scenes.

Field Data type Description
searchString String Optional field for filtering the scenes. The name and description are searched. If the field does not exist or is empty, no filter is applied.
code examples
GetRunningExecutorCollectionsDTO 1
{
"commandId": "OwnCommandId"
}
GetRunningExecutorCollectionsDTO 2
{
"commandId": "OwnCommandId",
"searchString": "floor 1"
}

Sent as a return to the command request.

Field Data type Description
runningExecutorCollections Array An array of currently executed ExecutorCollectionDTOs.
code examples
RunningExecutorCollectionsDTO
[
{
"id": "6e092f8b-a897-460e-af40-d065a5a8d06d",
"name": "ExecutorTEst",
"description": "",
"executors": [
{
"type": "VALUE",
"position": 0,
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Dimmer",
"value": {
"type": "RAW",
"value": 77
}
},
{
"type": "DELAY",
"position": 1,
"delay": 5000
},
{
"type": "VALUE",
"position": 2,
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Dimmer",
"value": {
"type": "LINK",
"foreignThingId": "91905b50-bf83-4584-a14b-d4c2800cec1e",
"foreignChannelId": "Dimmer"
}
}
]
},
{
"id": "b8563612-6676-4e87-97f6-ac9fc80b8ecb",
"name": "Executor1",
"description": "",
"executors": [
{
"type": "RANDOM",
"position": 0,
"thingId": "91905b50-bf83-4584-a14b-d4c2800cec1e",
"channelId": "Dimmer"
},
{
"type": "DELAY",
"position": 1,
"delay": 50000
}
]
}
]

Stops the execution of a scene.

Field Data type Description
id String ID of the ExecutorCollection to be stopped.
code examples
StopExecutorCollectionDTO
{
"commandId": "OwnCommandId",
"id": "9ece616d-ffbb-432b-bfd7-4362a38f435a"
}

Change a scene.

Field Data type Description
ExecutorCollection Object An ExecutorCollection DTO object. The ID must be set correctly.
code examples
UpdateExecutorCollectionDTO
{
"commandId": "OwnCommandId",
"executorCollection": {
"id": "76dd6b1f-3f6a-4c02-b6d7-3539cd03201c",
"name": "New Name",
"description": "new Description",
"executors": [
{
"type": "STATE",
"position": 0,
"thingId": "thingIdFud14_2",
"channelId": "Valve",
"state": "CLOSE"
},
{
"type": "DELAY",
"position": 1,
"delay": 5000
},
{
"type": "STATE",
"position": 2,
"thingId": "thingIdFud14_2",
"channelId": "Valve",
"state": "OPEN"
}
]
}
}

The data of the specified scenes is resent.

Field Data type Description
ExecutorCollectionIds Array A list of ExecutorCollection IDs that are to be updated. If the field does not exist or is empty, all ExecutorCollections are updated.
code examples
RefreshExecutorCollectionsDTO 1
{
"commandId": "OwnCommandId"
}
RefreshExecutorCollectionsDTO 2
{
"commandId": "OwnCommandId",
"executorCollectionIds": [
"252afd4a-56d6-470d-ae87-cf0433eb15a5",
"971c0c85-8f5d-45b6-894a-b8026f09d6ca"
]
}

Add a rule.

Field Data type Description
conditionCollection Object A ConditionCollection DTO object.
code examples
Add ConditionCollection with 2 conditions
{
"commandId": "OwnCommandId",
"conditionCollection": {
"type": "COLLECTION",
"position": 0,
"name": "MY_COLLECTION",
"description": "A beautiful condition collection",
"conditions": [
{
"type": "STATE",
"position": 0,
"comparator": "EQUAL",
"thingId": "d5da720e-2ad6-4c86-88c0-f84390f76570",
"channelId": "WindowHandle",
"smartCheck": false,
"state": "CLOSED"
},
{
"type": "OPERATOR",
"position": 1,
"comparator": "AND"
},
{
"type": "VALUE",
"position": 2,
"comparator": "GREATER",
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Dimmer",
"smartCheck": false,
"value": 45.0
}
]
}
}
Add empty ConditionCollection
{
"commandId": "OwnCommandId"
}

Delete a rule.

Field Data type Description
id String ID of the ConditionCollection
code examples
DeleteConditionCollectionDTO
{
"commandId": "OwnCommandId",
"id": "7c6ba18c-d4ee-4254-91aa-9989bf581f68"
}

Change a rule.

Dield Data type Description
conditionCollection Object A ConditionCollection DTO object. The ID must be set correctly
code examples
UpdateConditionCollectionDTO
{
"commandId": "OwnCommandId",
"conditionCollection": {
"type": "COLLECTION",
"position": 0,
"id": "7c6ba18c-d4ee-4254-91aa-9989bf581f68",
"name": "Conditon1",
"description": "Controls Dimmer Bathroom",
"conditions": [
{
"type": "STATE",
"position": 0,
"comparator": "EQUAL",
"thingId": "d5da720e-2ad6-4c86-88c0-f84390f76570",
"channelId": "WindowHandle",
"smartCheck": false,
"state": "CLOSED"
},
{
"type": "OPERATOR",
"position": 1,
"comparator": "OR"
},
{
"type": "VALUE",
"position": 2,
"comparator": "GREATER",
"thingId": "f5a69feb-59f0-4a44-a243-d2420c84f562",
"channelId": "Dimmer",
"smartCheck": false,
"value": 45.0
}
]
}
}

The data of the specified rules is sent again.

Field Data type Description
conditionCollectionIds Array A list of ConditionCollection IDs that are to be updated. If the field does not exist or is empty, all ConditionCollections are updated.
code examples
RefreshConditionCollectionsDTO 1
{
"commandId": "OwnCommandId",
"conditionCollectionIds": [
"0809bb46-4ce7-42a3-8c78-04cb7d24a30e",
"e37b6aee-2e35-4b64-82a5-8dd7a822e861"
]
}
RefreshConditionCollectionsDTO 2
{
"commandId": "OwnCommandId"
}

Add a connection.

Field Data type Description
connection Object A Connection DTO object.
code examples
Add Connection
{
"commandId": "OwnCommandId",
"connection": {
"active": true,
"conditionCollectionId": "0809bb46-4ce7-42a3-8c78-04cb7d24a30e",
"executorCollectionId": "971c0c85-8f5d-45b6-894a-b8026f09d6ca",
"name": "Connection 1",
"description": "Connects cond1 and exec1"
}
}
Add empty Connection
{
"commandId": "OwnCommandId"
}

Delete a connection.

Field Data type Description
id String ID of the Connection to be deleted.
code examples
DeleteConnectionDTO
{
"commandId": "OwnCommandId",
"id": "1ff100d2-d3ab-484f-b36f-1e84c6a7a4db"
}

Activates or deactivates a connection without deleting it.

Field Data type Description
id String ID of the Connection.
enabled Boolean Flag whether the link should be active or not.
code examples
SetConnectionEnabledDTO
{
"commandId": "OwnCommandId",
"id": "1ff100d2-d3ab-484f-b36f-1e84c6a7a4db",
"enabled": true
}

Update a connection.

Field Data type Description
connection Object A Connection DTO object. The ID must be set correctly.
code examples
UpdateConnectionDTO
{
"commandId": "OwnCommandId",
"connection": {
"id": "2d46cc1b-5780-4d4e-b5de-293ec346d6b7",
"active": false,
"conditionCollectionId": "0809bb46-4ce7-42a3-8c78-04cb7d24a30e",
"executorCollectionId": "971c0c85-8f5d-45b6-894a-b8026f09d6ca",
"name": "Connection 1",
"description": "Connects cond1 and exec1"
}
}

The data of the specified connections is resent.

Field Data type Description
connectionIds Array A list of Connection IDs that are to be updated. If the field does not exist or is empty, all Connections are updated.
code examples
RefreshConnectionsDTO 1
{
"commandId": "OwnCommandId",
"connectionIds": [
"da12f7c7-4126-46f1-a811-32dac2bbf2c7",
"fe742922-ddf1-4ea2-a52d-d29435359bfa"
]
}
RefreshConnectionsDTO 2
{
"commandId": "OwnCommandId"
}

Create a new timer with the desired name.

Field Data type Description
name String The name of the new timer.
code examples
CreateTimerDTO
{
"commandId": "OwnCommandId",
"name": "Azure timer"
}

Change timer settings.

Field Data type Description
timer Object A SimpleIoTCoreTimer DTO object. The ID must be set correctly.
code examples
UpdateTimerDTO
{
"commandId": "OwnCommandId",
"timer": {
"id": "7c6ba18c-d4ee-4254-91aa-9989bf581f68",
"type": "TIMER",
"enabled": true,
"visible": true,
"time": 0,
"offset": 0,
"period": 15,
"selectedDays": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
}
}

Activate/deactivate timer.

Field Data type Description
id String The unique timer ID.
enabled Boolean Flag whether the timer is enabled or not.
code examples
SetTimerEnabledDTO
{
"commandId": "OwnCommandId",
"id": "7c6ba18c-d4ee-4254-91aa-9989bf581f68",
"enabled": false
}