Difference between revisions of "AIO API Event Codes"

From OpenMotics
Jump to navigation Jump to search
 
(44 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
! width="5%"|DeviceNr.MSB
 
! width="5%"|DeviceNr.MSB
 
! width="5%"|DeviceNr.LSB
 
! width="5%"|DeviceNr.LSB
! width="5%"|Data0
+
! width="3%"|Data0
! width="5%"|Data1
+
! width="3%"|Data1
! width="5%"|Data2
+
! width="3%"|Data2
! width="5%"|Data3
+
! width="3%"|Data3
 
!Description
 
!Description
 
|-
 
|-
Line 110: Line 110:
 
|Air quality sensor x changed: This Event will be send when values sensor x have changed, new CO2 will be found in y and VOC in z.
 
|Air quality sensor x changed: This Event will be send when values sensor x have changed, new CO2 will be found in y and VOC in z.
 
|-
 
|-
!<div align="center">20</div>
+
!<div align="center">2</div>
 +
!<div align="center">4</div>
 +
!<div align="center">0</div>
 +
!<div align="center">x</div>
 +
!<div align="center">y.MSB</div>
 +
!<div align="center">y.LSB</div>
 +
!<div align="center">0</div>
 +
!<div align="center">0</div>
 +
|ADC value x (mV) changed: This Event will be send when values sensor x have changed, new ADC will be found in y (in mV).
 +
|-
 +
!<div align="center">3</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">x</div>
 
!<div align="center">x</div>
!<div align="center">Mode</div>
+
!<div align="center">y.Byte3</div>
!<div align="center">Setpoint</div>
+
!<div align="center">y.Byte2</div>
 +
!<div align="center">y.Byte1</div>
 +
!<div align="center">y.Byte0</div>
 +
|Pulse Counter x has been updated with new value y (y.Byte3 being the MSB and y.Byte0 being the LSB)
 +
|-
 +
!<div align="center">19</div>
 +
!<div align="center">0</div>
 +
!<div align="center">x.MSB</div>
 +
!<div align="center">x.LSB</div>
 +
!<div align="center">0</div>
 +
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
|Thermostat x has changed: The Thermostat setpoint/mode has been modified by the slave device (For example the Modbus thermostat connected to the Micro CAN has an updated value set by the user)
+
|Group action x has not been executed since an endless loop has been detected and the same group action has been used multiple times in the same execution run.
 
|-
 
|-
 
!<div align="center">20</div>
 
!<div align="center">20</div>
Line 138: Line 158:
 
!<div align="center">Data0</div>
 
!<div align="center">Data0</div>
 
!<div align="center">Data1</div>
 
!<div align="center">Data1</div>
|uCAN with ID2.ID1.ID0 reports an event with content Data0 and Data1, see Note3.  
+
|uCAN with ID2.ID1.ID0 reports an event with content Data0 and Data1, see Note2.  
 
|-
 
|-
 
!<div align="center">22</div>
 
!<div align="center">22</div>
Line 150: Line 170:
 
|When BB debug mode is ON (see Eeprom Memory model Page 0 Byte 13), this Event will be send to the BB for every BA that has been executed.  
 
|When BB debug mode is ON (see Eeprom Memory model Page 0 Byte 13), this Event will be send to the BB for every BA that has been executed.  
 
|-
 
|-
!<div align="center">248</div>
+
!<div align="center">23</div>
 +
!<div align="center">0</div>
 +
!<div align="center">0</div>
 +
!<div align="center">ID2</div>
 +
!<div align="center">ID1</div>
 +
!<div align="center">ID0</div>
 +
!<div align="center">-</div>
 +
!<div align="center">-</div>
 +
|uCAN with ID2.ID1.ID0 is not responding.
 +
|-
 +
!<div align="center">24</div>
 +
!<div align="center">0</div>
 +
!<div align="center">0</div>
 +
!<div align="center">ID3</div>
 +
!<div align="center">ID2</div>
 +
!<div align="center">ID1</div>
 +
!<div align="center">ID0</div>
 +
!<div align="center">-</div>
 +
|RS485 module with ID3.ID2.ID1.ID0 is not responding.
 +
|-
 +
!<div align="center">30</div>
 +
!<div align="center">0</div>
 +
!<div align="center">position</div>
 +
!<div align="center">ID2</div>
 +
!<div align="center">ID1</div>
 +
!<div align="center">ID0</div>
 +
!<div align="center">-</div>
 +
!<div align="center">M/A</div>
 +
|New uCAN at position with ID2.ID1.ID0 has been detected and programmed. M/A: Manually (77) or Automatically (65) added.
 +
|-
 +
!<div align="center">30</div>
 +
!<div align="center">1</div>
 +
!<div align="center">position</div>
 +
!<div align="center">ID3</div>
 +
!<div align="center">ID2</div>
 +
!<div align="center">ID1</div>
 +
!<div align="center">ID0</div>
 +
!<div align="center">M/A</div>
 +
|New RS485 module at position with ID3.ID2.ID1.ID0 has been detected and programmed. M/A: Manually (77) or Automatically (65) added.
 +
|-
 +
!<div align="center">200</div>
 +
!<div align="center">0</div>
 +
!<div align="center">0</div>
 +
!<div align="center">Phase</div>
 +
!<div align="center">Type</div>
 +
!<div align="center">Fw Version Major</div>
 +
!<div align="center">Fw Version Minor</div>
 +
!<div align="center">Fw Version Built</div>
 +
|Factory reset:
 +
* Phase==0: Prepare Fase Factory Reset is done
 +
* Phase==1: Execution Factory Reset is started
 +
* Phase==2: Erase CAN Config done (delete uCAN's via CAN bus)
 +
* Phase==3: Start Erase EEPROM (could take a while before completed)
 +
* Phase==4: Erase EEPROM done
 +
* Phase==5: Start Erase FRAM (could take a while before completed)
 +
* Phase==6: Erase FRAM done
 +
* Phase==7: Erase RS485 slave modules done
 +
* Phase==8: Factory Reset done
 +
* Type==0: Partial Factory reset -> Only RS485 slave modules
 +
* Type==1: Full Factory Reset
 +
|-
 +
!<div align="center">245</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 +
!<div align="center">type</div>
 +
!<div align="center">Module ID0</div>
 +
!<div align="center">Module ID1</div>
 +
!<div align="center">Module ID2</div>
 +
!<div align="center">Module ID3</div>
 +
|Module Discover event: During initialisation, when existing or double module has been found, this event will be sent.
 +
* type==5: Existing Output module has been found
 +
* type==6: Existing Input module has been found
 +
* type==7: Existing Sensor module has been found
 +
* type==8: Existing CAN Control module has been found
 +
* type==9: Double Output module has been found
 +
* type==10: Double Input module has been found
 +
* type==11: Double Sensor module has been found
 +
* type==12: Double CAN Control module has been found 
 +
|-
 +
!<div align="center">246</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 +
!<div align="center">type</div>
 +
!<div align="center">Automatic Module Discover Byte</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
|Eeprom activate has just been fully performed and is finished.
+
|Slave module Search Event: When type==0: Search is not active, when type==1: Search is started, when type==2: Search is done. For Automatic Module Discovery Byte, see Eeprom Memory model Page 0 Byte 11
 +
|-
 +
!<div align="center">247</div>
 +
!<div align="center">Type</div>
 +
!<div align="center">Data0</div>
 +
!<div align="center">Data1</div>
 +
!<div align="center">Data2</div>
 +
!<div align="center">Data3</div>
 +
!<div align="center">Data4</div>
 +
!<div align="center">Data5</div>
 +
|Data to be send to the BB:
 +
*type=0->PCB temperature has changed (temperature can be found in Data1)
 
|-
 
|-
 
!<div align="center">248</div>
 
!<div align="center">248</div>
!<div align="center">1</div>
 
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
!<div align="center">Onboard_temp</div>
 
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 +
!<div align="center">type</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
|Update of the Onboard Main PCB temperature. Temperature is represented as a signed integer.
+
!<div align="center">0</div>
 +
|Eeprom activate has just been fully performed and is finished. When type==1: A regular Eeprom activate has been performed, when type==0: An Eeprom activate has been performed just after a power reset.
 
|-
 
|-
 
!<div align="center">248</div>
 
!<div align="center">248</div>
Line 190: Line 300:
 
|This event indicates the health status:  
 
|This event indicates the health status:  
 
*Type=0->CAN Health status change
 
*Type=0->CAN Health status change
Current&previous health:
+
**Current&previous health:
*Health=0: Value at startup
+
***Health=0: Value at startup
*Health=1: All uCAN's are not responding
+
***Health=1: All uCAN's are not responding
*Health=2: All uCAN's OK
+
***Health=2: All uCAN's OK
*Health=3: Not all uCAN's are responding
+
***Health=3: Not all uCAN's are responding
*Health=4: CAN bus is in OFF state due to bus errors, reset is needed
+
***Health=4: CAN bus is temporary in OFF state due to bus errors
 
|-
 
|-
 
!<div align="center">249</div>
 
!<div align="center">249</div>
Line 216: Line 326:
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
|Front Panel Button change: The Frontpanel of the Core has 3 buttons, the Core+ has 4 buttons. When a Button is pressed (short press, longer press), an event will be send. Button_nr: 0->Setup Button, 1->Action Button, 2->CAN Power Button, 3->Select Button. Status: 0->Button released, 1->Button pressed, 2->Button pressed for 5 seconds, 3->Button pressed longer then 8 seconds.  
 
|Front Panel Button change: The Frontpanel of the Core has 3 buttons, the Core+ has 4 buttons. When a Button is pressed (short press, longer press), an event will be send. Button_nr: 0->Setup Button, 1->Action Button, 2->CAN Power Button, 3->Select Button. Status: 0->Button released, 1->Button pressed, 2->Button pressed for 5 seconds, 3->Button pressed longer then 8 seconds.  
|-
 
!<div align="center">251</div>
 
!<div align="center">Chip_Nr</div>
 
!<div align="center">Led_Blinking_25.MSB</div>
 
!<div align="center">Led_Blinking_25.LSB</div>
 
!<div align="center">Led_Blinking_50.MSB</div>
 
!<div align="center">Led_Blinking_50.LSB</div>
 
!<div align="center">Led_Blinking_75.MSB</div>
 
!<div align="center">Led_Blinking_75.LSB</div>
 
|Front Panel Led state change: When a Led of the Front Panel changes state (from ON to OFF or the reverse), an event message will be send. 2 led driver chips (Chip_nr 0 and 1) are present on the Front panel. The 16 bit Led_blinking_25 will indicate for the 16 leds if the led is blinking at 25% (BIT=1) or not (BIT=0), Led_blinking_50 for 50% and Led_blinking_75 for 75% ON (and thus 25% of the time OFF). See Note 2
 
|-
 
!<div align="center">252</div>
 
!<div align="center">Chip_Nr</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
!<div align="center">Led_status.MSB</div>
 
!<div align="center">Led_status.LSB</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
 
|Front Panel Led state change: When a Led of the Front Panel changes state (from ON to OFF or the reverse), an event message will be send. 2 led driver chips (Chip_nr 0 and 1) are present on the Front panel. The 16 bit Led_status will indicate for 16 leds if the led is ON (BIT=1) or OFF (BIT=0). See Note 2.
 
 
|-
 
|-
 
!<div align="center">253</div>
 
!<div align="center">253</div>
Line 250: Line 340:
 
!<div align="center">type</div>
 
!<div align="center">type</div>
 
!<div align="center">0</div>
 
!<div align="center">0</div>
!<div align="center">0</div>
+
!<div align="center">Reset_mode</div>
 
!<div align="center">cause</div>
 
!<div align="center">cause</div>
!<div align="center">0</div>
+
!<div align="center">Fw Version Major</div>
!<div align="center">0</div>
+
!<div align="center">Fw Version Minor</div>
!<div align="center">0</div>
+
!<div align="center">Fw Version Built</div>
 
|Reset Action:
 
|Reset Action:
*type=0->Processor reset (or power startup) has just been performed
 
*type=1->Change PCB temperature
 
 
*type=2->Health checker is requesting reset in a few seconds
 
*type=2->Health checker is requesting reset in a few seconds
 
**cause=1->I2C Bus 1 (Eeprom) problem
 
**cause=1->I2C Bus 1 (Eeprom) problem
 
**cause=2->I2C Bus 2 (Fram, front panel leds, Front panel DA, RTC etc) problem
 
**cause=2->I2C Bus 2 (Fram, front panel leds, Front panel DA, RTC etc) problem
 
**cause=3->CAN problem
 
**cause=3->CAN problem
 +
*type=253->CAN stack reset
 +
*type=254->Processor reset (or power startup) has just been performed
 +
*Reset_mode:
 +
**Reset_mode=1: Reset functionality for CAN reset is enabled
 +
**Reset_mode=0: Reset functionality for CAN reset is disabled
 
|-
 
|-
 
|}
 
|}
Line 271: Line 364:
 
** timer type=2: 1s timer
 
** timer type=2: 1s timer
 
** timer type=3: 1m timer
 
** timer type=3: 1m timer
* Note 2:
+
* Note 2: See [[Micro CAN Events]]
 
 
== Front Panel Led Events ==
 
{| class="wikitable" width="100%"
 
! width="10%"|Core
 
! width="10%"|Core+
 
!Description
 
|-
 
!<div align="center">NA</div>
 
!<div align="center">Chip 0 / Led 1</div>
 
|EXP BUS (0)
 
|-
 
!<div align="center">Chip 0 / Led 5</div>
 
!<div align="center">Chip 0 / Led 3</div>
 
|LED ST GREEN (1)
 
|-
 
!<div align="center">Chip 0 / Led 4</div>
 
!<div align="center">Chip 0 / Led 2</div>
 
|LED ST RED (2)
 
|-
 
!<div align="center">Chip 1 / Led 4</div>
 
!<div align="center">Chip 0 / Led 12</div>
 
|LED CAN ST GREEN (3)
 
|-
 
!<div align="center">Chip 1 / Led 5</div>
 
!<div align="center">Chip 0 / Led 11</div>
 
|LED CAN ST RED (4)
 
|-
 
!<div align="center">Chip 1 / Led 15</div>
 
!<div align="center">Chip 0 / Led 10</div>
 
|LED CAN COM (5)
 
|-
 
!<div align="center">Chip 1 / Led 13</div>
 
!<div align="center">Chip 0 / Led 9</div>
 
|LED P1 (6)
 
|-
 
!<div align="center">Chip 1 / Led 12</div>
 
!<div align="center">Chip 0 / Led 8</div>
 
|LED LAN GREEN (7)
 
|-
 
!<div align="center">Chip 1 / Led 11</div>
 
!<div align="center">Chip 0 / Led 5</div>
 
|LED LAN RED (8)
 
|-
 
!<div align="center">Chip 0 / Led 14</div>
 
!<div align="center">Chip 0 / Led 6</div>
 
|LED CLOUD (9)
 
|-
 
!<div align="center">Chip 0 / Led 13</div>
 
!<div align="center">Chip 0 / Led 7</div>
 
|LED SETUP (10)
 
|-
 
!<div align="center">NA</div>
 
!<div align="center">Chip 1 / Led 6</div>
 
|LED RELAY 1-8 (11)
 
|-
 
!<div align="center">NA</div>
 
!<div align="center">Chip 0 / Led 15</div>
 
|LED RELAY 9-16 (12)
 
|-
 
!<div align="center">NA</div>
 
!<div align="center">Chip 1 / Led 7</div>
 
|LED DIG OUT 1-4 (13)
 
|-
 
!<div align="center">NA</div>
 
!<div align="center">Chip 0 / Led 13</div>
 
|LED DIG OUT 5-7 (14)
 
|-
 
!<div align="center">NA</div>
 
!<div align="center">Chip 0 / Led 14</div>
 
|LED DIG ANA 1-4 (15)
 
|-
 
!<div align="center">NA</div>
 
!<div align="center">Chip 0 / Led 0</div>
 
|LED INPUTS (16)
 
|-
 
|}
 
 
 
* Note3: See [[Micro CAN Events]]
 

Latest revision as of 10:06, 7 October 2022

Type Action DeviceNr.MSB DeviceNr.LSB Data0 Data1 Data2 Data3 Description
0
0
x.MSB
x.LSB
y
z
u.MSB
u.LSB
Output x off: This Event will be send when an output is switched off with dimmer value y, timer type z and timer value u. See Note 1.
0
1
x.MSB
x.LSB
y
z
u.MSB
u.LSB
Output x on: This Event will be send when an output is switched on with dimmer value y, timer type z and timer value u. See Note 1.
0
2
x.MSB
x.LSB
y
-
-
-
Output x lock/unlock status: This Event will be send when output x is locked/unlock. y=0->Unlock, y=1->Lock
1
0
x.MSB
x.LSB
0
0
0
0
Input x Released: This Event will be send when an input is released.
1
1
x.MSB
x.LSB
0
0
0
0
Input x Pressed: This Event will be send when an input is pressed.
1
2
x.MSB
x.LSB
y
-
-
-
Input x lock/unlock status: This Event will be send when Input x is locked/unlock. y=0->Unlock, y=1->Lock
2
0
0
x
0
y
0
0
Temperature sensor x changed: This Event will be send when Temperature sensor x has changed, new temperature will be found in y
2
1
0
x
0
y
0
0
Humidity sensor x changed: This Event will be send when Humidity sensor x has changed, new humidity will be found in y
2
2
0
x
y.MSB
y.LSB
0
0
Brightness sensor x changed: This Event will be send when Brightness sensor x has changed, new humidity will be found in y
2
3
0
x
y.MSB
y.LSB
z.MSB
z.LSB
Air quality sensor x changed: This Event will be send when values sensor x have changed, new CO2 will be found in y and VOC in z.
2
4
0
x
y.MSB
y.LSB
0
0
ADC value x (mV) changed: This Event will be send when values sensor x have changed, new ADC will be found in y (in mV).
3
0
0
x
y.Byte3
y.Byte2
y.Byte1
y.Byte0
Pulse Counter x has been updated with new value y (y.Byte3 being the MSB and y.Byte0 being the LSB)
19
0
x.MSB
x.LSB
0
0
0
0
Group action x has not been executed since an endless loop has been detected and the same group action has been used multiple times in the same execution run.
20
0
0
x
Mode
Setpoint
0
0
Thermostat x has changed: The Thermostat setpoint/mode has been modified by the slave device (For example the Modbus thermostat connected to the Micro CAN has an updated value set by the user)
21
0
0
ID2
ID1
ID0
Data0
Data1
uCAN with ID2.ID1.ID0 reports an event with content Data0 and Data1, see Note2.
22
0
BA DeviceNr.MSB
BA DeviceNr.LSB
BA Type
BA Action
BA Extra Parameter.MSB
BA Extra Parameter.LSB
When BB debug mode is ON (see Eeprom Memory model Page 0 Byte 13), this Event will be send to the BB for every BA that has been executed.
23
0
0
ID2
ID1
ID0
-
-
uCAN with ID2.ID1.ID0 is not responding.
24
0
0
ID3
ID2
ID1
ID0
-
RS485 module with ID3.ID2.ID1.ID0 is not responding.
30
0
position
ID2
ID1
ID0
-
M/A
New uCAN at position with ID2.ID1.ID0 has been detected and programmed. M/A: Manually (77) or Automatically (65) added.
30
1
position
ID3
ID2
ID1
ID0
M/A
New RS485 module at position with ID3.ID2.ID1.ID0 has been detected and programmed. M/A: Manually (77) or Automatically (65) added.
200
0
0
Phase
Type
Fw Version Major
Fw Version Minor
Fw Version Built
Factory reset:
  • Phase==0: Prepare Fase Factory Reset is done
  • Phase==1: Execution Factory Reset is started
  • Phase==2: Erase CAN Config done (delete uCAN's via CAN bus)
  • Phase==3: Start Erase EEPROM (could take a while before completed)
  • Phase==4: Erase EEPROM done
  • Phase==5: Start Erase FRAM (could take a while before completed)
  • Phase==6: Erase FRAM done
  • Phase==7: Erase RS485 slave modules done
  • Phase==8: Factory Reset done
  • Type==0: Partial Factory reset -> Only RS485 slave modules
  • Type==1: Full Factory Reset
245
0
0
type
Module ID0
Module ID1
Module ID2
Module ID3
Module Discover event: During initialisation, when existing or double module has been found, this event will be sent.
  • type==5: Existing Output module has been found
  • type==6: Existing Input module has been found
  • type==7: Existing Sensor module has been found
  • type==8: Existing CAN Control module has been found
  • type==9: Double Output module has been found
  • type==10: Double Input module has been found
  • type==11: Double Sensor module has been found
  • type==12: Double CAN Control module has been found
246
0
0
0
type
Automatic Module Discover Byte
0
0
Slave module Search Event: When type==0: Search is not active, when type==1: Search is started, when type==2: Search is done. For Automatic Module Discovery Byte, see Eeprom Memory model Page 0 Byte 11
247
Type
Data0
Data1
Data2
Data3
Data4
Data5
Data to be send to the BB:
  • type=0->PCB temperature has changed (temperature can be found in Data1)
248
0
0
0
type
0
0
0
Eeprom activate has just been fully performed and is finished. When type==1: A regular Eeprom activate has been performed, when type==0: An Eeprom activate has been performed just after a power reset.
248
2
0
0
cause
0
0
0
A power Reset of the I2C Bus has been initiated due to I2C problem (cause=1->I2C1, cause=2->I2C2).
248
3
0
0
type
current health
previous health
0
This event indicates the health status:
  • Type=0->CAN Health status change
    • Current&previous health:
      • Health=0: Value at startup
      • Health=1: All uCAN's are not responding
      • Health=2: All uCAN's OK
      • Health=3: Not all uCAN's are responding
      • Health=4: CAN bus is temporary in OFF state due to bus errors
249
0
x.MSB
x.LSB
y.MSB
y.LSB
0
z
This event will be send when BA251 is triggered. x, y and z are the parameters received from BA251.
250
0
0
Button_nr
Status
0
0
0
Front Panel Button change: The Frontpanel of the Core has 3 buttons, the Core+ has 4 buttons. When a Button is pressed (short press, longer press), an event will be send. Button_nr: 0->Setup Button, 1->Action Button, 2->CAN Power Button, 3->Select Button. Status: 0->Button released, 1->Button pressed, 2->Button pressed for 5 seconds, 3->Button pressed longer then 8 seconds.
253
0
0
Bus
Power_state
0
0
0
Power state change: When Bus=0 -> RS485 Bus, When Bus=1 -> CAN Bus, when Power_state=0 -> Bus OFF, when Power_state=1 -> Bus ON
254
type
0
Reset_mode
cause
Fw Version Major
Fw Version Minor
Fw Version Built
Reset Action:
  • type=2->Health checker is requesting reset in a few seconds
    • cause=1->I2C Bus 1 (Eeprom) problem
    • cause=2->I2C Bus 2 (Fram, front panel leds, Front panel DA, RTC etc) problem
    • cause=3->CAN problem
  • type=253->CAN stack reset
  • type=254->Processor reset (or power startup) has just been performed
  • Reset_mode:
    • Reset_mode=1: Reset functionality for CAN reset is enabled
    • Reset_mode=0: Reset functionality for CAN reset is disabled

Notes:

  • Note 1: timer type specifies which kind of timer is active for a given output and his timer value.
    • timer type=0: No timer is active
    • timer type=1: 100ms timer
    • timer type=2: 1s timer
    • timer type=3: 1m timer
  • Note 2: See Micro CAN Events