Action Types AIO

From OpenMotics
Jump to: navigation, search

This page provides an overview of the action type bytes used in the All In One design.

This only works for the All In One design which is not in production yet and is in full development. Please discard this page and use Action Types instead.

A Basic Action always has 4 values:

  1. the action type (1 byte): This value will define the category (for example input, output, sensor etc)
  2. the action (1 byte): This value will define the action (ON, OFF, Set dimmer, IF etc)
  3. the device Number (1 word): This value will indicate for which device (output nr, input nr etc) the action will be executed
  4. extra parameter (1 word): The extra parameter is used to set the timer value, dimmer level or the compared value (in case of an IF Instruction)

See also CLI Reference Guide AIO for the All In One CLI Reference Guide.

See also Memory Model AIO for the All In One Memory Model of the built-in eeprom.

See also Error List AIO for the error code used.

See also API Reference Guide AIO for all the UART/RS232 API commands between the DSPIC33E and the BB.

Versioning

This document describes the Action Type Bytes available for the All In One design

Gateway Module FW version
NOT IN PRODUCTION V0.4

Action Type Bytes

Type Action DeviceNr Extra parameter Description
0
0
x
-
OUTPUT: Output x (0-479) OFF
0
1
x
-
OUTPUT: Output x (0-479) ON with current dimmer & Timer
0
2
x
y
OUTPUT: Output x (0-479) ON with dimmer level y (0-255) and with current Timer level
0
3
x
y
OUTPUT: Output x (0-479) ON and overrule current timer value with value y (0-65535). Each timer value unit is equal to 100ms. See Note 1.
0
4
x
y
OUTPUT: Output x (0-479) ON and overrule current timer value with value y (0-65535). Each timer value unit is equal to 1s. See Note 1.
0
5
x
y
OUTPUT: Output x (0-479) ON and overrule current timer value with value y (0-65535). Each timer value unit is equal to 1 minute. See Note 1.
0
6
x
y
OUTPUT: Output x (0-479) ON and overrule current timer value with value y (0-65535) only when light was not yet switched ON. Each timer value unit is equal to 100ms. See Note 1.
0
7
x
y
OUTPUT: Output x (0-479) ON and overrule current timer value with value y (0-65535) only when light was not yet switched ON. Each timer value unit is equal to 1s. See Note 1.
0
8
x
y
OUTPUT: Output x (0-479) ON and overrule current timer value with value y (0-65535) only when light was not yet switched ON. Each timer value unit is equal to 1 minute. See Note 1.
0
9
x
y
OUTPUT: Set dimmer level y (0-255) for Output x (0-479) but do not change the current state of the output
0
10
x
y
OUTPUT: Set timer value y (0-65535) for Output x (0-479) but do not change the current state of the output. Each timer value unit is equal to 100ms. See Note 1.
0
11
x
y
OUTPUT: Set timer value y (0-65535) for Output x (0-479) but do not change the current state of the output. Each timer value unit is equal to 1s. See Note 1.
0
12
x
y
OUTPUT: Set timer value y (0-65535) for Output x (0-479) but do not change the current state of the output. Each timer value unit is equal to 1 minute. See Note 1.
0
13
x
y
OUTPUT: Set standard timer value y (0-65535) for Output x (0-479) (no influence on current active timer or output state). Each timer value unit is equal to 100ms. See Note 1.
0
14
x
y
OUTPUT: Set standard timer value y (0-65535) for Output x (0-479) (no influence on current active timer or output state). Each timer value unit is equal to 1s. See Note 1.
0
15
x
y
OUTPUT: Set standard timer value y (0-65535) for Output x (0-479) (no influence on current active timer or output state). Each timer value unit is equal to 1 minute. See Note 1.
0
16
x
-
OUTPUT: Toggle output x (0-479) with standard timer value and last used dimmer value.
0
17
x
y
OUTPUT: Toggle output x (0-479) with standard timer value and dimmer value y.
0
18
x
y
OUTPUT: Toggle output x (0-479) and overrule standard timer value with value y (0-65535). Each timer value unit is equal to 100ms. See Note 1.
0
19
x
y
OUTPUT: Toggle output x (0-479) and overrule standard timer value with value y (0-65535). Each timer value unit is equal to 1s. See Note 1.
0
20
x
y
OUTPUT: Toggle output x (0-479) and overrule standard timer value with value y (0-65535). Each timer value unit is equal to 1 minute. See Note 1.
0
255
x
-
OUTPUT: Switch OFF all Outputs(x=0), Lights(x=1) or Lights&Outputs(x>1).
1
0
x
-
INPUT: Put Input x (0-479) in Release state
1
1
x
-
INPUT: Put Input x (0-479) in Press state
1
2
x
y
INPUT: Link Input x (0-479) with output y (0-479)
1
3
x
y
INPUT: Program in Eeprom PRESS BA for Input x (0-479) -> y.MSB=BA Type, y.LSB=BA Action
1
4
x
y
INPUT: Program in Eeprom PRESS BA for Input x (0-479) -> y=BA Device Nr
1
5
x
y
INPUT: Program in Eeprom PRESS BA for Input x (0-479) -> y=BA Extra Parameter
1
6
x
y
INPUT: Program in Eeprom RELEASE BA for Input x (0-479) -> y.MSB=BA Type, y.LSB=BA Action
1
7
x
y
INPUT: Program in Eeprom RELEASE BA for Input x (0-479) -> y=BA Device Nr
1
8
x
y
INPUT: Program in Eeprom RELEASE BA for Input x (0-479) -> y=BA Extra Parameter
1
9
x
y
INPUT: Program in Eeprom 1SEC PRESS BA for Input x (0-479) -> y.MSB=BA Type, y.LSB=BA Action
1
10
x
y
INPUT: Program in Eeprom 1SEC PRESS BA for Input x (0-479) -> y=BA Device Nr
1
11
x
y
INPUT: Program in Eeprom 1SEC PRESS BA for Input x (0-479) -> y=BA Extra Parameter
1
12
x
y
INPUT: Program in Eeprom 2SEC PRESS BA for Input x (0-479) -> y.MSB=BA Type, y.LSB=BA Action
1
13
x
y
INPUT: Program in Eeprom 2SEC PRESS BA for Input x (0-479) -> y=BA Device Nr
1
14
x
y
INPUT: Program in Eeprom 2SEC PRESS BA for Input x (0-479) -> y=BA Extra Parameter
1
15
x
y
INPUT: Program in Eeprom DOUBLE PRESS BA for Input x (0-479) -> y.MSB=BA Type, y.LSB=BA Action
1
16
x
y
INPUT: Program in Eeprom DOUBLE PRESS BA for Input x (0-479) -> y=BA Device Nr
1
17
x
y
INPUT: Program in Eeprom DOUBLE PRESS BA for Input x (0-479) -> y=BA Extra Parameter
2
z
x
y
SENSOR: For sensor z (0-127), write temperature (x.MSB), humidity (x.LSB) and brightness (y.LSB) in the appropriate processor memory locations. All values are written in System Value
3
z
x
-
SENSOR: For sensor z (0-127), write temperature (x.LSB) in the appropriate processor memory locations. All values are written in System Value
4
z
x
-
SENSOR: For sensor z (0-127), write humidity (x.LSB) in the appropriate processor memory locations. All values are written in System Value
5
z
x
-
SENSOR: For sensor z (0-127), write brightness (x.LSB) in the appropriate processor memory locations. All values are written in System Value
19
0
x
-
GROUP ACTION: Execute Group Action x.
19
1
x
y
GROUP ACTION: Execute Group Action x only when Output y is ON.
19
2
x
y
GROUP ACTION: Execute Group Action x only when Output y is OFF.
19
3
x
y
GROUP ACTION: Execute Group Action x only when Input y is PRESSED.
19
4
x
y
GROUP ACTION: Execute Group Action x only when Input y is RELEASED.
19
200
x
y
GROUP ACTION: For group Action x, write the start address y in eeprom and RAM (and thus write the Stop address y-1 for group x-1).
20
0
x
y
CAN: Set led nr x at brightness value y.MSB with led function y.LSB.
20
1
-
-
CAN: Switch all CAN leds OFF.
20
2
x
-
CAN: Set the Max CAN led brightness x.MSB and Min CAN led brightness x.LSB for all CAN modules.
20
3
x
y
CAN: For CAN module with ID x.MSB x.LSB y.MSB, set the Min Brightness at y.LSB.
20
4
x
y
CAN: For CAN module with ID x.MSB x.LSB y.MSB, set the Max Brightness at y.LSB.
20
5
x
-
CAN: Reset slave CAN module that contains input x.
20
6
x
-
CAN: Reset slave CAN module that contains sensor x.
20
7
-
-
CAN: Reset all CAN slave modules.
20
8
x
y
CAN: Reset slave CAN module with ID x.MSB x.LSB y.MSB.
20
9
x
y
CAN: Program in CAN module with ID x.MSB x.LSB y.MSB the data y.lsb in byte ID_NE.
20
10
x
y
CAN: Program input0 of CAN module ID x.MSB x.LSB y.MSB with input nr y.LSB.
20
11
x
y
CAN: Program input1 of CAN module ID x.MSB x.LSB y.MSB with input nr y.LSB.
20
12
x
y
CAN: Program input2 of CAN module ID x.MSB x.LSB y.MSB with input nr y.LSB.
20
13
x
y
CAN: Program input3 of CAN module ID x.MSB x.LSB y.MSB with input nr y.LSB.
20
14
x
y
CAN: Program input4 of CAN module ID x.MSB x.LSB y.MSB with input nr y.LSB.
20
15
x
y
CAN: Program input5 of CAN module ID x.MSB x.LSB y.MSB with input nr y.LSB.
20
18
x
y
CAN: Program sensor0 of CAN module ID x.MSB x.LSB y.MSB with sensor nr y.LSB.
20
19
x
y
CAN: Program sensor1 of CAN module ID x.MSB x.LSB y.MSB with sensor nr y.LSB.
20
100
x
y
CAN: Led indicate for CAN module ID x.MSB x.LSB y.MSB.
200
0
-
y
BUS ACTION: If y=0 then start discovery mode ("module discover start"), if y=255 then stop discovery mode of the slave RS232 module ("module discover stop")
200
1
-
-
EEPROM ACTIVATE: This instruction will copy eeprom data to RAM similar to the instruction "eeprom activate" (see CLI reference guide)
200
2
-
-
ERROR CLEAR: This instruction will clear all RS485 module errors and bring all modules again online and in GOOD status. This instruction does the same as the CLI instruction "error clear".
200
3
-
y
SLAVE LEDS: This instruction will switch ON (y=1) the led function of the slave modules or switch them OFF (y=0)
200
4
x
y
NUMBER MODULES WRITE: This instruction will write the number of (input/output/sensor) modules. When x=0 -> Output, x=1 -> Input, x=2 -> Sensor. y is the number of modules to be written. This instruction does the same as "input number modules write", "output number modules write" etc
201
z
x
y
OUTPUT EEPROM WRITE: This instruction will write word x (MSB->ID0, LSB->ID1) and word y (MSB->ID2, LSB->ID3) in the appropriate location of the eeprom for output module z (0-79) after performing a check for doubles in the existing output list. After a valid write, the system will perform an "eeprom activate" instruction to copy the values from eeprom to RAM.
202
z
x
y
INPUT EEPROM WRITE: This instruction will write word x (MSB->ID0, LSB->ID1) and word y (MSB->ID2, LSB->ID3) in the appropriate location of the eeprom for input module z (0-78) after performing a check for doubles in the existing input list. After a valid write, the system will perform an "eeprom activate" instruction to copy the values from eeprom to RAM.
203
z
x
y
SENSOR EEPROM WRITE: This instruction will write word x (MSB->ID0, LSB->ID1) and word y (MSB->ID2, LSB->ID3) in the appropriate location of the eeprom for sensor module z (0-15) after performing a check for doubles in the existing input list. After a valid write, the system will perform an "eeprom activate" instruction to copy the values from eeprom to RAM.
204
0
x
y
FRONTPANEL LEDS OFF: This instruction will set the appropriate leds OFF on the front panel. The frontpanel has 32 leds (2 words of 16 leds, x and y). When a bit of x or y is 0, the concerning led is switched OFF, when the bit is 1, the led status remains unchanged (can be ON or OFF)
204
1
x
y
FRONTPANEL LEDS ON: This instruction will set the appropriate leds ON on the front panel. The frontpanel has 32 leds (2 words of 16 leds, x and y). When a bit of x or y is 1, the concerning led is switched ON, when the bit is 0, the led status remains unchanged (can be ON or OFF)
204
2
x
y
FRONTPANEL LEDS FLASHING ON: This instruction will set the appropriate leds on the front panel in flashing mode when they are switched ON, this instruction will not switch on or off the leds. The frontpanel has 32 leds (2 words of 16 leds, x and y). When a bit of x or y is 1, the concerning led is set in flashing mode, when the bit is 0, the led flashing mode remains unchanged (can be set or clear)
204
3
x
y
FRONTPANEL LEDS FLASHING OFF: This instruction will clear the flashing mode of the appropriate leds on the front panel, this instruction will not switch on or off the leds. The frontpanel has 32 leds (2 words of 16 leds, x and y). When a bit of x or y is 0, the concerning led flashing mode is cleared (so when the led will be switched on, it will not flash), when the bit is 1, the led flashing mode remains unchanged (can be set or clear)
254
0
-
-
RESET PROCESSOR: This instruction will perform a software reset

Note 1:

  • 3 types of timers: 100ms, 1s and 1 minute. Every time a time unit (100ms, 1s or 1m) passes, the timer value of the output is decreased with 1 until 0 is reached and the output is switched off. It's important to understand the principle of the timers so you can use the appropriate timer for your use case. For example the minute timer will decrease every time the minute changes so using the minute timer for 1 minute is useless since the output will be switched off between 1 and 59 seconds. If you need a timer for only a few seconds, use the 100ms timer, if you need a timer for multiple seconds or minutes use the second timer, if you need a timer for more than 30 minutes use the minutes timer.
  • Each timer consist of 4 parameters: the Timer Value, the standard Timer value, the Timer type & the standard Timer type. At startup, the standard Timer value and the standard Timer type are loaded from eeprom. Every time an output is switched off, the standard Timer value and type are copied into the Timer value and type. When an output in ON, the Timer value is decreased until 0 which will switch OFF the output, the standard Timer is copied in the Timer value. The Timer type will determine which kind of timer it is (0 -> No Timer, 1 ->1 00ms timer, 2 -> 1s timer, 3 -> 1 minute timer) and the standard Timer type is copied in the standard timer when an output is switched off.
  • Basic action exists that only changes the Timer value and type which means that when the output is switched off, the standard values are loaded again.
  • Basic action exists that changes the Standard Timer value and type. Those standard values will remain in place until the processor is restarted or an "eeprom activate" is done due to eeprom changes. If you want permanent changes, please changes the appropriate eeprom values.
  • When a basic action is used with Timer value 0, the timer will remain off.

Note 2:

  • if "-" is displayed in the table, any value can be used (typically, 0 is used)
  • When type=255 -> No action is executed and will always be ignored by the firmware

Note 3:

  • When BA's are used to program other BA's in Eeprom (like for example BA1-3 or BA20-0), 3 BA's (Action/Type, Device Nr & extra parameter) need to be used to program 1 full BA in Eeprom