Difference between revisions of "AIO Action Types"

From OpenMotics
Jump to navigation Jump to search
(Blanked the page)
Line 1: Line 1:
Work In Progress - AIO Action Types
== Detailed Info ==
=== ThermostatMode ===
The ThermostatMode action byte (140) is used as follows:
See [[Thermostat Mode]]
=== Use case ===
In normal circumstance, scheduled actions are used to change setpoints - for example - from day to night regime. This is typically done with scheduled actions (action byte 134..139) to change all setpoints at once. When going on vacation, scheduled actions must be overruled. This can be done by removing a scheduled action out of the scheduled action queue.
However, it’s much easier to tell the system to ignore the normal scheduled actions (action byte 128..139) by changing the ThermostatMode (action byte 140) so actions (with action byte 128 to 139) will be ignored. At that moment, scheduled action won’t be changed but the scheduled action will be ignored until the thermostat mode is changed again.
=== Toggling a Floor ===
Toggle all lights of a certain floor (action byte 173) works as follows: If 1 or more lights of the selected floor are on, then all lights of that floor will be switched off. If there are no lights lit on that floor: all lights will be switched on.
=== Toggling Lights ===
When at an input page for example or in a group action (or other type of actions) multiple lights should be toggled (by using action byte 162), the lights will be toggled independently from each other.
In other words, if you have 1 switch that toggles 3 lights, with 1 light already on and the other 2 off. When the switch is pressed, 2 lights will be on and 1 off.
In many cases, this is not the expected behavior. The Toggle follow function will follow the first light after “the toggle follow on” (action byte 174) instruction is given. In other words if the first light will be toggled off, the rest of the lights will follow and be switched off, if the light is toggled on, the rest of the lights (with action byte 162) will be switched on. Please note that the toggle follow function will be switched off automatically if all instructions of a certain function (input action, group action, scheduled action etc) are executed. Please also note that the toggle follow function has no influence on the floor level actions (action byte 171, 172 and 173). Please use this function in your action list as a first action followed by the lights that need to be toggled.
=== Timers ===
When switching on a light or output with action type 195-200, the light/output will be switched on with a predefined timer value that will overrule the standard timer value that is set for the output. Also, when a light is already switched on with for example the standard timer value, the action byte 195-200 will overrule this value by the timer values defined in the specific action type. Please also note that every time the action byte is executed, the timer value will be reset even when the light is already switched on for a longer period of time. If you want to avoid timer values to be overwritten for lights or outputs already switched on, please use action type 201-206.
=== Long Press ===
When an input is pressed for a number of seconds (as defined by the action type), a preconfigured group action will be executed. Please note that this function will only work if the chain of actions are triggered by an input so this action type must be entered at the input page (directly or in a group that is included in the input page) when using this function.
=== If Then Else EndIf ===
The IF THEN ELSE ENDIF can be used in an input page but also in a group action for example. This function works quite simple as following example will show:
;000 240 0
;001 243 5
:Output 5 is ON?
;002 240 2
;003 242 8
:Input 8 is OFF?
;004 240 10
;005 161 4
:Light 4 OFF
;006 240 20
;007 160 4
:Light 4 ON
;008 240 255
Please make sure to apply the ENDIF instruction otherwise it could happen that all instructions in the queue will be ignored until the ENDIF instruction is received.
The Validation bits (0-255) can be freely used to remember a certain condition. The validation bits are very useful in combination with the IF THEN instruction.
=== Delaying Instructions ===
With this instruction (action byte 235), the delay of a certain action can be programmed.
For example: I want to switch on light 9 and 1 minute later light 10 and another minute later light 11. Let’s look at the example that could make this happen (this can be programmed at input page level for example or be put in a group action, etc.):
;000 161 9
:Switch ON light 9
;001 235 60
:Delay all following instruction with 60 seconds
;002 161 10
:Switch On light 10 (after 60 seconds)
;003 235 120
:Delay all following instruction with 120 seconds
;004 161 11
:Switch On light 11 (after 120 seconds)
;005 235 255
:No delay for instructions in the queue that follow
Please make sure to never forget the instruction on line 5 (004 161 11), if this is not programmed, all instructions afterwards that comes in the queue will be delayed with 2 minutes. Please also note that the delayed action queue is limited in size and actions remains much longer in this queue (up to 249 seconds) so if you have multiple actions that needs delayed execution (for example different lights that needs to be switched on after x seconds), put those together in a group action and program the delay of this group (this group action will only take 1 entry in the delayed action queue).
With the action byte 79, the system will know if doubles must be kept in the timer queue. Let's explain by using an example:
;000 161 9
;001 235 5
;002 160 9
;003 235 255
;004 235 10
;005 161 9
;006 235 255
;007 235 15
;008 160 9
;009 235 255
In the above example, light 9 should go ON, 5 seconds later OFF, 5 seconds later ON again and 5 seconds later OFF. In reality since as a standard setting, the timer queue cleaning setting (which can be set by using BA79) is enabled, the Master will recognise the same Basic action in the Timer Queue and only remember the last once added to the queue. In other words, in this example, light 9 will go ON and 15 seconds later, it will switch OFF.
To get it work like intended, the below example should be followed:
;000 079      -> Disable the Clean Timer Queue function
;001 161 9
;002 235 5
;003 160 9
;004 235 255
;005 235 10
;006 161 9
;007 235 255
;008 235 15
;009 160 9
;010 235 255
;011 079 255    -> Enable the Clean Timer Queue Function
Remark: Always enable the Clean Timer function again, this is needed for the thermostats, pump group and other functions in the Master.
=== Additional Actions ===
This instruction (byte 236) will make sure that actions are executed at button release when button pressed instructions (207-211) is used. Additionally, this instruction will execute OR the actions when the button press time is reached OR the action defined after instruction 236. Let’s first explain the behavior when instruction 236 is not used, these instruction will be place in the input page of switch 20:
;000 208 6
:If switch is pressed for more than 3 seconds, execute group action 6
;001 161 9
:Switch on output 9
In this example, if switch 20 is pressed for at least 3 seconds, group action 6 is executed. If the switch is pressed for less than 3 seconds, group action 6 will not be executed. In both cases, output 9 will be switched on. We can have circumstance were we prefer that OR group action 6 is executed (when switch 20 is pressed for at least 3 seconds) OR output 9 is switched on (when switch 20 is pressed for less than 3 seconds). We can accomplish this by using instruction 236 as you can see in following example:
;000 208 6
:If switch is pressed for more than 3 seconds, execute group action 6
;001 236 0
:Execute all next instruction when if group 6 action is NOT executed
;002 161 10
:Switch On light 10 (if group 6 is not executed)
;003 236 255
:All next instructions must be executed normally again
Please note that the last instruction (236 255) cannot be left out to avoid the next instruction in the queue not to be executed.
=== Additional Input Values ===
Action Type 247 makes it possible to perform IF THEN ELSE ENDIF functions with temperature values, humidity, light intensity, temperature setpoints and time/day values. This makes it possible to combine different values in a special function. In the below example (that can be put in an input page or in a group page for example), when the minutes of the clock>30 and the current setpoint of thermostat 1<22 degree (system value 108) then toggle output 5 else toggle output 6.
;000 240 0
;001 247 229
:Check Minutes
;002 249 30
;003 240 1
;004 247 97
:Check current setpoint of thermostat 1
;005 250 108
:<108  (108 is system value for 22 degree Celsius)
;006 240 10
;007 162 5
:Toggle output 5
;008 240 20
;009 162 6
:Toggle output 6
;010 240 255
Please make sure to apply the ENDIF instruction otherwise it could happen that all instructions in the queue will be ignored until the ENDIF instruction is received.
=== Important Remarks ===
* CAN control modules have an equal eeprom as in the Master module of the gateway. In order to have the CAN control fully functional (especially all the led function like BA 212, 213, 214 etc), a full synchronization of the eeprom is needed which can take up to 30 minutes of synchronization time. When you're actively programming different functions, this synchronization time can even be higher.

Latest revision as of 16:01, 15 October 2019