Rules introduction


    Rules are used to trigger set of Operations when a condition met the specification. MyController supports multiple conditions.

    Conditions type:
    • Compare
    • State
    • Script
    • String
    • Threshold
    • Threshold range

    To add new Rule, Navigate to Resources >> Rules >> Add rule.


    Condition - Compare

    We can compare Sensor variable1 with Sensor variable2.
    Example: Hall-temperature >= 20% outside-temperature


    Condition - State

    With this condition we con monitor state of Binary type sensor variables, Node, Gateway and Resources group.
    Example for Sensor variable


    Example for Node


    Example for Gateway


    Example for Resources group


    Condition - Threshold

    With this condition we can monitor Sensor variable values with a static value or with another Sensor variable value

    Example with static value:


    Example with another Sensor variable:


    Condition - Threshold range

    With this condition we can monitor Sensor variable value Is in range? or Is in outside range?

    • Threshold value low (1) - low value of threshold
    • Threshold value high (2) - high value of threshold
    • Include threshold low - When we check this field included (1) in boundary
    • Include threshold high - When we check this field included (2) in boundary
    • In range - When you check this box will be act as In range check, otherwise Out side range check

    Example: X inside [10,56], X outside [45, 200]

    Example for In range:


    Example for Out side range:


  • Hello,

    I would like to execute some operation when data from two sensors meet some condition.
    For example: if (sensor1 == 0 AND sensor2 == 0) then turn_off_power.

    Is there a way how to do it?

    Thank You,


    @Marek from UI you cannot compare two sensors. However you can writer simple script for condition. and return true or false. If you need help to write script let me know I will show some example.

  • @jkandasa Thanks for the hint. I'v created following script and it works :smile:

    var dimCree = mcApi.uidTag().getByUid("dimm_cree_uid");
    var dimCob = mcApi.uidTag().getByUid("dimm_cob_uid");
    ( dimCree.sensorVariable.value == 0 && dimCob.sensorVariable.value == 0 )

    Thanks for all the effort,

Log in to reply