IoT Export
IoT Core Data Model
IoT Logic Core
57 min
description the iot logic core provides a data model and commands for scenes, rules and associated links links links are used to create n\ n connections between rules and scenes rules serve as triggers for triggering the links are used to resolve which scenes are to be executed connectiondto field data type description id string id for unique identification in the system name string the assigned name description string the assigned description active boolean specifies whether the link is activated conditioncollectionid string specifies the id of a rule executorcollectionid string specifies the id of a scene code examples connectiondto { "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" } connectiondeleteddto field data type description id string unique id of the device in the system code examples connectiondeleteddto { "id" "2d46cc1b 5780 4d4e b5de 293ec346d6b7" } scenes scenes are required to switch devices or trigger actions these contain preconfigured values for devices or actions to be triggered executorcollectiondto scenes are represented by a container each scene is represented by a container such a container contains a list of commands to be executed in the "executors" field field data type description id string id for unique identification in the system name string the assigned name description string the assigned description executors array an array of executor objects code examples executorcollectiondto { "id" "76dd6b1f 3f6a 4c02 b6d7 3539cd03201c", "name" "bathroom off", "description" "leave bathroom", "executors" \[ { "position" 0, "type" "value", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "value" { "type" "raw", "value" 0 0 } }, { "position" 1, "type" "delay", "delay" 5000 }, { "position" 2, "type" "state", "thingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "channelid" "valve", "state" "close" } ] } executorcollectiondeleteddto field data type description id string unique id of the device in the system code examples executorcollectiondeleteddto { "id" "2d46cc1b 5780 4d4e b5de 293ec346d6b7" } executor general functions are referred to as executors these are independent of devices or channels the delay and loop executor can be used to control the execution behavior of a scene field data type description type string specification of the executor type position number the position determines the order of execution executors with the same value for the position may be executed in a different order the "type" field is used to specify the type of executor the following types are possible type executor delay iot logic core /#delayexecutordto loop iot logic core /#loopexecutordto message iot logic core /#messageexecutordto url iot logic core /#urlexecutordto parameter iot logic core /#parameterexecutordto random iot logic core /#randomexecutordto state iot logic core /#stateexecutordto state toggle iot logic core /#statetoggleexecutordto value iot logic core /#valueexecutordto increase decrease iot logic core /#indecreaseexecutordto fade to iot logic core /#fadetoexecutordto fade from to iot logic core /#fadefromtoexecutordto link iot logic core docid\ khqqklgdjkioaqd8w kdf delayexecutordto creates a delay during the execution of a scene field data type description delay number delay in milliseconds code examples executorcollectiondeleteddto { "position" 4, "type" "delay", "delay" 5000 } loopexecutordto control element for the repetition of the scene field data type description loop number a value less than 0 deactivates the loop function; a value of 0 causes the execution to be repeated indefinitely; a value greater than 0 specifies how often the execution is repeated code examples executorcollectiondeleteddto { "position" 1, "type" "loop", "loop" 3 } messageexecutordto send message by e mail / push to the specified users field data type description message string the message to be sent messagetype string the message type recipients array list of users who should receive the message the users must be created locally on the gateway please note that the spelling is case sensitive the following message types can be used in the "messagetype" field type notification warning alert error custom code examples messageexecutordto { "position" 0, "type" "message", "messagetype" "notification", "recipients" \[ "user1", "user2" ], "message" "gateway will be shutdown in 30 minutes " } urlexecutordto call a user defined url field data type description url string the url to be called up incl prefix such as https // user string the user for authentication password string the password for authentication ignorecert boolean deactivate the validity check of certificates code examples urlexecutordto { "position" 1, "type" "url", "url" "https //192 168 0 12 8080/info html", "user" "user", "password" "passw\@rd", "ignorecert" true } thing executor a thing executor always refers to the control of a device and requires the device id field data type description thingid string the unique device id parameterexecutordto sets one or more device parameters true false 142false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples parameterexecutordto { "position" 0, "type" "parameter", "thingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "parameters" { "8d4b49e26fb8a194a7ccb05dc0bb507a" "on", "cf97094fdca80778221d783811e0a573" "10 3" } } channel executor the channel executor controls individual channels of a device the device id and the channel id are therefore required true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type linkexecutordto use state or value from another channel of a device true false 153false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples linkexecutordto { "position" 0, "type" "link", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "foreignthingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "foreignchannelid" "dimmer" } randomexecutordto sets a random value or state within the valid value range code examples urlexecutordto { "position" 0, "type" "random", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer" } statetoggleexecutordto toggles between specified states true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples statetoggleexecutordto 1 { "position" 0, "type" "state toggle", "thingid" "dec83c14 1fdc 439b 844c 1f01d4f58194", "channelid" "switch" } statetoggleexecutordto 2 { "position" 0, "type" "state toggle", "thingid" "dec83c14 1fdc 439b 844c 1f01d4f58194", "channelid" "switch", "states" \[ "on", "off" ] } stateexecutordto sets the state of a channel to the specified value true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples stateexecutordto { "position" 0, "type" "state", "thingid" "dec83c14 1fdc 439b 844c 1f01d4f58194", "channelid" "switch", "state" "off" } channel value executor a special feature of numerical values is that they are represented by an object this makes it possible to use extended functions to determine the actual value true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the following types are possible true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type rawvaluedto the value is specified directly true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples rawvaluedto { "position" 0, "type" "value", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "value" { "type" "raw", "value" 100 0 } } calculatedvaluedto calculation of the value based on a formula and the definition of further values as variables and function expressions true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type each field of the object represents a variable that can be used in the calculation a value container object is again stored there as the value the following operators and control characters can be used in the "expression" field true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the following functions can be used in the "expression" field note x,y could be variables or values true false 138false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type variable names may only consist of letters and not of the above operators or function names code examples calculatedvaluedto 1 { "position" 0, "type" "value", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "value" { "type" "calculated", "expression" "a+b", "values" { "a" { "type" "raw", "value" 10 0 }, "b" { "type" "raw", "value" 20 0 } } } } calculatedvaluedto 2 { "position" 0, "type" "value", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "value" { "type" "calculated", "expression" "(a 3)/2", "values" { "a" { "type" "link", "foreignthingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "foreignchannelid" "dimmer" } } } } calculatedvaluedto 3 { "position" 0, "type" "value", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "value" { "type" "calculated", "expression" "max(a,min(b,c))", "values" { "a" { "type" "raw", "value" 100 0 }, "b" { "type" "link", "foreignthingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "foreignchannelid" "dimmer" }, "c" { "type" "raw", "value" 10 0 } } } } linkedvaluedto use value from another device channel only data type value can be linked, not a state true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples linkedvaluedto { "position" 0, "type" "value", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "value" { "type" "link", "foreignthingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "foreignchannelid" "dimmer" } } valueexecutordto change the numerical value of a channel to the specified value the actual value is determined at check time using the stored value container true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type fadefromtoexecutordto changes a numerical value incrementally from a specified start value to the specified target value within a specified time true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples fadefromtoexecutordto { "position" 1, "type" "fade from to", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "to" { "type" "raw", "value" 100 0 }, "ms" 5000, "from" { "type" "raw", "value" 0 0 } } fadetoexecutordto changes a numerical value incrementally to the specified target value within a specified time true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples fadetoexecutordto { "position" 1, "type" "fade to", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "to" { "type" "raw", "value" 80 0 }, "ms" 2500 } indecreaseexecutordto increases or decreases the channel value by the specified value true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples indecreaseexecutordto { "position" 1, "type" "increase decrease", "thingid" "91905b50 bf83 4584 a14b d4c2800cec1e", "channelid" "dimmer", "value" { "type" "raw", "value" 20 0 }, "decrease" true } rules rules can be used to define triggers for scenes the evaluation is carried out sequentially in order, taking into account the "position" field conditioncollectiondto a conditioncollection represents a rule with a collection of conditions true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type a conditioncollection object can also be used as a condition this is helpful for a nested evaluation with possibly complex blocks code examples conditioncollectiondto 1 { "type" "collection", "position" 0, "id" "7c6ba18c d4ee 4254 91aa 9989bf581f68", "name" "conditon1", "description" "checks dimmer bathroom condition", "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 } ] } conditioncollectiondto 2 { "type" "collection", "position" 0, "id" "7c6ba18c d4ee 4254 91aa 9989bf581f68", "name" "conditon1", "description" "", "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 equal", "thingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "channelid" "dimmer", "smartcheck" false, "value" 45 0 }, { "type" "operator", "position" 3, "comparator" "and" }, { "type" "collection", "position" 4, "id" "e37b6aee 2e35 4b64 82a5 8dd7a822e861", "name" "inner conditioncollection", "description" "description example", "conditions" \[ { "type" "value", "position" 1, "comparator" "smaller", "thingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "channelid" "dimmer", "smartcheck" false, "value" 30 0 } ] } ] } conditioncollectiondeleteddto true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples conditioncollectiondeleteddto { "id" "e37b6aee 2e35 4b64 82a5 8dd7a822e861" } condition a condition is used for the logical evaluation of device data or other factors such as checking the time all condition objects have the following fields true false 111false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the "type" field indicates the type of condition true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type conditionoperatordto a comparison operator enables conditions to be linked logically the following comparison operators are possible in the "comparator" field true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type if there are several conditions in a conditioncollection, these can be linked with a conditionoperator the "position" field of the conditions must be filled correctly if there is no conditionoperator between two conditions, an and comparison is automatically performed the "position" field is decisive for the sequence code examples conditionoperatordto { "type" "operator", "position" 0, "comparator" "or" } time condition a time condition is a way of taking current time information into account in the evaluation timeconditiondto true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the "timertype" field is used to determine what type of timer is involved the following types are possible true false 138false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type an array with the selected days can be stored in the "selecteddays" field true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the following comparison operators are possible in the "comparator" field true falsefalse left unhandled content type false left unhandled content type false left unhandled content type code examples timeconditiondto 1 { "type" "time", "position" 4, "comparator" "equal", "selecteddays" \[ "monday", "tuesday" ], "starttime" 1705069046, "endtime" 1705151846, "timertype" "days time" } timeconditiondto 2 { "type" "time", "position" 4, "comparator" "equal", "starttime" 1705070352, "endtime" 1705153152, "timertype" "time" } channel condition channel conditions are used to check a channel value each specialization has its own fields for defining the check value and a list of possible comparison operators true false 129false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type statechannelconditiondto checks the (string) state of a channel true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the following comparison operators are possible in the "comparator" field true falsefalse left unhandled content type false left unhandled content type false left unhandled content type code examples statechannelconditiondto { "type" "state", "position" 0, "comparator" "not equal", "thingid" "d5da720e 2ad6 4c86 88c0 f84390f76570", "channelid" "windowhandle", "smartcheck" true, "state" "closed" } valuechannelconditiondto checks the numerical value of a channel true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type the following comparison operators are possible in the "comparator" field true falsefalse left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type code examples valuechannelconditiondto { "type" "value", "position" 1, "comparator" "smaller", "thingid" "f5a69feb 59f0 4a44 a243 d2420c84f562", "channelid" "dimmer", "smartcheck" false, "value" 30 0 }