Action Types

From OpenMotics
Jump to: navigation, search

This page provides an overview of the action type bytes used in a Basic Action. A Basic Action always has 2 bytes:

  1. the action type
  2. the action number

The Basic Action is used for special functions at input page level, group actions, simple decisions and others.

See Also:


Versioning

This document describes the Action Type Bytes available on the Gateway Module CLI interface.

Gateway Module FW version
3.140.x

Action Type Bytes

Action Byte Description
0
Simple Action (Old instruction set, please do not use anymore)
1
Simple Decision, ignore THEN/ELSE action, ignore previous decision (Old instruction set, please do not use anymore)
2
Execute Group Action
3
Put this Scheduled Action in the scheduled action queue
4
Used by the system (to indicate in the queue which input has triggered the actions in the queue)
7
Remove this Scheduled Action from the Scheduled action queue
9
Simple Decision, perform THEN/ELSE action, ignore previous decision (Old instruction set, please do not use anymore)
17
Simple Decision, ignore THEN/ELSE action, perform "OR" with previous decision (Old instruction set, please do not use anymore)
25
Simple Decision, perform THEN/ELSE action, perform "OR" with previous decision (Old instruction set, please do not use anymore)
49
Simple Decision, ignore THEN/ELSE action, perform "AND" with previous decision (Old instruction set, please do not use anymore)
57
Simple Decision, perform THEN/ELSE action, perform "AND" with previous decision (Old instruction set, please do not use anymore)
60
Will sent Event (API instruction EV) to the Beagle Bone Black and RTI RS232 port (when enabled) with Event Code x
64
x=0 Put all Modules in lower power state (switch off leds except power and status led), x=1 Normal power state, x=2 normal power state for 2 minutes
65
Flash led of output x
66
Flash led of input x
67
Flash led of sensor x
68
Press virtual input x
69
Release virtual input x
70
Switch OFF 5V out off all temperature modules (switch ON 5V will automatically happen after 5 minutes)
71
Switch ON 5V out off all temperature modules
72
Reset 12V out power on the gateway so all remote modules connected on BUS1 of the Gateway will get a power reset (Master will not respond during 5 seconds)
73
Switch ON DALI group x, see DALI Installation Guide for more details
74
Switch OFF DALI group x, see DALI Installation Guide for more details
75
Switch ON CAN power of all CAN controls (micro CAN's will receive power)
76
Switch OFF CAN power of all CAN controls (micro CAN's won't receive any power and will be switched off)
79
This Basic Action will set the CleanTimerQueue setting. When Basic actions are added to the timer queue (for delayed action for example), the Master processor will check for the same Basic actions and remove the previous one. When x=0 -> Clean Timer Queue is disabled, when x<>0 -> Clean Timer Queue is enabled (standard setting) - see #Delaying Instructions and see BA235
80
Sets the Cooling or Heating mode: x=0 -> Heating is enabled and Cooling is disabled, x=1 -> Cooling is enabled (but OFF) and Heating is disabled, x=2 -> Cooling is enabled (and ON) and Heating is disabled
81
Sets or clears the Airco Status Bit (ASB) to switch on/off the Airco unit with RTD-10 function: x<32 -> Switch on the Airco unit with RTD-10 function for thermostat x, x>99 and x<132 -> Switch off the airco unit with RTD-10 function for thermostat x-100.
82
Sets the permanent manual mode for an individual thermostat (heating or Cooling), see Virtual Sensors. x=0 to 31: Set permanent manual mode for Heating thermostat (0-31), x=32 to 63: Set permanent manual mode for Cooling thermostat (0-31).
83
Clears the permanent manual mode for an individual thermostat (heating or Cooling), See Virtual Sensors. x=0 to 31: Clear permanent manual mode for Heating thermostat (0-31), x=32 to 63: Clear permanent manual mode for Cooling thermostat (0-31).
90
Sets Auto mode for thermostat x (x<32) – (Only works in Thermostat Multi Tenant mode)
91
Sets Manual mode for thermostat x (x<32) - (Only works in Thermostat Multi Tenant mode)
100
Roller/Shutter x up (only to be used in Large Installation mode, x<120)
101
Roller/Shutter x down (only to be used in Large Installation mode, x<120)
102
Roller/Shutter x stop (only to be used in Large Installation mode, x<120)
103
Roller/Shutter x up/stop/down/stop... (only to be used in Large Installation mode, x<120)
104
All Roller/Shutters of group x up (only to be used in Large Installation mode, x<30)
105
All Roller/Shutters of group x down (only to be used in Large Installation mode, x<30)
106
All Roller/Shutters of group x stop (only to be used in Large Installation mode, x<30)
107
All Roller/Shutters of group x up/stop/down/stop... (only to be used in Large Installation mode, x<30)
108
Roller/Shutter x up/stop/up/stop... (only to be used in Large Installation mode, x<120)
109
Roller/Shutter x down/stop/down/stop... (only to be used in Large Installation mode, x<120)
110
All Roller/Shutters of group x up/stop/up/stop... (only to be used in Large Installation mode, x<30)
111
All Roller/Shutters of group x down/stop/down/stop... (only to be used in Large Installation mode, x<30)
112
Enable/disable automatic Roller/Shutter STOP timer: When x=0, no Roller/shutter timers will be enabled when moving a roller/shutter up or down. When x>0, standard Roller/shutter timers will be enabled when moving a roller/shutter up or down
113
Enable/disable automatic Roller/Shutter Lock functionality for all Roller/Shutters: When x=0, the roller/shutters will work normally. When x>0, the Roller/shutters will be locked and the normal BA's to stop, up or down a shutter (or group) will be disabled. When a timer was activated to stop a Roller/shutter, even when the automatic Roller/shutter functionality is enabled, will still be executed.
117
Enable input x (0-239)
118
Reset Pulse Counters of all Modules
120
Put free variable x (0-31) at zero
121
Decrease free variable x (0-31) with 1
122
Increase free variable x (0-31) with 1
123
Decrease free variable x (0-31) with 2
124
Increase free variable x (0-31) with 2
125
Decrease free variable x (0-31) with 3
126
Increase free variable x (0-31) with 3
128
Temperature Setpoint 0 for thermostat x (x<32) – Day 1
129
Temperature Setpoint 1 for thermostat x (x<32) – Night
130
Temperature Setpoint 2 for thermostat x (x<32) – Day 2
131
Temperature Setpoint 3 for thermostat x (x<32) - Away
132
Temperature Setpoint 4 for thermostat x (x<32) - Vacation
133
Temperature Setpoint 5 for thermostat x (x<32) - Party
134
Setpoint 0 for all thermostats – Day 1 (Only works in normal mode, not in Thermostat Multi Tenant mode)
135
Setpoint 1 for all thermostats - Night (Only works in normal mode, not in Thermostat Multi Tenant mode)
136
Setpoint 2 for all thermostats – Day 2 (Only works in normal mode, not in Thermostat Multi Tenant mode)
137
Setpoint 3 for all thermostats - Away (Works in normal mode and in Thermostat Multi Tenant mode)
138
Setpoint 4 for all thermostats - Vacation (Works in normal mode and in Thermostat Multi Tenant mode)
139
Setpoint 5 for all thermostats - Party (Works in normal mode and in Thermostat Multi Tenant mode)
140
Set ThermostatMode x (Only used in normal mode or when changing from normal to multi-tenant mode or visa versa, not in Thermostat Multi Tenant mode)
141
Set ThermostatMode for all thermostats to Manual (x=0 -> ThermostatMode.Bit3=0) or automatic (x>0) (Works in normal mode and in Thermostat Multi Tenant mode)
142
decrease current setpoint of thermostat x with 0,5 degree
143
Increase current setpoint of thermostat x with 0,5 degree
144
Reserved (for Oled)
145
"Day 1" Programmed Setpoint of that day for thermostat x – Day 1
146
"Day 2" Programmed Setpoint of that day for thermostat x – Day 2
147
"Night" Programmed Setpoint of that day for thermostat x – Night
148
Set setpoint of thermostat x at 16 degree Celsius
149
Set setpoint of thermostat x at 22.5 degree Celsius
154
Increase light/output level of output/light x with 1 step until programmed Maximum (63) light level is achieved (x<240)
155
Increase light/output level of output/light x with 2 steps until programmed Maximum (63) light level is achieved (x<240)
156
Increase light/output level of output/light x with 3 steps until programmed Maximum (63) light level is achieved (x<240)
157
Dim light/output x down with 1 step until programmed Minimum light level is achieved (x<240)
158
Dim light/output x down with 2 steps until programmed Minimum light level is achieved (x<240)
159
Dim light/output x down with 3 steps until programmed Minimum light level is achieved (x<240)
160
Light/Output x Off (x<240)
161
Light/Output x On (x<240, with standard timer setting, with last dimmer value)
162
Toggle light/Output x (x<240, with standard timer setting, with last dimmer value), see #Toggling Lights
163
All lights off (x=any value but <240)
164
All outputs including lights off (x=any value but <240)
165
Light/Output x On (x<240, with standard timer setting, at minimum dimmer value)
166
Light/Output x On (x<240, with standard timer setting, at maximum dimmer value)
167
Light/Output x On (x<240, with standard timer setting, decrease dimmer value with 5)
168
Light/Output x On (x<240, with standard timer setting, increase dimmer value with 5)
169
Set Dimmer value x at minimum (leaving the output at the current state)
170
Set Dimmer value x at maximum (leaving the output at the current state)
171
All lights OFF of a certain floor level or group (x=floor level or group, x=0..254, when x=255 then all lights are selected)
172
All lights ON of a certain floor level or group (x=floor level or group, x=0..254, when x=255 then all lights are selected)
173
Toggle all lights of a certain floor or group (x=floor level or group, x=0..254, when x=255 then all lights are selected), see #Toggling a Floor
174
Toggle Follow function ON (see #Toggling Lights), action number not used but must be < 240
175
Toggle Follow function OFF (see #Toggling Lights), action number not used but must be < 240
176
Light/Output x On with dimmer at 10% (x<240, with standard timer setting)
177
Light/Output x On with dimmer at 20% (x<240, with standard timer setting)
178
Light/Output x On with dimmer at 30% (x<240, with standard timer setting)
179
Light/Output x On with dimmer at 40% (x<240, with standard timer setting)
180
Light/Output x On with dimmer at 50% (x<240, with standard timer setting)
181
Light/Output x On with dimmer at 60% (x<240, with standard timer setting)
182
Light/Output x On with dimmer at 70% (x<240, with standard timer setting)
183
Light/Output x On with dimmer at 80% (x<240, with standard timer setting)
184
Light/Output x On with dimmer at 90% (x<240, with standard timer setting)
185
Toggle/Output light x with dimmer at 10% (x<240, with standard timer setting)
186
Toggle light/Output x with dimmer at 20% (x<240, with standard timer setting)
187
Toggle light/Output x with dimmer at 30% (x<240, with standard timer setting)
188
Toggle light/Output x with dimmer at 40% (x<240, with standard timer setting)
189
Toggle light/Output x with dimmer at 50% (x<240, with standard timer setting)
190
Toggle light/Output x with dimmer at 60% (x<240, with standard timer setting)
191
Toggle light/Output x with dimmer at 70% (x<240, with standard timer setting)
192
Toggle light/Output x with dimmer at 80% (x<240, with standard timer setting)
193
Toggle light/Output x with dimmer at 90% (x<240, with standard timer setting)
194
Toggle light/Output x with dimmer at 100% (x<240, with standard timer setting)
195
Light/Output x on with timer at 2 min 30 and overrule timer value when light is already switched on (x<240, with last dimmer value) - see #Timers
196
Light/Output x on with timer at 7 min 30 and overrule timer value when light is already switched on (x<240, with last dimmer value) - see #Timers
197
Light/Output x on with timer at 15 min and overrule timer value when light is already switched on (x<240, with last dimmer value) - see #Timers
198
Light/Output x on with timer at 25 min and overrule timer value when light is already switched on (x<240, with last dimmer value) - see #Timers
199
Light/Output x on with timer at 37 min and overrule timer value when light is already switched on (x<240, with last dimmer value) - see #Timers
200
Light/Output x on with timer at 52 min and overrule timer value when light is already switched on (x<240, with last dimmer value) - see #Timers
201
Light/Output x on with timer at 2 min 30 but doesn't overrule timer value when light is already switched on (x<240, with last dimmer value)
202
Light/Output x on with timer at 7 min 30 but doesn't overrule timer value when light is already switched on (x<240, with last dimmer value)
203
Light/Output x on with timer at 15 min but doesn't overrule timer value when light is already switched on (x<240, with last dimmer value)
204
Light/Output x on with timer at 25 min but doesn't overrule timer value when light is already switched on (x<240, with last dimmer value)
205
Light/Output x on with timer at 37 min but doesn't overrule timer value when light is already switched on (x<240, with last dimmer value)
206
Light/Output x on with timer at 52 min but doesn't overrule timer value when light is already switched on (x<240, with last dimmer value)
207
When current input is pressed for more than 2 seconds, execute group action x (See #Long Press)
208
When current input is pressed for more than 3 seconds, execute group action x (See #Long Press)
209
When current input is pressed for more than 4 seconds, execute group action x (See #Long Press)
210
When current input is pressed for more than 5 seconds, execute group action x (See #Long Press)
211
When current input is pressed for more than 6 seconds, execute group action x (See Note "Long Press")
212
Switch CAN led x OFF (see #Important Remarks)
213
Switch CAN led x ON (see #Important Remarks)
214
Fast blinking of CAN led x (see #Important Remarks)
215
Medium blinking of CAN led x (see #Important Remarks)
216
Slow blinking of CAN led x (see #Important Remarks)
217
Fade ON/OFF of CAN led x (see #Important Remarks)
218
Set minimum brightness of all CAN leds at value x (see #Important Remarks)
219
Set maximum brightness of all CAN leds at value x (see #Important Remarks)
232
Set Oled Display Time out (x=1 to 255) -> Timeout in seconds = x.1,2s. If x=0 then DisplayTimeout=255
233
Enable/Disable Touchscreen of Remote Oled screens (disabled when x=0, enabled when x>0)
234
Switch Remote Oled screens On (when x>=1) or Off (when x=0)
235
Delay all next instructions with x seconds (x>0 and <249), x=255 -> All next instruction will be executed normally (see #Delaying Instructions and see BA79)
236
Execute all next actions at button release (x=0), x=255 -> All next instructions will be executed normally (see #Additional Actions)
237
Set the freely assigned validation bit x to 1 (x=0 to 255)
238
Set the freely assigned validation bit x to 0 (x=0 to 255)
239
Toggle the freely assigned validation bit x (x=0 to 255)
240
IF THEN ELSE ENDIF (X=0 -> IF, X=1 -> AND, X=2 -> OR, X=3 -> XOR, X=4 -> NAND, X=5 -> NOR, X=6 -> NXOR, X=10 -> THEN, X=20 -> ELSE, X=255 -> ENDIF (See #If Then Else EndIf)
241
Check if input x is ON (To be used with IF THEN ELSE instruction)
242
Check if input x is OFF (To be used with IF THEN ELSE instruction)
243
Check if Light/Output x is ON (To be used with IF THEN ELSE instruction)
244
Check if Light/Output x is OFF (To be used with IF THEN ELSE instruction)
245
Check if Validation bit x is ON (To be used with IF THEN ELSE instruction)
246
Check if Validation bit x is OFF (To be used with IF THEN ELSE instruction)
247
Check if temperature sensor 0-31 (x=0-31) or if humidity sensor 0-31 (x=32-63) or if light sensor 0-31 (x=64-95) or if temperature setpoint 0-23 (x=96-119) or if free variable 0-31 (x=128-159) or if time hour (x=228) or if time minute (x=229) or if day (x=230) is or if thermostat mode (x=235)… (always to be followed by action type 248 or 249 or 250) (see #Additional Input Values). All environmental parameters are written in System Value
248
is equal to x (to be used always with action type 247) (see #Additional Input Values)
249
is higher than x (to be used always with action type 247) (see #Additional Input Values)
250
is lower than x (to be used always with action type 247) (see #Additional Input Values)
254
Reset the Master

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
IF
001 243 5
Output 5 is ON?
002 240 2
OR
003 242 8
Input 8 is OFF?
004 240 10
THEN
005 161 4
Light 4 OFF
006 240 20
ELSE
007 160 4
Light 4 ON
008 240 255
ENDIF

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
IF
001 247 229
Check Minutes
002 249 30
>30
003 240 1
AND
004 247 97
Check current setpoint of thermostat 1
005 250 108
<108 (108 is system value for 22 degree Celsius)
006 240 10
THEN
007 162 5
Toggle output 5
008 240 20
ELSE
009 162 6
Toggle output 6
010 240 255
ENDIF

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.