Difference between revisions of "CLI Reference Guide AIO"

From OpenMotics
Jump to navigation Jump to search
Line 957: Line 957:
 
====group start list====
 
====group start list====
  
This instruction will list all the start addresses of each group action.
+
:''This instruction will list all the start addresses of each group action.''
 +
 
 +
:;Returns
 +
:: List of all start addresses of each group action
 +
::<code>OK</code>
 +
 
 +
Example:
 +
 
 +
:;Instruction:
 +
::<code>group start list</code>
 +
 
 +
:;Returns
 +
-Group nr---BA Start--BA Stop-----Name---------
 +
::<code>  000      0000      0022  ->  test</code>
 +
::<code>  001      0023      0029  -></code>
 +
::<code>  002      0030      0034  -></code>
 +
::<code>  003      0035      0041  -></code>
 +
::<code>  004      0042      0061  -></code>
 +
::<code>  005      0062      ----  -></code>
 +
::<code>  006      ----      ----  -></code>
 +
::<code>  007      ----      ----  -></code>
 +
::<code>  008      ----      ----  -></code>
 +
::<code>  009      ----      ----  -></code>
 +
::<code>  010      ----      ----  -></code>
 +
::<code>  011      ----      ----  -></code>
 +
::<code>  012      ----      ----  -></code>
 +
::<code>  013      ----      ----  -></code>
 +
::<code>  014      ----      ----  -></code>
 +
::<code>  015      ----      ----  -></code>
 +
::<code>  016      ----      ----  -></code>
 +
::<code>  017      ----      ----  -></code>
 +
::<code>  018      ----      ----  -></code>
 +
::<code>  019      ----      ----  -></code>
 +
::<code>  020      ----      ----  -></code>
 +
::<code>  ...</code>
 +
::<code>OK</code>
  
 
----
 
----

Revision as of 16:10, 31 March 2019

The Gateway has 2 computer systems built-in: A Master Controller (Microchip DSPIC33) and a Gateway Controller (Linux Based Beagle Bone). The Master controller is connected with the Gateway Controller over RS232. The Master Controller has a built-in CLI interface allowing the user to configure and control the Master controller to his full extend.

This CLI can be accessed by using the Maintenance function in the OpenMotics cloud or by using a RS232 TTL cable (Baud rate 115200, 8 databits, no parity, 1 stop bit, no flow control) that is connected directly on the Gateway on the extern RS232 connector.

Possible modes of communication:

  • Advanced Mode: API (The Master controller and Gateway controller will use Advanced mode to communicate)
  • Simple Mode: CLI (Simple Mode will be used by Maintenance mode in the cloud or when a direct RS232 connection is established)

The advantages of the AIO (All In One) design is that API and CLI mode can be used simultaneously (on 2 different UART ports).

Contents

Notes

  1. In CLI mode, characters sent through RS232 can be echoed. In API mode they are never echoed.
  2. Instructions are case sensitive.
  3. As opposed to API mode, CLI mode has a variable instruction length.
  4. Every instruction must be followed by a Carriage return (<CR>, DEC 13).
  5. Every successful instruction will return the requested information (or perform requested action) followed by OK, otherwise ERROR is returned (wrong format, wrong parameters,…). All error codes are listed in the Error Codes AIO section.
  6. An instruction will only be executed if the Master has responded with “OK”

Notation

Instruction [required parameter] {optional parameter}

Instruction description.

[param]
Parameter description


Returns
[return value]

Versioning

This document describes the available CLI commands available on the All In One CLI interface. The All In One module is not yet available and not yet in production so please use CLI Reference Guide used in the current gateway.

Gateway Module FW version
NOT IN PRODUCTION V0.03

Instruction Set

General instructions

?

This instruction will list all available CLI instructions
Returns
The full list of CLI instructions

??

This instruction will list all available Basic Actions
Returns
The full list of Basic Actions

time read

This instruction will read the time of the internal Real Time Clock.
Returns
The time
OK

Example:

Instruction
time read
Returns
20:13:19
OK

time write [hours][minutes][seconds]

This instruction will write the time in the Real Time Chip
[hours]
Value 0 to 23
[minutes]
Value 0 to 59
[seconds]
Value 0 to 99
Returns
OK

Example:

Instruction
time write 19 25 57
Returns
OK

date read

This instruction will read the date of the internal Real Time Clock.
Returns
The date
OK

Example:

Instruction
date read
Returns
2 25-12-18
OK

date write [day of the week][day][month][year]

This instruction will write the date in the Real Time Chip
[day of the week]
Value 1 to 7 represents Monday to Sunday.
[day]
Value 1 to 31, day of the month.
[month]
Value 1 to 12
[year]
Value 0 to 99
Returns
OK

Example:

Instruction
date write 2 25 12 18
Returns
OK

error list

This instruction will list all configured modules, their ID's, the number off errors on this module and the status of each module (Good, Degraded1, Degraded2, Degraded3, Offline, Forced Offline)
Returns
    Output------------ID---------Err---Suc/Fail------Status-------
00 (o 000->007) 111.000.000.000 00000 (000/000)   GOOD       (000)
01 (o 008->015) 111.000.000.001 00000 (000/000)   GOOD       (000)
02 (o 016->023) 111.000.000.002 00000 (000/000)   GOOD       (000)
     Input-------------ID---------Err---Suc/Fail------Status-------
00 (i 000->007) 105.000.000.000 00000 (000/000)   GOOD       (000)
01 (i 008->015) 105.000.000.001 00000 (000/000)   GOOD       (000)
02 (i 016->023) 105.000.000.002 00000 (000/000)   GOOD       (000)
03 (b 024->031) 098.000.000.003 00000 (000/000)   GOOD       (000)
     Sensor------------ID---------Err---Suc/Fail------Status-------
00 (s 000->007) 115.000.000.000 00000 (000/000)   GOOD       (000)

error clear

This instruction will delete all the errors and will start communicating again with the RS485 modules at the normal pace
Returns
OK

Example:

Instruction
error clear
Returns
OK

register list

This instruction will list all processor registers and the present values
Returns
Register---Value--|--Register---Value--|--Register---Value--|--Register---Value--
C1CTRL1    00000  |  C2CTRL1    01152  |  C1EC       00002  |  C2EC       00000
C1CTRL2    00000  |  C2CTRL2    00000  |  C1CFG1     00087  |  C2CFG1     00000
C1VEC      00064  |  C2VEC      00064  |  C1CFG2     00658  |  C2CFG2     00000
C1FCTRL    16385  |  C2FCTRL    00000  |  C1TR01CON  00128  |  C2TR01CON  00000
C1FIFO     00257  |  C2FIFO     00000  |  C1TR23CON  00000  |  C2TR23CON  00000
C1INTF     00128  |  C2INTF     00000  |  C1TR45CON  00000  |  C2TR45CON  00000
C1INTE     00003  |  C2INTE     00000  |  C1TR67CON  00000  |  C2TR67CON  00000
C1RXFUL1   00000  |  C2RXFUL1   00000  |  C1RXFUL2   00000  |  C2RXFUL2   00000
C1RXOVF1   00000  |  C2RXOVF1   00000  |  C1RXOVF2   00000  |  C2RXOVF2   00000
U1MODE     32776  |  U2MODE     32776  |  U3MODE     32776  |  U4MODE     32776
U1STA      01040  |  U2STA      01296  |  U3STA      01296  |  U4STA      01284
U1BRG      00130  |  U2BRG      00130  |  U3BRG      00130  |  U4BRG      00130
IFS0       16400  |  IFS1       00000  |  IFS2       00004  |  IFS3       00000
IFS4       00064  |  IFS5       00130  |  IFS6       00000  |  IFS8       00000
IFS9       00000  |  IEC0       06280  |  IEC1       49154  |  IEC2       00008
IEC3       00004  |  IEC4       00000  |  IEC5       00780  |  IEC6       00000
IEC8       00000  |  IEC9       00000  |  IPC0       17476  |  IPC1       17476
IPC2       17476  |  IPC3       01090  |  IPC4       17476  |  IPC5       17476
IPC6       17476  |  IPC7       09284  |  IPC8       17476  |  IPC9       17476
IPC10      17476  |  IPC11      16452  |  IPC12      17476  |  IPC13      17476
IPC14      17476  |  IPC15      01028  |  IPC16      17472  |  IPC18      16448
IPC19      00064  |  IPC20      09280  |  IPC21      16384  |  IPC22      17444
IPC23      17408  |  IPC24      17476  |  IPC35      17408  |  IPC36      17472
IPC36      17472  |  IPC37      01092  |  INTTREG    00532  |  T1CON      32768
T2CON      00000  |  T3CON      00000  |  T4CON      00000  |  T5CON      00000
T6CON      00000  |  T7CON      00000  |  T8CON      00000  |  T9CON      00000
I2C1CON    36896  |  I2C2CON    36896  |  I2C1STAT   00016  |  I2C2STAT   00016
INTCON1    00000  |  INTCON2    32768  |  INTCON3    00000  |  INTCON4    00000
OSCCON     13088  |  CLKDIV     12288  |  PLLFBD     00058  |  REFOCON    00000
RCON       00131  |  PORTA      01280  |  PORTB      05136  |  PORTC      00832
PORTD      00064  |  PORTE      00000  |  PORTF      00067  |  PORTG      00003



state machine list

This instruction will list all main state machines with the last, the minimum and maximum execution time
Returns
 #----Last----Min-----Max------Description------------------
00 03 00004ms 00002ms 01402ms  UART1 receive
01 00 00000ms 00000ms 00000ms  UART2 receive
02 00 00000ms 00000ms 00000ms  UART3 receive
03 01 00000ms 00000ms 00000ms  UART4 receive
04 00 00061ms 00001ms 00238ms  I2C1
05 00 00002ms 00001ms 00052ms  I2C2
06 02 00205ms 00202ms 00258ms  Update Time/Date
07 00 00001ms 00001ms 00016ms  Immediate Queue
08 00 00002ms 00002ms 00006ms  Timer 100ms
09 00 00001ms 00001ms 00005ms  Timer 1 second
10 00 00005ms 00001ms 00005ms  Timer 1 minute
11 00 15444ms 15444ms 15444ms  Perform eeprom activate
12 01 00387ms 00116ms 00822ms  CLI print text
13 00 00000ms 00000ms 00000ms  CLI action execute
14 05 00001ms 00001ms 00016ms  Scan modules over RS485 network
15 00 00035ms 00001ms 00063ms  RS485 modules health status check
16 00 00001ms 00001ms 00003ms  Check Error, print, store in FRAM
17 00 00001ms 00001ms 00024ms  Check input queue and actions
18 00 00000ms 00000ms 00000ms  Check input delay queue and actions
19 00 01391ms 01391ms 01391ms  CLI print registers
20 00 00002ms 00002ms 00010ms  Check CAN1 RX queue
21 00 00013ms 00001ms 00069ms  Check CAN1 TX queue
22 00 00000ms 00000ms 00000ms  Check hardware health
23 00 00000ms 00000ms 00000ms  Check leds
24 00 00001ms 00001ms 00084ms  Check internal outputs
25 00 00002ms 00001ms 00009ms  Check internal inputs
26 00 00000ms 00000ms 00000ms  Execute Group Action
27 00 00002ms 00001ms 00004ms  Execute list of actions every minute



Input instructions

input link read [input nr]

This instruction will read, for an input, which output or action is linked to it.
[input nr]
Indicates which input that the link has to be read.
Returns
output nr or link
OK

Example:

Instruction
input link read 15
Returns
12
OK

input link write [input nr][output link nr]

This instruction will write, for an input, which output or action is linked to it.
[input nr]
Indicates which input that the link has to be written.
Returns
OK

Example: Link input 15 with output 12

Instruction
input link write 15 12
Returns
OK

input list

This instruction will display the list of inputs, the status (0-> release state, 1-> press state), the link (is an action configured or an output linked) and the name of each input
Returns
The input list

input release [input nr]

Switch input to release state for virtual modules.
[input nr]
Indicates which input that needs to be put in release state, a maximum of 480 (0 - 479) inputs can be used.
Returns
OK

Example:

Instruction
input release 28
Returns
OK

input press [input nr]

Switch input to press state for virtual modules.
[input nr]
Indicates which input that needs to be put in press state, a maximum of 480 (0 - 479) inputs can be used.
Returns
OK

Example:

Instruction
input press 28
Returns
OK

input name write [input nr][input name]

Write the name of an input, max 16 characters.
[input nr]
Indicates which input the name has to be written.
[input name]
the ascii name of the input (maximum 16 characters).
Returns
OK

Example:

Instruction
input name write 28 Bedroom parents
Returns
OK

input name read [input nr]

Read the name of an input
[input nr]
Indicates which input the name has to be displayed.
Returns
Input Name
OK

Example:

Instruction
input name read 28
Returns
Bedroom Parents
OK

input number modules read

Read the number of input modules that are programmed and active
Returns
Number Of Input Modules
OK

Example:

Instruction
input number modules read
Returns
6
OK

input number modules write [number of input modules]

Writes the number of input modules that are programmed and active. This instruction will, after the write is performed, activate the instruction eeprom activate so all values from eeprom are read and copied in RAM
[number of input modules]
Indicates the number of input modules that are active and programmed.
Returns
OK

Example:

Instruction
input number modules write 7
Returns
OK

Output instructions

output list

This instruction will display the list of outputs, the status (On or Off), the dim value, the configured timer value, the timer type (Off, , 100ms timer, 1s timer or 1m timer) and the name of each output
Returns
The output list

output on [output nr] [dimmer value*] [timer value*]

Switch ON an output. * are optional values
[output nr]
Indicates which output that needs to be switched ON, a maximum of 480 (0 - 479) outputs can be used.
[dimmer value*]
Optional parameter to set the dimmer value (0-255)
[timer value*]
Optional parameter to set the timer value (0-65535s)
Returns
OK

Examples:

Instruction
output on 127
will switch ON output 127.
Returns
OK
Instruction
output on 127 56
will switch ON output 127 with dimmer value 56.
Returns
OK
Instruction
output on 127 56 3600
will switch ON output 127 with dimmer value 56 for 3600 seconds.
Returns
OK

output off [output nr]

Switch OFF an output.
[output nr]
Indicates which output that needs to be switched OFF, a maximum of 480 (0 - 479) outputs can be used.
Returns
OK

Example:

Instruction
output off 127 will switch OFF output 127.
Returns
OK

output name write [output nr][output name]

Write the name of an output, max 16 characters.
[input nr]
Indicates which output the name has to be written.
[output name]
the ascii name of the output (maximum 16 characters).
Returns
OK

Example:

Instruction
output name write 24 Bedroom 4
Returns
OK

output name read [output nr]

Read the name of an output
[output nr]
Indicates which output the name has to be displayed.
Returns
output Name
OK

Example:

Instruction
output name read 24
Returns
Bedroom 4
OK

output number modules read

Read the number of output modules that are programmed and active
Returns
Number Of Output Modules
OK

Example:

Instruction
output number modules read
Returns
6
OK

output number modules write [number of output modules]

Writes the number of output modules that are programmed and active. This instruction will, after the write is performed, activate the instruction eeprom activate so all values from eeprom are read and copied in RAM
[number of output modules]
Indicates the number of output modules that are active and programmed.
Returns
OK

Example:

Instruction
output number modules write 7
Returns
OK

Sensor instructions

sensor list

This instruction will display the list of sensors, the temperature, the humidity, the brightness and the name of each sensor
Returns
The input list

sensor name write [sensor nr][sensor name]

Write the name of a sensor, max 16 characters.
[sensor nr]
Indicates which sensor the name has to be written.
[sensor name]
the ascii name of the sensor (maximum 16 characters).
Returns
OK

Example:

Instruction
sensor name write 12 Bedroom 1
Returns
OK

sensor name read [sensor nr]

Read the name of a sensor
[sensor nr]
Indicates which sensor the name has to be displayed.
Returns
Sensor Name
OK

Example:

Instruction
sensor name read 12
Returns
Bedroom 1
OK

sensor number modules read

Read the number of sensor modules that are programmed and active
Returns
Number Of Sensor Modules
OK

Example:

Instruction
sensor number modules read
Returns
6
OK

sensor number modules write [number of sensor modules]

Writes the number of sensor modules that are programmed and active. This instruction will, after the write is performed, activate the instruction eeprom activate so all values from eeprom are read and copied in RAM
[number of sensor modules]
Indicates the number of sensor modules that are active and programmed.
Returns
OK

Example:

Instruction
sensor number modules write 7
Returns
OK

CAN module instructions

eeprom can list

This instruction will display the list of all the CAN modules that has been programmed in the master. Following information will be returned:
* Nr: Line Nr and order in which the module has been programmed
* ID: The unique ID (ID2,ID1&ID0) of the programmed micro CAN
* Inp.link0..5: This will indicate, for the 6 inputs a micro CAN has, the link to the system input. The value between brackets is the internal input CAN numbering
* Tem.link0..1: This will indicate, for the 2 sensors a micro CAN can have, the link to the system sensor number. The value between brackets is the internal sensor CAN numbering
When 255 is used for input or sensor link means that the sensor is not in use or the input is not configured
Returns
Nr-ID2.ID1.ID0--Inp.link0-Inp.link1-Inp.link2-Inp.link3-Inp.link4-Inp.link5-Tem.link0-Tem.link1
00 140.162.190  024(000)  255(255)  255(255)  255(255)  255(255)  255(255)  000(000)  255(255)
01 062.063.159  255(255)  255(255)  255(255)  255(255)  255(255)  025(001)  001(001)  255(255)
02 075.144.045  026(002)  255(255)  255(255)  255(255)  255(255)  255(255)  255(255)  002(002)
03 140.151.125  255(255)  027(003)  255(255)  255(255)  028(004)  255(255)  003(003)  004(004)

ping can list

This instruction will ping all the programmed micro CAN modules and list the response of all the CAN modules including the configuration that has been saved in the eeprom of those modules. Following information will be returned:
* Nr: Line Nr and order in which the module has been programmed
* ID: The unique ID (ID2,ID1&ID0) of the programmed micro CAN. This information is retrieved from the eeprom of the master
* Inp.link0..5: This is the response of the micro CAN that indicates, for the 6 inputs a micro CAN has, the link to the system input. The value between brackets is the internal input CAN numbering
* Tem.link0..1: This is the response of the micro CAN that indicates, for the 2 sensors a micro CAN can have, the link to the system sensor number. The value between brackets is the internal sensor CAN numbering
* Type: This will indicate the type of sensor that is connected:
** 0: Sensor of the DS1820 family is connected on the first output
** 1: Sensor of the DS1820 family is connected on the second output
** 2: 2 sensors of the DS1820 family are connected (on both outputs)
** 3: Honeywell Temp/humidity Sensor is connected
** 4: TSL2561 LUX sensor is connected
** 5: Honeywell Temp/humidity Sensor & TSL2561 LUX sensor are connected
** 255: No sensors are currently connected
* Firmware: This gives the firmware version that is loaded on the micro CAN module
* Delay: This value will indicate the delay between the message that has been sent to the micro CAN module and the 6 received messages from the micro CAN with the configuration.
When 255 is used for input or sensor link means that the sensor is not in use or the input is not configured. When NA is returned, the sensor is not responding.
Returns
Nr-ID2.ID1.ID0--Inp.link0-Inp.link1-Inp.link2-Inp.link3-Inp.link4-Inp.link5-Tem.link0-Tem.link1-Type-Firmware-delay--
00 140.162.190  024(000)  255(255)  255(255)  255(255)  255(255)  255(255)  000(000)  255(255)  004  F2.0.10  010ms
01 062.063.159  255(255)  255(255)  255(255)  255(255)  255(255)  025(001)  001(001)  255(255)  000  F2.0.10  011ms
02 075.144.045  026(002)  255(255)  255(255)  255(255)  255(255)  255(255)  255(255)  002(002)  001  F2.0.10  023ms
03 140.151.125  255(255)  027(003)  255(255)  255(255)  028(004)  255(255)  003(003)  004(004)  002  F2.0.10  065ms



can config delete

This instruction will perform a factory reset of the CAN config in the master as well as in the micro CAN slaves. After this instruction, the micro CAN config is deleted from the eeprom of the master and the micro CAN slaves.
Returns
can config delete
OK

Example:

Instruction
can config delete
Returns
OK

can module number read

Read the number of CAN modules that are programmed and active
Returns
Number Of CAN Modules
OK

Example:

Instruction
can module number read
Returns
6
OK

can module number write [number of CAN modules]

Writes the number of CAN modules that are programmed and active. This instruction will, after the write is performed, activate the instruction eeprom activate so all values from eeprom are read and copied in RAM
[number of CAN modules]
Indicates the number of CAN modules that are active and programmed.
Returns
OK

Example:

Instruction
can module number write 7
Returns
OK

can input number read

Read the number of CAN inputs that are programmed and active
Returns
Number Of CAN inputs
OK

Example:

Instruction
can input number read
Returns
12
OK

can input number write [number of CAN inputs]

Writes the number of CAN inputs that are programmed and active. This instruction will, after the write is performed, activate the instruction eeprom activate so all values from eeprom are read and copied in RAM
[number of CAN inputs]
Indicates the number of CAN inputs that are active and programmed.
Returns
OK

Example:

Instruction
can input number write 13
Returns
OK

can sensor number read

Read the number of CAN sensors that are programmed and active
Returns
Number Of CAN sensors
OK

Example:

Instruction
can sensor number read
Returns
4
OK

can sensor number write [number of CAN sensors]

Writes the number of CAN sensors that are programmed and active. This instruction will, after the write is performed, activate the instruction eeprom activate so all values from eeprom are read and copied in RAM
[number of CAN inputs]
Indicates the number of CAN sensors that are active and programmed.
Returns
OK

Example:

Instruction
can sensor number write 6
Returns
OK

GROUP instructions

A group action is composed of multiple actions that can be executed. Each group action can call other group actions. Group actions can be nested up to 16 levels deep, if you go deeper, those group actions will be ignored. IF THEN ENDIF instructions used inside a group can be nested as well up to 16 levels deep. The most easy way, when nested group actions including IF THEN ENDIF instructions are used is to use the CLI instruction "group simulate" which gives you a CLI representation of the result of a group action with the included nested group actions (if any).

A group action doesn't have a fixed length, the length and thus the number of group action can be defined at creation. In total, 4200 (BA0 to BA4199) actions can be placed in 254 (0-253) different groups. Each group has a start address, the start address of the next group action defines the end address of the previous one.

Start address (and thus end addresses) can be changed even when a group has been programmed. The start addresses will just determine which group actions are linked to a group action number.

Example: Start address of group 5 is BA55 en start address of group 6 is BA72 then group 5 contains BA55-BA71.


group list

This instruction will display the list of all programmed group actions (group actions with a valid begin and end address) with their name.
Returns
List of programmed group actions
OK

Example:

Instruction
group list
Returns
-Group---------Name---------
000 -> test
001 ->
002 ->
003 ->
004 ->
139 ->
167 ->
170 ->
173 ->
176 ->
179 ->
182 ->
185 ->
188 ->
OK

group name read [group nr]

This instruction will read the name of a group action.
Returns
name of group action
OK

Example:

Instruction
group name read 0
Returns
test
OK

group name write [group nr] [group name]

This instruction will program the name of group action.
Returns
OK

Example:

Instruction
group name write 0 test
Returns
OK

group start list

This instruction will list all the start addresses of each group action.
Returns
List of all start addresses of each group action
OK

Example:

Instruction
group start list
Returns

-Group nr---BA Start--BA Stop-----Name---------

000 0000 0022 -> test
001 0023 0029 ->
002 0030 0034 ->
003 0035 0041 ->
004 0042 0061 ->
005 0062 ---- ->
006 ---- ---- ->
007 ---- ---- ->
008 ---- ---- ->
009 ---- ---- ->
010 ---- ---- ->
011 ---- ---- ->
012 ---- ---- ->
013 ---- ---- ->
014 ---- ---- ->
015 ---- ---- ->
016 ---- ---- ->
017 ---- ---- ->
018 ---- ---- ->
019 ---- ---- ->
020 ---- ---- ->
...
OK

group start write [group nr] [ba nr]

This instruction will write the start address of group nr x. To have also an end address, the start address of group nr x+1 needs to be written as well.
Returns
OK

Example: write start address BA35 of group nr 5

Instruction
group start write 5 35
Returns
OK

group read [group nr]

This instruction will read a group action and display all BA's that this group action contains.
Returns
OK

Example:

Instruction
group read 0
Returns
-Grp--BA Nr---Typ-Act--x--(MSB.LSB)--y--(MSB.LSB)-------BA Description----
000 0000(00) 000 007 00013(000.013) 00000(000.000) -> Output 13 ON and only overrule timer with value 0 (0x1s) when output is not yet on
000 0001(01) 000 016 00005(000.005) 00000(000.000) -> Toggle output 5 with std timer/dimmer
000 0002(02) 000 004 00011(000.011) 00020(000.020) -> Output 11 ON and overrule timer with value 20 (20x1s)
000 0003(03) 100 000 00000(000.000) 00000(000.000) -> IF
000 0004(04) 100 010 00012(000.012) 00000(000.000) -> Output 12 is ON
000 0005(05) 100 150 00000(000.000) 00000(000.000) -> THEN
000 0006(06) 000 001 00005(000.005) 00000(000.000) -> Output 5 ON with std timer/dimmer
000 0007(07) 100 200 00000(000.000) 00000(000.000) -> ELSE
000 0008(08) 019 000 00001(000.001) 00000(000.000) -> Execute Group Action 1
000 0009(09) 100 255 00000(000.000) 00000(000.000) -> ENDIF
000 0010(10) 000 016 00015(000.015) 00000(000.000) -> Toggle output 15 with std timer/dimmer
000 0011(11) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0012(12) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0013(13) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0014(14) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0015(15) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0016(16) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0017(17) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0018(18) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0019(19) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0020(20) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0021(21) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
000 0022(22) 255 255 65535(255.255) 65535(255.255) -> Instruction not in use
OK

group ba write [ba nr] [Type] [Action] [Device Nr] [Extra parameter]

This instruction will write the Basic Action (Type, Action, Device Nr & Extra Parameter) of BA nr. for a list of the different BA types that can be used, see Action Types AIO.
Returns
OK

Example: write BA 35 with instruction output 17 off

Instruction
group ba write 35 0 0 17 0
Returns
OK

group simulate [group nr]

This instruction will simulate the result of a group action including nested group actions. Below is an example of 4 nested group actions. As you can see in the below example, abstraction is made of the different group action and everything is represented in one consolidated view.
Returns
Consolidated view of the group action
OK

Example:

Instruction
group simulate 0
Returns
15:15:23 BA 000 007 00013(000.013) 00000(000.000) EXEC SIM -> Output 13 ON and only overrule timer with value 0 (0x1s) when output is not yet on
15:15:23 BA 000 016 00005(000.005) 00000(000.000) EXEC SIM -> Toggle output 5 with std timer/dimmer
15:15:23 BA 000 004 00011(000.011) 00020(000.020) EXEC SIM -> Output 11 ON and overrule timer with value 20 (20x1s)
15:15:23 BA 100 000 00000(000.000) 00000(000.000) IF
15:15:23 BA 100 010 00012(000.012) 00000(000.000) Output 12 is ON
15:15:24 BA 100 150 00000(000.000) 00000(000.000) THEN
15:15:24 BA 000 001 00005(000.005) 00000(000.000) SKIP INSTR Output 5 ON with std timer/dimmer
15:15:24 BA 100 200 00000(000.000) 00000(000.000) ELSE
15:15:24 BA 000 001 00004(000.004) 00000(000.000) EXEC SIM -> Output 4 ON with std timer/dimmer
15:15:24 BA 100 000 00000(000.000) 00000(000.000) IF
15:15:24 BA 100 011 00013(000.013) 00000(000.000) Output 13 is OFF
15:15:24 BA 100 150 00000(000.000) 00000(000.000) THEN
15:15:24 BA 100 000 00000(000.000) 00000(000.000) IF
15:15:24 BA 100 010 00014(000.014) 00000(000.000) Output 14 is ON
15:15:24 BA 100 150 00000(000.000) 00000(000.000) THEN
15:15:24 BA 100 000 00000(000.000) 00000(000.000) IF
15:15:24 BA 100 010 00007(000.007) 00000(000.000) Output 7 is ON
15:15:24 BA 100 090 00000(000.000) 00000(000.000) AND
15:15:24 BA 100 011 00008(000.008) 00000(000.000) Output 8 is OFF
15:15:24 BA 100 150 00000(000.000) 00000(000.000) THEN
15:15:24 BA 000 255 00255(000.255) 00000(000.000) SKIP INSTR Switch OFF all Outputs(x=0), Lights(x=1) or Lights&Outputs(x>1)
15:15:24 BA 100 200 00000(000.000) 00000(000.000) ELSE
15:15:24 BA 000 001 00010(000.010) 00000(000.000) EXEC SIM -> Output 10 ON with std timer/dimmer
15:15:24 BA 000 001 00009(000.009) 00000(000.000) EXEC SIM -> Output 9 ON with std timer/dimmer
15:15:24 BA 100 255 00000(000.000) 00000(000.000) ENDIF
15:15:24 BA 100 200 00000(000.000) 00000(000.000) ELSE
15:15:24 BA 000 001 00003(000.003) 00000(000.000) SKIP INSTR Output 3 ON with std timer/dimmer
15:15:24 BA 100 255 00000(000.000) 00000(000.000) ENDIF
15:15:24 BA 100 255 00000(000.000) 00000(000.000) ENDIF
15:15:24 BA 000 000 00020(000.020) 00000(000.000) EXEC SIM -> Output 20 OFF
15:15:24 BA 100 255 00000(000.000) 00000(000.000) ENDIF
15:15:25 BA 000 016 00015(000.015) 00000(000.000) EXEC SIM -> Toggle output 15 with std timer/dimmer
Some remarks:
- SKIP INSTR: This instruction in the consolidated group view will not be executed when running in execution mode ("group activate") due to the conditions being set (IF THEN ENDIF)
- EXEC SIM: This instruction will be executed when the group will be running in execution mode

group activate [group nr]

This instruction will execute a group action (execution mode). If you want to see what's happening during execution, you can activate verbose mode by using instruction "basic action debug on". Please note that the instruction "basic action debug on" can slow down the processor due to more console printing that needs to be done.
Returns
OK

Example:

Instruction
group activate 5
Returns
OK