IoT Export
...
IoT Core Data Model
IoT Command Core
Logic Commands
39 min
scenes addexecutorcollectiondto add a scene field data type description executorcollection object an executorcollection dto object the id of the executorcollection object is assigned by the server after the internal object has been created if an id has already been set, this is not used in the created 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" } createexecutorthingdto 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 several virtual devices can be created for a scene json example code examples createexecutorthingdto { "commandid" "owncommandid", "id" "9ece616d ffbb 432b bfd7 4362a38f435a", "name" "executorthing 2" } deleteexecutorcollectiondto 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" } executeexecutorcollectiondto 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" } executeexecutorcollectionobjectdto execute an existing or temporary scene once field data type description executorcollection object an executorcollection dto object that is to be executed the executorcollection dto object for the "executorcollection" field does not need to be added to the system beforehand it is executed once and is not saved 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 } } } } ] } } getrunningexecutorcollectionsdto 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" } runningexecutorcollectionsdto 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 } ] } ] stopexecutorcollectiondto 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" } updateexecutorcollectiondto 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" } ] } } refreshexecutorcollectionsdto 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" ] } rules addconditioncollectiondto add a rule field data type description conditioncollection object a conditioncollection dto object the id of the conditioncollection object is assigned by the server after the internal object has been created if an id has already been set, this is not used in the created 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" } deleteconditioncollectiondto delete a rule field data type description id string id of the conditioncollection code examples deleteconditioncollectiondto { "commandid" "owncommandid", "id" "7c6ba18c d4ee 4254 91aa 9989bf581f68" } updateconditioncollectiondto 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 } ] } } refreshconditioncollectionsdto 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" } connections addconnectiondto add a connection field data type description connection object a connection dto object the id of the connection object is assigned by the server after the internal object has been created if an id has already been set, this is not used in the created 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" } deleteconnectiondto 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" } setconnectionenableddto 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 } updateconnectiondto 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" } } refreshconnectionsdto 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 refreshconnectionsdto1 { "commandid" "owncommandid", "connectionids" \[ "da12f7c7 4126 46f1 a811 32dac2bbf2c7", "fe742922 ddf1 4ea2 a52d d29435359bfa" ] } refreshconnectionsdto 2 { "commandid" "owncommandid" } timer commands createtimerdto 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" } updatetimerdto change timer settings field data type description timer object a simpleiotcoretimer dto object the id must be set correctly only the timer specific fields as described in simple iot core docid 5y ebsqs4y5f2pqiacvlt are supported the "channels" and "parameters" field is not evaluated! 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" ] } } settimerenableddto 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 }