IoT Export
IoT Core Data Model

IoT Logic Core

57min

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.

ConnectionDeletedDTO

Field

Data type

Description

id

String

Unique ID of the device in the system.

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.

ExecutorCollectionDeletedDTO

Field

Data type

Description

id

String

Unique ID of the device in the system.

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

DelayExecutor

LOOP

LoopExecutor

MESSAGE

MessageExecutor

URL

UrlExecutor

PARAMETER

ParameterExecutor

RANDOM

RandomExecutor

STATE

StateExecutor

STATE_TOGGLE

StateToggleExecutor

VALUE

ValueExecutor

INCREASE_DECREASE

InDecreaseExecutor

FADE_TO

FadeToExecutor

FADE_FROM_TO

FadeFromToExecutor

LINK

LinkExecutor

DelayExecutorDTO

Creates a delay during the execution of a scene.

Field

Data type

Description

delay

Number

Delay in milliseconds

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.

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

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.

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.

Field

Data type

Description

parameters

Object

Each object field represents a parameter by specifying the parameter ID and the corresponding value.

Channel Executor

The channel executor controls individual channels of a device. The device ID and the channel ID are therefore required.

Field

Data type

Description

thingId

String

The unique device ID.

channelId

String

The unique channel ID for a device.

LinkExecutorDTO

Use state or value from another channel of a device.

Field

Data type

Description

foreignThingId

String

The unique device ID of the device from which the value is to be transferred.

foreignChannelId

String

The unique channel ID of the channel of the other device from which the value is to be transferred.

RandomExecutorDTO

Sets a random value or state within the valid value range.

StateToggleExecutorDTO

Toggles between specified states.

Field

Data type

Description

states

Array

Specifies the states to be used as a string. If the array remains empty, all states except UNKNOWN are used.

StateExecutorDTO

Sets the state of a channel to the specified value.

Field

Data type

Description

state

String

The state to be set.

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.

Field

Data type

Description

type

String

Specifies the type of the value container.

The following types are possible.

type

Description

RAW

The value is specified directly.

CALCULATED

The value is calculated using a formula and variables.

LINK

The value is taken from another device / channel.

RawValueDTO

The value is specified directly.

Field

Data type

Description

value

Number

The value to be used.

CalculatedValueDTO

Calculation of the value based on a formula and the definition of further values as variables and function expressions.

Field

Data type

Description

expression

String

Formula for the calculation.

values

Object

Each field of the object represents a variable that can be used in the calculation. A value container object is again stored there as a value. A variable may only consist of letters!

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:

character

description

+

Addition

-

Subtraction

*

Multiplication

/

Division

(

Parenthesis on

)

Parenthesis closed

The following functions can be used in the "expression" field. Note: x,y could be variables or values.

Function

Description

min(x,y)

Returns the number with the smaller value

max(x,y)

Returns the number with the greater value

sqrt(x)

square root

pow(x,y)

Returns the value of a base (x) raised to a power (y)

floor(x)

Takes as input a real number x, and gives as output the greatest integer less than or equal to x

ceiling(x)

Maps x to the smallest integer greater than or equal to x

round(x)

Rounds the specified value to the closest long value

abs(x)

Returns the non-negative value of x without regard to its sign

log(x)

Returns the natural logarithm (base e) of x

log10(x)

Returns the base 10 logarithm of x

sin(x)

Sinus of x

sinh(x)

Sinus hyperbolicus of x

asin(x)

Returns the arc sine of x

cos(x)

Cosinus

cosh(x)

Cosinus hyperbolicus of x

acos(x)

Returns the arc cosinus of x

tan(x)

Tangens

tanh(x)

Tangens hyperbolicus of x

atan(x)

Returns the arc tangens of x

Variable names may only consist of letters and not of the above operators or function names.

LinkedValueDTO

Use value from another device channel. Only data type value can be linked, not a state.

Field

Data type

Description

foreignThingId

String

Specification of the device ID.

foreignChannelId

String

Specification of the device channel ID.

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.

Field

Data type

Description

value

Object

Value container for the value to be used.

FadeFromToExecutorDTO

Changes a numerical value incrementally from a specified start value to the specified target value within a specified time.

Field

Data type

Description

from

Object

Value container for the start value.

to

Object

Value container for the target value.

ms

Number

Time specification in milliseconds.

FadeToExecutorDTO

Changes a numerical value incrementally to the specified target value within a specified time.

Field

Data type

Description

to

Object

Value container for the target value.

ms

Number

Time specification in milliseconds.

InDecreaseExecutorDTO

Increases or decreases the channel value by the specified value.

Field

Data type

Description

value

Object

Value container for the value to be used.

decrease

Boolean

Specifies whether the channel value should be decreased by the value from the "value" field, otherwise it is increased.

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.

Field

Data type

Description

id

String

ID for unique identification in the system.

name

String

The assigned name.

description

String

The assigned description.

conditions

Array

A collection of conditions for logical evaluation.

type

String

The type of the ConditionCollection is always COLLECTION

position

Number

The position field is taken into account in the evaluation and the conditions are sorted accordingly beforehand

A ConditionCollection object can also be used as a condition. This is helpful for a nested evaluation with possibly complex blocks.

ConditionCollectionDeletedDTO

Field

Data type

Description

id

String

Unique ID of the device in the system.

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:

Field

Data type

Description

type

String

The type of the condition.

position

Number

The position field is taken into account in the evaluation and the conditions are sorted accordingly beforehand.

comparator

String

Comparison operator to be used. This depends on the condition type used.

The "type" field indicates the type of condition.

Type

Condition DTO

COLLECTION

ConditionCollection

OPERATOR

ConditionOperator

TIME

TimeCondition

STATE

StateChannelCondition

VALUE

ValueChannelCondition

ConditionOperatorDTO

A comparison operator enables conditions to be linked logically.

The following comparison operators are possible in the "comparator" field:

Possible comparison operators

AND

NAND

OR

NOR

XOR

NXOR

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.

Time Condition

A time condition is a way of taking current time information into account in the evaluation.

TimeConditionDTO

Field

Data type

Description

selectedDays

Array

Selected days as a string array.

startTime

Number

Start time as Unix timestamp.

endTime

Number

End time as Unix timestamp.

timerType

String

Timer Type to define how the parameters are evaluated.

The "timerType" field is used to determine what type of timer is involved. The following types are possible:

Type

Description

DATE

Date range from startTime to endTime.

TIME

Time range from startTime to endTime.

DAYS

One or more days of the week.

DAYS_TIME

Within a time range from startTime to endTime on one or more days of the week.

An array with the selected days can be stored in the "selectedDays" field.

Day

MONDAY

TUESDAY

WEDNESDAY

THURSDAY

FRIDAY

SATURDAY

SUNDAY

The following comparison operators are possible in the "comparator" field:

Possible comparison operators

EQUAL

NOT_EQUAL

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

Field

Data type

Description

thingId

String

Unique device ID

channelId

String

Unique (related to the device) channel ID

smartCheck

Boolean

Intelligent check. Prevents multiple evaluation as true until the check value has been evaluated as false again.

StateChannelConditionDTO

Checks the (string) state of a channel.

Field

Data type

Description

state

String

The state which is compared with the current channel value.

The following comparison operators are possible in the "comparator" field:

Possible comparison operators

EQUAL

NOT_EQUAL

ValueChannelConditionDTO

Checks the numerical value of a channel.

Field

Data type

Description

value

Number

The value that is compared with the current channel value.

The following comparison operators are possible in the "comparator" field:

Possible comparison operators

EQUAL

NOT_EQUAL

GREATER

GREATER_EQUAL

SMALLER

SMALLER_EQUAL



Updated 25 Mar 2024
Doc contributor
Doc contributor
Did this page help you?