Difference between revisions of "Master RS485 Cummunication Protocol"

From OpenMotics
Jump to navigation Jump to search
 
(51 intermediate revisions by the same user not shown)
Line 84: Line 84:
  
 
=== Messages in Normal Mode ===
 
=== Messages in Normal Mode ===
==== Request eeprom value (V2) ====
+
==== Request state of Input Module (V1) ====
  
 
;Request M->S
 
;Request M->S
Line 101: Line 101:
 
| align="center" style="background:#f0f0f0;"|'''10'''
 
| align="center" style="background:#f0f0f0;"|'''10'''
 
| align="center" style="background:#f0f0f0;"|'''11'''
 
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
| align="center" style="background:#f0f0f0;"|'''13'''
 +
| align="center" style="background:#f0f0f0;"|'''14'''
 +
| align="center" style="background:#f0f0f0;"|'''15'''
 +
| align="center" style="background:#f0f0f0;"|'''16'''
 +
| align="center" style="background:#f0f0f0;"|'''17'''
 +
| align="center" style="background:#f0f0f0;"|'''18'''
 +
| align="center" style="background:#f0f0f0;"|'''19'''
 
|-
 
|-
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>R</code>||Address.MSB||Address.LSB||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10
+
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>I</code>||Indicate||<code>F</code>||InputFilter||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||13||10
 
|}
 
|}
  
Line 108: Line 116:
 
* Since this instruction is used to check Input module, ID0 must be equal to "I"
 
* Since this instruction is used to check Input module, ID0 must be equal to "I"
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
 +
* InputFilter: When an InputFilter is used, byte6 must be equal to "F". InputFilter (for example 10) represents the number of Inputcycles (The input module scans his inputs) the inputmodule will do before it accepts an input change. This value is used to filter unwanted spikes or noise on the cables of the switches. See also [[Memory Model]] Page 0 Byte 92.
  
 
;Response S->M
 
;Response S->M
Line 125: Line 134:
 
| align="center" style="background:#f0f0f0;"|'''11'''
 
| align="center" style="background:#f0f0f0;"|'''11'''
 
| align="center" style="background:#f0f0f0;"|'''12'''
 
| align="center" style="background:#f0f0f0;"|'''12'''
 +
| align="center" style="background:#f0f0f0;"|'''13'''
 +
| align="center" style="background:#f0f0f0;"|'''14'''
 +
| align="center" style="background:#f0f0f0;"|'''15'''
 
|-
 
|-
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>R</code>||Address.MSB||Address.LSB||Eeprom Value||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10
+
| <code>RC</code>||ID0||ID1||ID2||ID3||InputState||<code>P</code>||PC||PulseCounter(PC).Byte1||PulseCounter(PC).Byte0||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10||13||10
 
|}
 
|}
  
 
* The ID0..ID3 address is the originating slave address but all <code>RC</code> messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
 
* The ID0..ID3 address is the originating slave address but all <code>RC</code> messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
* CRC.Byte1 and Byte0: Sum of byte 4 to 5
+
* PC: Every input Module will keep a PulseCounter for the 8 inputs of this module. During every scan, one of the 8 (0-7) PulseCounters (PC) will be sent over to the Master Controller. PC (0-7) will indicate which pulsecounter information of which input is sent over.
 +
* PulseCounter(PC).Byte1 and Byte0: PulseCounter variable, Pulsecounter will keep track of the number of times an input is activated. Pulsecounter value ranges from 0 to 65535. When the 65535 is reached and the input is activated again, Pulsecounter will go to 0 and will continue counting.
 +
* CRC.Byte1 and Byte0: Sum of byte 4 to 9
  
==== Request state of Input Module (V1) ====
+
==== Request state of Input Module (V2): Input state ====
  
 
;Request M->S
 
;Request M->S
Line 145: Line 159:
 
| align="center" style="background:#f0f0f0;"|'''6'''
 
| align="center" style="background:#f0f0f0;"|'''6'''
 
| align="center" style="background:#f0f0f0;"|'''7'''
 
| align="center" style="background:#f0f0f0;"|'''7'''
| align="center" style="background:#f0f0f0;"|'''8'''
 
| align="center" style="background:#f0f0f0;"|'''9'''
 
| align="center" style="background:#f0f0f0;"|'''10'''
 
| align="center" style="background:#f0f0f0;"|'''11'''
 
| align="center" style="background:#f0f0f0;"|'''12'''
 
| align="center" style="background:#f0f0f0;"|'''13'''
 
| align="center" style="background:#f0f0f0;"|'''14'''
 
| align="center" style="background:#f0f0f0;"|'''15'''
 
| align="center" style="background:#f0f0f0;"|'''16'''
 
| align="center" style="background:#f0f0f0;"|'''17'''
 
| align="center" style="background:#f0f0f0;"|'''18'''
 
| align="center" style="background:#f0f0f0;"|'''19'''
 
 
|-
 
|-
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>I</code>||Indicate||<code>F</code>||InputFilter||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||<code>0</code>||13||10
+
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>i</code>||Indicate||13||10
 
|}
 
|}
  
Line 164: Line 166:
 
* Since this instruction is used to check Input module, ID0 must be equal to "I"
 
* Since this instruction is used to check Input module, ID0 must be equal to "I"
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
* InputFilter: When an InputFilter is used, byte6 must be equal to "F". InputFilter (for example 10) represents the number of Inputcycles (The input module scans his inputs) the inputmodule will do before it accepts an input change. This value is used to filter unwanted spikes or noise on the cables of the switches. See also [[Memory Model]] Page 0 Byte 92.
 
  
;Response S->M
+
;Response S->M (input information only)
 
{| class="wikitable sortable" border="1"
 
{| class="wikitable sortable" border="1"
 
| align="center" style="background:#f0f0f0;"|''''''
 
| align="center" style="background:#f0f0f0;"|''''''
Line 180: Line 181:
 
| align="center" style="background:#f0f0f0;"|'''9'''
 
| align="center" style="background:#f0f0f0;"|'''9'''
 
| align="center" style="background:#f0f0f0;"|'''10'''
 
| align="center" style="background:#f0f0f0;"|'''10'''
| align="center" style="background:#f0f0f0;"|'''11'''
 
| align="center" style="background:#f0f0f0;"|'''12'''
 
| align="center" style="background:#f0f0f0;"|'''13'''
 
| align="center" style="background:#f0f0f0;"|'''14'''
 
| align="center" style="background:#f0f0f0;"|'''15'''
 
 
|-
 
|-
| <code>RC</code>||ID0||ID1||ID2||ID3||InputState||<code>P</code>||PC||PulseCounter(PC).Byte1||PulseCounter(PC).Byte0||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10||13||10
+
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>i</code>||InputState||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10
 
|}
 
|}
  
 
* The ID0..ID3 address is the originating slave address but all <code>RC</code> messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
 
* The ID0..ID3 address is the originating slave address but all <code>RC</code> messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
* PC: Every input Module will keep a PulseCounter for the 8 inputs of this module. During every scan, one of the 8 (0-7) PulseCounters (PC) will be sent over to the Master Controller. PC (0-7) will indicate which pulsecounter information of which input is sent over.
+
* CRC.Byte1 and Byte0: Sum of byte 4 to 5
* PulseCounter(PC).Byte1 and Byte0: PulseCounter variable, Pulsecounter will keep track of the number of times an input is activated. Pulsecounter value ranges from 0 to 65535. When the 65535 is reached and the input is activated again, Pulsecounter will go to 0 and will continue counting.
 
* CRC.Byte1 and Byte0: Sum of byte 4 to 9
 
  
==== Request state of Input Module (V2): Input state ====
+
==== Request state of Input Module (V2): Input state with partial Pulsecounter info ====
  
 
;Request M->S
 
;Request M->S
Line 208: Line 202:
 
| align="center" style="background:#f0f0f0;"|'''7'''
 
| align="center" style="background:#f0f0f0;"|'''7'''
 
|-
 
|-
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>i</code>||Indicate||13||10
+
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>n</code>||Indicate||13||10
 
|}
 
|}
  
Line 215: Line 209:
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
  
;Response S->M
+
;Response S->M (input and partial pulse counter information)
 
{| class="wikitable sortable" border="1"
 
{| class="wikitable sortable" border="1"
 
| align="center" style="background:#f0f0f0;"|''''''
 
| align="center" style="background:#f0f0f0;"|''''''
Line 229: Line 223:
 
| align="center" style="background:#f0f0f0;"|'''9'''
 
| align="center" style="background:#f0f0f0;"|'''9'''
 
| align="center" style="background:#f0f0f0;"|'''10'''
 
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
| align="center" style="background:#f0f0f0;"|'''13'''
 +
| align="center" style="background:#f0f0f0;"|'''14'''
 +
| align="center" style="background:#f0f0f0;"|'''15'''
 +
| align="center" style="background:#f0f0f0;"|'''16'''
 +
| align="center" style="background:#f0f0f0;"|'''17'''
 
|-
 
|-
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>i</code>||InputState||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10
+
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>n</code>||InputState||Pulsecounter_nr||Pulse Data0||Pulse Data1||Pulse Data2||Pulse Data3||Pulse Data4||Pulse Data5||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10
 
|}
 
|}
  
 
* The ID0..ID3 address is the originating slave address but all <code>RC</code> messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
 
* The ID0..ID3 address is the originating slave address but all <code>RC</code> messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
* CRC.Byte1 and Byte0: Sum of byte 4 to 5
+
* CRC.Byte1 and Byte0: Sum of byte 4 to 12
 +
* Pulsecounter_nr (0-7) is the input_nr of which the Pulsecounter info is being sent. The input module will round robin (0,1,2,3,4,5,6,7,0,1,2,...) sent all the Pulsecounter info each time the input state is requested.
 +
* Pulse Data0..3: In these 4 bytes, the counter value of pulseCounter_nr (0-7) is stored (Pulse Data0 -> MSB)
 +
* Pulse Data4 & 5: CRC16 result of calculation of Pulse Data0..3
  
 
==== Request state of Input Module (V2): Partial Pulse Counter information ====
 
==== Request state of Input Module (V2): Partial Pulse Counter information ====
Line 409: Line 413:
 
* OledInstruction 0 and 1: Additional instructions can be sent like setting setpoints or program other parameters
 
* OledInstruction 0 and 1: Additional instructions can be sent like setting setpoints or program other parameters
  
==== Request Temp/Hum/ADC of 8 ports Sensor Module (V1) ====
+
==== Request Temp/Hum/ADC of 8 ports Sensor Module (V1&V2) ====
  
 
;Request M->S
 
;Request M->S
Line 432: Line 436:
  
 
* Since this instruction is used to check Temperature module, ID0 must be equal to "T"
 
* Since this instruction is used to check Temperature module, ID0 must be equal to "T"
* Type: "T" to request Temperature values, "H" to request Humidity values and "A" to request ADC value
+
* Type: "T" to request Temperature values, "H" to request Humidity values and "A" to request ADC value, "P" to request PID values (HVAC module)
 +
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
 +
 
 +
;Response S->M (Type="H" or "T" or "A")
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
| align="center" style="background:#f0f0f0;"|'''13'''
 +
| align="center" style="background:#f0f0f0;"|'''14'''
 +
| align="center" style="background:#f0f0f0;"|'''15'''
 +
| align="center" style="background:#f0f0f0;"|'''16'''
 +
| align="center" style="background:#f0f0f0;"|'''17'''
 +
| align="center" style="background:#f0f0f0;"|'''18'''
 +
| align="center" style="background:#f0f0f0;"|'''19'''
 +
|-
 +
| <code>RC</code>||ID0||ID1||ID2||ID3||Type||Value0||Value1||Value2||Value3||Value4||Value5||Value6||Value7||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10||13||10
 +
|}
 +
 
 +
* Value0..7: All 8 values of the 8 sensors will be transmitted. The value content depends on the Type (Temperature, Humidity or ADC) selected.
 +
* CRC.Byte1 and Byte0: Sum of byte 4 to 12
 +
* All values are in [System Value] format
 +
 
 +
==== Request Temp/Hum/ADC of HVAC module (V2) ====
 +
 
 +
;Request M->S
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
| align="center" style="background:#f0f0f0;"|'''13'''
 +
| align="center" style="background:#f0f0f0;"|'''14'''
 +
| align="center" style="background:#f0f0f0;"|'''15'''
 +
| align="center" style="background:#f0f0f0;"|'''16'''
 +
| align="center" style="background:#f0f0f0;"|'''17'''
 +
| align="center" style="background:#f0f0f0;"|'''18'''
 +
| align="center" style="background:#f0f0f0;"|'''19'''
 +
| align="center" style="background:#f0f0f0;"|'''20'''
 +
| align="center" style="background:#f0f0f0;"|'''21'''
 +
| align="center" style="background:#f0f0f0;"|'''22'''
 +
| align="center" style="background:#f0f0f0;"|'''23'''
 +
| align="center" style="background:#f0f0f0;"|'''24'''
 +
| align="center" style="background:#f0f0f0;"|'''25'''
 +
| align="center" style="background:#f0f0f0;"|'''26'''
 +
| align="center" style="background:#f0f0f0;"|'''27'''
 +
|-
 +
| <code>ST</code>||ID0||ID1||ID2||ID3||Type||Indicate||<code>s</code>||Setpt0||Setpt1||Setpt2||Setpt3||Setpt4||Setpt5||Setpt6||Setpt7||Mode0||Mode1||Mode2||Mode3||Mode4||Mode5||Mode6||Mode7||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10
 +
|}
 +
 
 +
* Since this instruction is used to check Temperature module, ID0 must be equal to "T"
 +
* Type: "T" to request Temperature values, "H" to request Humidity values, "A" to request brightness value and "a" to request 16 bits AD value
 +
* Setpt0..7: These are the programmed set points in the Master that are shared with the HVAC module
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
 
* Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
 +
* Mode x: Thermostat_Mode.BIT0=0 -> Heating, =1 -> Cooling
  
;Response S->M
+
;Response S->M (Type="H" or "T" or "A")
 
{| class="wikitable sortable" border="1"
 
{| class="wikitable sortable" border="1"
 
| align="center" style="background:#f0f0f0;"|''''''
 
| align="center" style="background:#f0f0f0;"|''''''
Line 465: Line 543:
 
* CRC.Byte1 and Byte0: Sum of byte 4 to 12
 
* CRC.Byte1 and Byte0: Sum of byte 4 to 12
 
* All values are in [System Value] format
 
* All values are in [System Value] format
 +
 +
;Response S->M (Type="P")
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
| align="center" style="background:#f0f0f0;"|'''13'''
 +
| align="center" style="background:#f0f0f0;"|'''14'''
 +
| align="center" style="background:#f0f0f0;"|'''15'''
 +
| align="center" style="background:#f0f0f0;"|'''16'''
 +
| align="center" style="background:#f0f0f0;"|'''17'''
 +
| align="center" style="background:#f0f0f0;"|'''18'''
 +
| align="center" style="background:#f0f0f0;"|'''19'''
 +
| align="center" style="background:#f0f0f0;"|'''20'''
 +
| align="center" style="background:#f0f0f0;"|'''21'''
 +
| align="center" style="background:#f0f0f0;"|'''22'''
 +
| align="center" style="background:#f0f0f0;"|'''23'''
 +
| align="center" style="background:#f0f0f0;"|'''24'''
 +
| align="center" style="background:#f0f0f0;"|'''25'''
 +
| align="center" style="background:#f0f0f0;"|'''26'''
 +
| align="center" style="background:#f0f0f0;"|'''27'''
 +
| align="center" style="background:#f0f0f0;"|'''28'''
 +
| align="center" style="background:#f0f0f0;"|'''29'''
 +
|-
 +
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>P</code>||PID_nr||Enabled||H/C||Sensor_nr||Temp||Setpoint||Error.MSB||Error.LSB||P.MSB||P.LSB||I.MSB||I.LSB||D.MSB||D.LSB||PID_calc.MSB||PID_calc.LSB||Output_nr||Output_value||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10||13||10
 +
|}
 +
 +
* CRC.Byte1 and Byte0: Sum of byte 4 to 22
 +
* All values are in [System Value] format
 +
* PID_nr: HVAC module has standard 2 pid's (0 & 1) that can be used
 +
* Enabled: PID_nr is enabled (=1) or disabled (=0)
 +
* H/C: Heating (=0) or Cooling (=1)
 +
* Temp: Temperature of the sensor that has been configured
 +
* Setpoint: Temperature setpoint of Sensor_nr
 +
* Error: Calculated PID Error
 +
* P, I & D: Individual Calculated PID results
 +
* PID_cal: Total PID results
 +
* Output_nr: HVAC output used for pid_nr
 +
* Output_value: HVAC output value of output_nr
 +
 +
;Response S->M (Type="a")
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
| align="center" style="background:#f0f0f0;"|'''13'''
 +
| align="center" style="background:#f0f0f0;"|'''14'''
 +
| align="center" style="background:#f0f0f0;"|'''15'''
 +
| align="center" style="background:#f0f0f0;"|'''16'''
 +
| align="center" style="background:#f0f0f0;"|'''17'''
 +
| align="center" style="background:#f0f0f0;"|'''18'''
 +
| align="center" style="background:#f0f0f0;"|'''19'''
 +
| align="center" style="background:#f0f0f0;"|'''20'''
 +
| align="center" style="background:#f0f0f0;"|'''21'''
 +
| align="center" style="background:#f0f0f0;"|'''22'''
 +
| align="center" style="background:#f0f0f0;"|'''23'''
 +
| align="center" style="background:#f0f0f0;"|'''24'''
 +
| align="center" style="background:#f0f0f0;"|'''25'''
 +
| align="center" style="background:#f0f0f0;"|'''26'''
 +
| align="center" style="background:#f0f0f0;"|'''27''''
 +
|-
 +
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>a</code>||AD0.MSB||AD0.LSB||AD1.MSB||AD1.LSB||AD2.MSB||AD2.LSB||AD3.MSB||AD3.LSB||AD4.MSB||AD4.LSB||AD5.MSB||AD5.LSB||AD6.MSB||AD6.LSB||AD7.MSB||AD7.LSB||<code>C</code>||CRC.Byte1||CRC.Byte0||13||10||13||10
 +
|}
 +
 +
* CRC.Byte1 and Byte0: Sum of byte 4 to 20
 +
* 8 AD values in 16 bits format are returned. MSB -> Most significant Byte, LSB -> Least Significant Byte
  
 
==== Request Temperature of 16 ports Temperature Module (V1) ====
 
==== Request Temperature of 16 ports Temperature Module (V1) ====
Line 831: Line 997:
  
 
=== Messages in Discovery Mode ===
 
=== Messages in Discovery Mode ===
==== Message when pushing Init button (V1) ====
+
==== Read Slave eeprom (V2) ====
 +
 
 +
;Request M->S
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
|-
 +
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>R</code>||Eeprom_Address.MSB||Eeprom_Address.LSB||0||<code>C</code>||CRC16.Byte1||CRC16.Byte0||13||10
 +
|}
 +
 
 +
* The ID0..3 is the destination slave address
 +
* Eeprom_Address: This is the address of the byte of the eeprom to be read
 +
* CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7
 +
 
 +
;Response S->M
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
|-
 +
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>R</code>||Eeprom_Address.MSB||Eeprom_Address.LSB||Eeprom_Value||<code>C</code>||CRC16.Byte1||CRC16.Byte0||13||10
 +
|}
 +
 
 +
* Eeprom_Value: This is the value read from eeprom @ address
 +
* CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7
 +
 
 +
==== Write slave eeprom (V2) ====
 +
 
 +
;Request M->S
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
|-
 +
| <code>ST</code>||ID0||ID1||ID2||ID3||<code>W</code>||Eeprom_Address.MSB||Eeprom_Address.LSB||Eeprom_Value||<code>C</code>||CRC16.Byte1||CRC16.Byte0||13||10
 +
|}
 +
 
 +
* The ID0..3 is the destination slave address
 +
* Eeprom_Address: This is the address of the byte of the eeprom to be written
 +
* CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7
 +
 
 +
;Response S->M
 +
{| class="wikitable sortable" border="1"
 +
| align="center" style="background:#f0f0f0;"|''''''
 +
| align="center" style="background:#f0f0f0;"|'''0'''
 +
| align="center" style="background:#f0f0f0;"|'''1'''
 +
| align="center" style="background:#f0f0f0;"|'''2'''
 +
| align="center" style="background:#f0f0f0;"|'''3'''
 +
| align="center" style="background:#f0f0f0;"|'''4'''
 +
| align="center" style="background:#f0f0f0;"|'''5'''
 +
| align="center" style="background:#f0f0f0;"|'''6'''
 +
| align="center" style="background:#f0f0f0;"|'''7'''
 +
| align="center" style="background:#f0f0f0;"|'''8'''
 +
| align="center" style="background:#f0f0f0;"|'''9'''
 +
| align="center" style="background:#f0f0f0;"|'''10'''
 +
| align="center" style="background:#f0f0f0;"|'''11'''
 +
| align="center" style="background:#f0f0f0;"|'''12'''
 +
|-
 +
| <code>RC</code>||ID0||ID1||ID2||ID3||<code>W</code>||Eeprom_Address.MSB||Eeprom_Address.LSB||Eeprom_Value||<code>C</code>||CRC16.Byte1||CRC16.Byte0||13||10
 +
|}
 +
 
 +
* Eeprom_Value: This is the value that has been written (read again after being written)
 +
* CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7
 +
 
 +
==== Message when pushing Init button (V1&V2) ====
  
 
When the Init button is pressed (or when an input of the Input module is activated) when the Bus is in initialization mode, the below message will be sent from the slave to the Master controller. In the event the module doesn't exist yet, the module will be added in the module list of the Master and the message xxx will be returned to the Slave.
 
When the Init button is pressed (or when an input of the Input module is activated) when the Bus is in initialization mode, the below message will be sent from the slave to the Master controller. In the event the module doesn't exist yet, the module will be added in the module list of the Master and the message xxx will be returned to the Slave.
Line 895: Line 1,159:
 
* If Data1="M" then in data2, the Master module nr will be found. For example, if the button of the input module that represents input 8-15 is pressed, data2=1 (module Nr 1).
 
* If Data1="M" then in data2, the Master module nr will be found. For example, if the button of the input module that represents input 8-15 is pressed, data2=1 (module Nr 1).
  
==== Sent Broadcast Message (V1) ====
+
==== Sent Broadcast Message (V1&V2) ====
  
 
Broadcast message will be sent by the Master controller and interpreted by all modules on the RS485 bus. Some broadcasts are intended for certain modules and will be only executed by those modules.
 
Broadcast message will be sent by the Master controller and interpreted by all modules on the RS485 bus. Some broadcasts are intended for certain modules and will be only executed by those modules.

Latest revision as of 18:04, 21 September 2022

Contents

General

The communication between Master controller and slave device is going over RS485. This document describes the communication protocol between both.

A different protocol is used for the tradition Master (18F67J11) and the Core/Core+:

  • Protocol V1: Traditional Master
  • Protocol V2: Core/Core+

Versioning

This document describes the RS485 communication protocol available on the Master Controller interface.

Gateway Module FW version
3.143.x

Notation

Every RS485 instruction from Master to Slave must start with string characters ST, the return message (from Slave to Master) must start with RC. Some exception exist and are explained in the document below.

Example: Aksing Firmware Version

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
ST ID0 ID1 ID2 ID3 F V 0 0 0 0 0 0 0 0 0 0 13 10
  • M->S: Master to Slave
  • Master to slave message will start with "ST"
  • The ID0..3 is the destination slave address
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
RC ID0 ID1 ID2 ID3 255 V Hw F1 F2 F3 0 0 0 0 0 0 13 10
  • S->M: Slave to Master
  • Slave to Master message will start with "RC"
  • The ID0..ID3 address is the originating slave address but all RC messages are always for the Master Controller since this controller is the Master of the RS485 bus.

Instruction Set

Messages in Normal Mode

Request state of Input Module (V1)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 I Indicate F InputFilter 0 0 0 0 0 0 0 0 0 0 13 10
  • The ID0..3 is the destination slave address
  • Since this instruction is used to check Input module, ID0 must be equal to "I"
  • Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
  • InputFilter: When an InputFilter is used, byte6 must be equal to "F". InputFilter (for example 10) represents the number of Inputcycles (The input module scans his inputs) the inputmodule will do before it accepts an input change. This value is used to filter unwanted spikes or noise on the cables of the switches. See also Memory Model Page 0 Byte 92.
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RC ID0 ID1 ID2 ID3 InputState P PC PulseCounter(PC).Byte1 PulseCounter(PC).Byte0 C CRC.Byte1 CRC.Byte0 13 10 13 10
  • The ID0..ID3 address is the originating slave address but all RC messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
  • PC: Every input Module will keep a PulseCounter for the 8 inputs of this module. During every scan, one of the 8 (0-7) PulseCounters (PC) will be sent over to the Master Controller. PC (0-7) will indicate which pulsecounter information of which input is sent over.
  • PulseCounter(PC).Byte1 and Byte0: PulseCounter variable, Pulsecounter will keep track of the number of times an input is activated. Pulsecounter value ranges from 0 to 65535. When the 65535 is reached and the input is activated again, Pulsecounter will go to 0 and will continue counting.
  • CRC.Byte1 and Byte0: Sum of byte 4 to 9

Request state of Input Module (V2): Input state

Request M->S
' 0 1 2 3 4 5 6 7
ST ID0 ID1 ID2 ID3 i Indicate 13 10
  • The ID0..3 is the destination slave address
  • Since this instruction is used to check Input module, ID0 must be equal to "I"
  • Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
Response S->M (input information only)
' 0 1 2 3 4 5 6 7 8 9 10
RC ID0 ID1 ID2 ID3 i InputState C CRC.Byte1 CRC.Byte0 13 10
  • The ID0..ID3 address is the originating slave address but all RC messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
  • CRC.Byte1 and Byte0: Sum of byte 4 to 5

Request state of Input Module (V2): Input state with partial Pulsecounter info

Request M->S
' 0 1 2 3 4 5 6 7
ST ID0 ID1 ID2 ID3 n Indicate 13 10
  • The ID0..3 is the destination slave address
  • Since this instruction is used to check Input module, ID0 must be equal to "I"
  • Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
Response S->M (input and partial pulse counter information)
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
RC ID0 ID1 ID2 ID3 n InputState Pulsecounter_nr Pulse Data0 Pulse Data1 Pulse Data2 Pulse Data3 Pulse Data4 Pulse Data5 C CRC.Byte1 CRC.Byte0 13 10
  • The ID0..ID3 address is the originating slave address but all RC messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
  • CRC.Byte1 and Byte0: Sum of byte 4 to 12
  • Pulsecounter_nr (0-7) is the input_nr of which the Pulsecounter info is being sent. The input module will round robin (0,1,2,3,4,5,6,7,0,1,2,...) sent all the Pulsecounter info each time the input state is requested.
  • Pulse Data0..3: In these 4 bytes, the counter value of pulseCounter_nr (0-7) is stored (Pulse Data0 -> MSB)
  • Pulse Data4 & 5: CRC16 result of calculation of Pulse Data0..3

Request state of Input Module (V2): Partial Pulse Counter information

Request M->S
' 0 1 2 3 4 5 6 7
ST ID0 ID1 ID2 ID3 p Input Nr 13 10
  • The ID0..3 is the destination slave address
  • Since this instruction is used to check Input module, ID0 must be equal to "I"
  • Input Nr: This is the Input Nr (0 to 7) from which the Pulse Counter information is requested
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
RC ID0 ID1 ID2 ID3 p Input Nr Pulse Data0 Pulse Data1 Pulse Data2 Pulse Data3 Pulse Data4 Pulse Data5 C CRC.Byte1 CRC.Byte0 13 10
  • The ID0..ID3 address is the originating slave address but all RC messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
  • Pulse Data0..3: In these 4 bytes, the counter value is stored (Pulse Data0 -> MSB)
  • Pulse Data4 & 5: CRC16 result of calculation of Pulse Data0..3
  • CRC.Byte1 and Byte0: Sum of byte 4 to 11

Request state of Input Module (V2): Full Pulse Counter information

Request M->S
' 0 1 2 3 4 5 6 7
ST ID0 ID1 ID2 ID3 P Config 13 10
  • The ID0..3 is the destination slave address
  • Since this instruction is used to check Input module, ID0 must be equal to "I"
  • Config: Not used for the moment
Response S->M
' 0 1 2 3 4 5 6 7 ... 52 53 54 55 56 57 58
RC ID0 ID1 ID2 ID3 P Config Pulse Data0 Pulse Data1 ... Pulse Data46 Pulse Data47 C CRC.Byte1 CRC.Byte0 13 10
  • The ID0..ID3 address is the originating slave address but all RC messages are always for the Master Controller since this controller is the Master of the RS485 bus. In this case, ID0="I".
  • Pulse Data0..3: In these 4 bytes, the counter value is stored (Pulse Data0 -> MSB) for Input 0
  • Pulse Data4 & 5: CRC16 result of calculation of Pulse Data0..3 for Input 0
  • Pulse Data6..9: In these 4 bytes, the counter value is stored (Pulse Data0 -> MSB) for Input 1
  • Pulse Data10 & 11: CRC16 result of calculation of Pulse Data0..3 for Input 1
  • ...
  • CRC.Byte1 and Byte0: Sum of byte 4 to 53

Request state of Oled Module (V1)

The Oled Module is a display module with touch screen capable is displaying all information available on the bus. To accomplish this and make programming simple, the Oled display acts as a scanner on the bus listening to all messages. In this way, the Oled module knows the state of all outputs, know the input states etc. To have also all ID information of the modules, output names, thermostat configurations etc, the Oled Module will receive a copy of the Master Controller Eeprom. Every time the Master controller sends a message to the Oled Module, a byte of the Master eeprom is sent over.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 I EepromAddress.Byte1 EepromAddress.Byte0 EepromData ThermostatNr SetPoint(ThermostatNr) ThermostatMode TemperatureNr Temperature(TemperatureNr) OledActionType OLedActionNr Hours Minutes Day 13 10
  • Since this instruction is used to check Oled module, ID0 must be equal to "L"
  • EepromAddress.Byte1: Page of the Master Controller eeprom
  • EepromAddress.Byte0: Byte nr of the Master Controller eeprom
  • Data: Byte that is programmed at EepromAddress.Byte0 and 1 in the eeprom of the Master controller (see Memory Model for more details)
    • With every scan, a new byte is sent over
    • When new info is programmed in the Master Eeprom, that data is first sent over to the Oled Module
  • ThermostatNr: Number (0-23) for which thermostat information is sent over
  • Setpoint(ThermsotatNr): Sent over the Setpoint temperature (in System Value format) of ThermostatNr
  • ThermostatMode: See Thermostat Mode
  • TemperatureNr: Number (0-31) for which temperature sensor information is sent over
  • Temperature(TemperatureNr): Temperature (in System Value format) of sensor TemperatureNr
  • OledActionType and OledActionNr: The Master can request is Oled Module to execute certain actions like Switch ON/OFF display, enable/disable touchscreen, set the automatic switch off time etc.
  • Hours: Current time -> Hour
  • Minutes: Current time -> minutes
  • Day: Current time -> Day of the week (1 Mon, ... , 7 Sun)
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 0 0 Action Type Action Nr OledInstruction 0 OledInstruction 1 13 10 13 10
  • Action Type and Action Number: The Oled display can sent basic actions to be executed on the Master (switch on/off lights, all off, increase setpoint etc)
  • OledInstruction 0 and 1: Additional instructions can be sent like setting setpoints or program other parameters

Request Temp/Hum/ADC of 8 ports Sensor Module (V1&V2)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12
ST ID0 ID1 ID2 ID3 Type Indicate 0 0 0 0 0 13 10
  • Since this instruction is used to check Temperature module, ID0 must be equal to "T"
  • Type: "T" to request Temperature values, "H" to request Humidity values and "A" to request ADC value, "P" to request PID values (HVAC module)
  • Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
Response S->M (Type="H" or "T" or "A")
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
RC ID0 ID1 ID2 ID3 Type Value0 Value1 Value2 Value3 Value4 Value5 Value6 Value7 C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Value0..7: All 8 values of the 8 sensors will be transmitted. The value content depends on the Type (Temperature, Humidity or ADC) selected.
  • CRC.Byte1 and Byte0: Sum of byte 4 to 12
  • All values are in [System Value] format

Request Temp/Hum/ADC of HVAC module (V2)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
ST ID0 ID1 ID2 ID3 Type Indicate s Setpt0 Setpt1 Setpt2 Setpt3 Setpt4 Setpt5 Setpt6 Setpt7 Mode0 Mode1 Mode2 Mode3 Mode4 Mode5 Mode6 Mode7 C CRC.Byte1 CRC.Byte0 13 10
  • Since this instruction is used to check Temperature module, ID0 must be equal to "T"
  • Type: "T" to request Temperature values, "H" to request Humidity values, "A" to request brightness value and "a" to request 16 bits AD value
  • Setpt0..7: These are the programmed set points in the Master that are shared with the HVAC module
  • Indicate: Does the Input status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
  • Mode x: Thermostat_Mode.BIT0=0 -> Heating, =1 -> Cooling
Response S->M (Type="H" or "T" or "A")
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
RC ID0 ID1 ID2 ID3 Type Value0 Value1 Value2 Value3 Value4 Value5 Value6 Value7 C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Value0..7: All 8 values of the 8 sensors will be transmitted. The value content depends on the Type (Temperature, Humidity or ADC) selected.
  • CRC.Byte1 and Byte0: Sum of byte 4 to 12
  • All values are in [System Value] format
Response S->M (Type="P")
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
RC ID0 ID1 ID2 ID3 P PID_nr Enabled H/C Sensor_nr Temp Setpoint Error.MSB Error.LSB P.MSB P.LSB I.MSB I.LSB D.MSB D.LSB PID_calc.MSB PID_calc.LSB Output_nr Output_value C CRC.Byte1 CRC.Byte0 13 10 13 10
  • CRC.Byte1 and Byte0: Sum of byte 4 to 22
  • All values are in [System Value] format
  • PID_nr: HVAC module has standard 2 pid's (0 & 1) that can be used
  • Enabled: PID_nr is enabled (=1) or disabled (=0)
  • H/C: Heating (=0) or Cooling (=1)
  • Temp: Temperature of the sensor that has been configured
  • Setpoint: Temperature setpoint of Sensor_nr
  • Error: Calculated PID Error
  • P, I & D: Individual Calculated PID results
  • PID_cal: Total PID results
  • Output_nr: HVAC output used for pid_nr
  • Output_value: HVAC output value of output_nr
Response S->M (Type="a")
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27'
RC ID0 ID1 ID2 ID3 a AD0.MSB AD0.LSB AD1.MSB AD1.LSB AD2.MSB AD2.LSB AD3.MSB AD3.LSB AD4.MSB AD4.LSB AD5.MSB AD5.LSB AD6.MSB AD6.LSB AD7.MSB AD7.LSB C CRC.Byte1 CRC.Byte0 13 10 13 10
  • CRC.Byte1 and Byte0: Sum of byte 4 to 20
  • 8 AD values in 16 bits format are returned. MSB -> Most significant Byte, LSB -> Least Significant Byte

Request Temperature of 16 ports Temperature Module (V1)

This is the communication protocol for the 16 ports (not in production anymore) temperature module. Since only 1 of those modules can be connected on 1 Master controller, this module doesn't have a specific address. These modules can be enabled/disabled by using CLI command temperature module enable and temperature module disable. For more information, see CLI Reference Guide.

Request M->S
' 0 1 2 3 4 5 6 7
ST T 0 0 0 T 0 13 10
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
ST T 0 0 0 T Temp0 Temp1 Temp2 Temp3 Temp4 Temp5 Temp6 Temp7 Temp8 Temp9 Temp10 Temp11 Temp12 Temp13 Temp14 Temp15 13 10 13 10
  • Temp0..15: Temperature information of all 16 temperature probes connected
  • All temperature values are in System Value format

Sent Output command to Output Module (V1)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 Out Indicate Dim Value0 Dim Value1 Dim Value2 Dim Value3 Dim Value4 Dim Value5 Dim Value6 Dim Value7 C CRC.Byte1 CRC.Byte0 0 13 10
  • Since this instruction is used to check an Output module, ID0 must be equal to "O", "R" or "D"
  • Indicate: Does the Output status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
  • Out: Output status of the 8 outputs, each bit represents 1 output.
  • Dim Value0..7: For each output, the dimmer value (0-63) is transmitted as well.
  • CRC.Byte1 and Byte0: Sum of byte 4 to 13
Response S->M
' 0 1 2 3 4 5 6 7 8 9
RC ID0 ID1 ID2 ID3 K Out 13 10 13 10

Sent Output command to Output or Dim Control Module (V2)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 o Out Indicate Dim Value0 Dim Value1 Dim Value2 Dim Value3 Dim Value4 Dim Value5 Dim Value6 Dim Value7 C CRC16.Byte1 CRC16.Byte0 13 10
  • Since this instruction is used to check an Output module, ID0 must be equal to "O", "R" or "D"
  • Indicate: Does the Output status leds needs any flashing. When Indicate=255, leds at normal state. When Indicate.Bit0=0 -> Led1 flashing, Indicate.Bit1=0 -> Led2 flashing etc
  • Out: Output status of the 8 outputs, each bit represents 1 output.
  • Dim Value0..7: For each output, the dimmer value (0-63) is transmitted as well.
  • CRC16.Byte1 and Byte0: CRC16 of byte 0 to 14
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12
RC ID0 ID1 ID2 ID3 K Out C CRC16.MSB CRC16.LSB 13 10 13 10

Sent variable length messages to the Can Control Module (V2)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
ST ID0 ID1 ID2 ID3 Instr_type Length Queue_Size Data_1 ... Data_n C CSUM.MSB CSUM.LSB 13 10
  • The variable type of instructions are only used in combination with the Core/Core+
  • These instructions are only available in the Can Control Firmware V6.x.y which is a dedicated version for the Core/Core+
  • Since these instructions are used to check a Can Control module, ID0 must be equal to "C"
  • Length: This byte represents the length of the data payload, min 1 and max 11.
  • Queue_Size: If a message is sent from one side to the other, the receiving entity must understand if more then 1 message will be send. So when Queue_Size>0, another message will follow.
  • Data_1..Data_n: The number of bytes the data payload will have depends on the length byte (between 1 and 11 bytes in total as data payload size)
  • See Can Control RS485 Communication Protocol for detailed Can Control messages for the Core/Core+.
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
RC ID0 ID1 ID2 ID3 Instr_type Length Queue_Size Data_1 ... Data_Length C CSUM.MSB CSUM.LSB 13 10

BroadCast Messages

Sent Broadcast Message (V1&V2)

Broadcast message will be sent by the Master controller and interpreted by all modules on the RS485 bus. Some broadcasts are intended for certain modules and will be only executed by those modules.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST BroadID 0 0 0 Broad1 Broad2 Extra Parameter1 Extra Parameter2 0 0 0 0 0 0 0 0 0 0 13 10

Below, you can find the table of the different Broadcast messages that exist:

BroadID Broad1 Broad2 Description
0
L
L
Put Bus in Live Mode (Normal operations)
0
I
I
Put Bus in Init Mode (Normal operations is not possible, new modules can be added in this mode)
0
P
F
Switch 5V output (Sensors are connected to this feed) OFF of all 8ports temperature modules
0
P
N
Switch 5V output (Sensors are connected to this feed) ON of all 8ports temperature modules
0
C
C
Put all Pulse counters of all input modules to 0
0
N
N
Put all modules on Normal Power mode (leave Power Save mode) so all leds that needs to be ON will be ON
0
S
S
Put all modules on Power Save Mode and only keep Power and status led ON, all the rest must be switched OFF
0
M
M
Start the measuring process of the connected Sensors (on the Temperature Modules)
0
S
M
Search Module (Core/Core+ only): This broadcast will be used in discovery mode to detect (and add) new modules. The modules that are new will respond with the same message as pushing the init button during initialisation. More modules could be responding at the same time so the Core/Core+ needs to handle bus collision and detection methods. See Note for more in detail explanation.
0
S
U
Startup: This broadcast will be send every time the Master starts-up.
0
C
P
CAN Power (Extra Parameter1="R"): This broadcast will will switch the CAN power ON (Extra Parameter2=1) or OFF (Extra Parameter2=0) of the CAN Control.
21
F
R
FACTORY RESET: Extra Parameter1=17 & Extra Parameter2=69: Perform Factory reset of the connected RS485 slave modules. The Factory Reset will only be executed by the RS485 slave module when the RS485 bus is in Discovery Mode. This instruction is V2 only.
Note regarding SM broadcast

The SM broadcast is a message that is sent to discover which of the modules are new. This message structure is slightly different:

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST 0 0 0 0 S M ID0 ID1 ID2 ID3 New_existing Data0 Data1 Data2 Selection C CRC16.MSB CRC16.LSB 13 10

The purpose of this message is to detect if certain new or existing modules are present on the bus. For example, I could request modules to answer with ID I.x.x.50 (x=don't care) and which are for example New. The selection byte will indicate which are the selection criteria and which byte have the "don't care" label.

  • ID0..ID3: The module ID
  • New_existing: "N" -> New module, "E" -> Existing module
  • Selection: Selection byte is used to indicate to the remote modules which criteria to use to decide if it needs to answer or not (BIT=0->don't care, BIT=1->Use). For example: Selection=0b10010000 then only byte ID0 and ID3 are relevant, if ID0 and ID3 are the same as one (or more) of the modules on the bus, those modules need to respond.
    • Selection.BIT7 (MSB): ID0
    • Selection.BIT6: ID1
    • Selection.BIT5: ID2
    • Selection.BIT4: ID3
    • Selection.BIT3: New_existing
    • Selection.BIT2: Data0 (Not in use)
    • Selection.BIT1: Data1 (Not in use)
    • Selection.BIT0 (LSB): Data2 (Not in use)
  • CRC16.MSB & CRC16.LSB: This is the result of the CRC calculation (Byte0 to Byte14). Please note that not a checksum is used but CRC16.

Messages in Discovery Mode

Read Slave eeprom (V2)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12
ST ID0 ID1 ID2 ID3 R Eeprom_Address.MSB Eeprom_Address.LSB 0 C CRC16.Byte1 CRC16.Byte0 13 10
  • The ID0..3 is the destination slave address
  • Eeprom_Address: This is the address of the byte of the eeprom to be read
  • CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12
RC ID0 ID1 ID2 ID3 R Eeprom_Address.MSB Eeprom_Address.LSB Eeprom_Value C CRC16.Byte1 CRC16.Byte0 13 10
  • Eeprom_Value: This is the value read from eeprom @ address
  • CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7

Write slave eeprom (V2)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12
ST ID0 ID1 ID2 ID3 W Eeprom_Address.MSB Eeprom_Address.LSB Eeprom_Value C CRC16.Byte1 CRC16.Byte0 13 10
  • The ID0..3 is the destination slave address
  • Eeprom_Address: This is the address of the byte of the eeprom to be written
  • CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12
RC ID0 ID1 ID2 ID3 W Eeprom_Address.MSB Eeprom_Address.LSB Eeprom_Value C CRC16.Byte1 CRC16.Byte0 13 10
  • Eeprom_Value: This is the value that has been written (read again after being written)
  • CRC16.Byte1 and Byte0: CRC16 of byte 0 to 7

Message when pushing Init button (V1&V2)

When the Init button is pressed (or when an input of the Input module is activated) when the Bus is in initialization mode, the below message will be sent from the slave to the Master controller. In the event the module doesn't exist yet, the module will be added in the module list of the Master and the message xxx will be returned to the Slave.

sent when init button is pressed S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12
RC ID0 ID1 ID2 ID3 InputState Module NE C CRC16.MSB CRC16.LSB 13 10 13 10
  • ID0..3: This is the ID of the module. This ID is randomly generated except for ID0 which indicate the module type ("I" for Input module, "O" for output module, "D" for dimmer mdoule etc)
  • Inputstate: When one of the inputs of an input module is activated, Inputstate will indicate which of the 8 inputs is activated.
  • Module NE: When a module is new (N) and not yet added to the Module list of the Master controller, Module NE="N". When the module is an existing module, Module NE="N".
  • "C" for CRC: This byte and the CRC is only sent in combination with the Core/Core+
  • CRC16.MSB & CRC16.LSB: This is the result of the CRC calculation (Byte0 to Byte5). Please note that not a checksum is used but CRC16.
  • See Init Process for more detailed explanation.
Response M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST A D ID0 ID1 ID2 ID3 Data1 Data2 0 0 0 0 0 0 0 C CRC16.MSB CRC16.LSB 13 10
  • This message will be sent when a new module has been added in the Module list of the Master Controller.
  • "C" for CRC: This byte and the CRC is only sent in combination with the Core/Core+
  • CRC16.MSB & CRC16.LSB: This is the result of the CRC calculation (Byte0 to Byte14). Please note that not a checksum is used but CRC16.
  • See Init Process for more detailed explanation.
  • If Data1="M" then in data2, the Master module nr will be found. For example, if the button of the input module that represents input 8-15 is pressed, data2=1 (module Nr 1).

Sent Broadcast Message (V1&V2)

Broadcast message will be sent by the Master controller and interpreted by all modules on the RS485 bus. Some broadcasts are intended for certain modules and will be only executed by those modules.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST BroadID 0 0 0 Broad1 Broad2 0 0 0 0 0 0 0 0 0 C CRC16.MSB CRC16.LSB 13 10

Below, you can find the table of the different Broadcast messages that exist:

BroadID Broad1 Broad2 Description
0
L
L
Put Bus in Live Mode (Normal operations)
0
I
I
Put Bus in Init Mode (Normal operations is not possible, new modules can be added in this mode)
0
P
F
Switch 5V output (Sensors are connected to this feed) OFF of all 8ports temperature modules
0
P
N
Switch 5V output (Sensors are connected to this feed) ON of all 8ports temperature modules
0
C
C
Put all Pulse counters of all input modules to 0
0
N
N
Put all modules on Normal Power mode (leave Power Save mode) so all leds that needs to be ON will be ON
0
S
S
Put all modules on Power Save Mode and only keep Power and status led ON, all the rest must be switched OFF
0
M
M
Start the measuring process of the connected Sensors (on the Temperature Modules)
0
S
M
Search Module (Core/Core+ only): This broadcast will be used in discovery mode to detect (and add) new modules. The modules that are new will respond with the same message as pushing the init button during initialisation. More modules could be responding at the same time so the Core/Core+ needs to handle bus collision and detection methods.
  • "C" for CRC: This byte and the CRC is only sent in combination with the Core/Core+
  • CRC16.MSB & CRC16.LSB: This is the result of the CRC calculation (Byte0 to Byte14). Please note that not a checksum is used but CRC16.

Erase CAN Control (V1)

This message will only be accepted by the CAN Control slave when the bus is in Discovery mode. This message can erase the sensors or the inputs (and thus factory reset the uCAN's connected to this CAN Control).

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST C ID1 ID2 ID3 E Type 171 0 0 0 0 0 0 0 0 C CRC16.MSB CRC16.LSB 13 10
  • Type: ="I" -> Erase inputs, "S" -> Erase Sensors
  • ID1..3: ID of the CAN control to be erased
Response S->M

No response

Message during test procedure (V2)

This message is used to test RS485 communication during hardware testing of the Brain(+). The Brain(+) will receive a CAN message that will be responded by this RS485 message when the bus is placed in discovery mode.

sent when test CAN message is received S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC 0 0 0 0 T T Test Message C CRC.MSB CRC.LSB 13 10 13 10
  • ID0..3: This is the ID of the module. The ID is not used in this message
  • "C" for CRC: This byte and the CRC
  • CRC.MSB & CRC.LSB: This is the result of the Checksum calculation
  • Test Message is a value that is received over the CAN bus and is retransmitted over RS485

Messages in Bootloader Mode

Put messages on the CAN bus (V1&V2)

This instruction will forward messages through the CAN control directly on the connected CAN bus. The response will return through the CAN control towards the Master. These messages will not be interpreted by the CAN Control and will only be forwarded to the Master. All these messages will be sent with SID=0.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
ST ID0 ID1 ID2 ID3 F M Nr Of Bytes SID C_Byte0 C_Byte1 C_Byte2 C_Byte3 C_Byte4 C_Byte5 C_Byte6 C_Byte7 C CRC.Byte1 CRC.Byte0 13 10
  • ID0..3: ID of the CAN Control Module
  • Nr Of Bytes: These are the number of bytes that will be sent on the CAN Bus (Min 2, Max 8)
  • C_Byte0..C_Byte7: These are the bytes that will be put on the CAN bus
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte15
  • SID: This is the CAN SID that will be used to transmit the CAN message on the CAN bus
  • All normal communication has SID=6, all communication to prepare boot loading has SID=5, boot loading itself has SID=0
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
RC ID0 ID1 ID2 ID3 F M Nr Of Bytes SID C_Byte0 C_Byte1 C_Byte2 C_Byte3 C_Byte4 C_Byte5 C_Byte6 C_Byte7 C CRC.Byte1 CRC.Byte0 13 10 13 10
  • See Micro CAN Bootloader for more information how the Bootloader of the Micro CAN Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte15

Request Information from the CAN Control to prepare boot loading of a Micro CAN (V1&V2)

This instruction will request information from the CAN control like the number of Micro CAN's are connected to a certain CAN control as well as the ID of the Micro CAN.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F S Instr can_nr 0 0 0 0 0 0 0 C CRC.Byte1 CRC.Byte0 13 10
  • ID0..3: ID of the CAN Control Module
  • Instr: If Instr=0 -> Request number of connected Micro CAN's (can_nr is ignored), If instr=1 -> Request ID of Micro CAN with can_nr
  • If for example the received number of connected Micro CAN's is 7, the software should request the ID of can_nr 0 to 6.
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte14
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
RC ID0 ID1 ID2 ID3 F S Instr can_nr data0 data1 data2 C CRC.Byte1 CRC.Byte0 13 10 13 10
  • data0..2: These are the 3 data bytes containing the requested information:
    • Instr=0: data0 contains the number of Micro CAN's connected to the CAN Control with ID0..3. data1 and data2 can be ignored.
    • Instr=1: data0 contains ID0 of the requested Micro CAN, data1 contains ID1, data2 contains ID2
  • See Micro CAN Bootloader for more information how the Bootloader of the Micro CAN Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte10

Reset Slave and wait x seconds (V1&V2)

This instruction will reset the addressed RS485 slave module and put them in bootloader mode for x seconds.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F R x C CRC.Byte1 CRC.Byte0 0 0 0 0 0 0 0 0 13 10
  • ID0..3 =ID of the module that needs to be brought in bootload mode
  • x= number of seconds the module will remain in bootloader mode.
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F R Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6

Erase External Eeprom Slave Module (V1&V2)

This instruction will erase the external Eeprom of the slave module and bring it back to factory reset. This instruction is only applicable for the CAN Control since this is the only module with an external eeprom built-in.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F X Instr C CRC.Byte1 CRC.Byte0 0 0 0 0 0 0 0 0 13 10
  • ID0..3 =ID of the module that needs the eeprom to be erased.
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6
  • Instr: Instruction will indicate which type of erase is requested. If Instr=0 then full erase is performed (=ID of the CAN modules will be erased, Eeprom of the CAN module will be erased, connected uCAN's will be erased), if instr=1 then only the Number of Inputs of the CAN control will be erased (the connected uCAN's inputs will be set to factory reset), if instr=2 then only the Number of sensors of the CAN control will be erased (the connected uCAN's sensors will be set to factory reset)
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F X Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6
  • The response will be sent before the process of erasing starts so the response is not an indication of a successful erase. The erase typically takes multiple minutes and during the erase, the status led will flash until the process is done. Once done, the module internal and external eeprom will be erased including the module ID (the master can only communicate again with this module after the discovery process is executed).
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes

Set Fw version of the new firmware to be loaded (V1&V2)

This instruction will prepare the RS485 slave modules to receive new firmware. This instruction will only work when the remote module is in boot loader mode.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F N F1N F2N F3N C CRC.Byte1 CRC.Byte0 0 0 0 0 0 0 13 10
  • ID0..3 = ID of the Slave module addressed
  • F1N, F2N and F3N: Major firmware version, minor and built of the new code section that will be loaded
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte8
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F N Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6

Set CRC of the new firmware to be loaded (V1&V2)

This instruction will write the full CRC of the new firmware version to be loaded. This instruction will only work when the remote module is in Bootloader mode.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F C CRC3C CRC2C CRC1C CRC0C C CRC.Byte1 CRC.Byte0 0 0 0 0 0 13 10
  • ID0..3 = ID of the Slave module addressed
  • CRC3C, CRC2C, CRC1C and CRC0C: 4 bytes CRC of the new firmware to be written
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte9
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F C Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6

Sent a block (64 bytes) of firmware (V1&V2)

This instruction will upload 1 block (64 bytes) of new RS485 slave firmware to 1 RS485 slave. This instruction will only work when the remote module is in boot loader mode and when the API communication protocol of the Master Controller is put on 77 bytes (See API instruction “cm” in the API Reference Guide).

The goal of this instruction is to sent 1 block (64 bytes) of new firmware to 1 module.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 ... 71 72 73 74 75 76
ST ID0 ID1 ID2 ID3 F D Addr1 Addr0 Data0 Data1 ... Data63 C CRC.Byte1 CRC.Byte0 13 10
  • Addr1-0: Address of block to be written
  • Data0-63: This contains 1 block (64 bytes) of firmware.
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte71
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F D Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6

End the Firmware upload and check integrity of the firmware with the programmed CRC (V1&V2)

This instruction will end the firmware download operation of the RS485 slave module and will trigger the integrity check of the downloaded firmware. The variable ‘Err’ will indicate the result of the downloaded firmware. This instruction must be executed after full firmware download.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F E C CRC.Byte1 CRC.Byte0 0 0 0 0 0 0 0 0 0 13 10
  • ID0..3 = ID of the Slave module addressed
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte5
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F E Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6

Check Firmware version (V1&V2)

This instruction will request version information from any RS485 slave device active on the RS485 bus.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F V C CRC.Byte1 CRC.Byte0 0 0 0 0 0 0 0 0 0 13 10
  • ID0..3 = ID of the Slave module addressed
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte5
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
RC ID0 ID1 ID2 ID3 F V Err Hw F1 F2 F3 Stat C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Hw: Hardware version type
  • F1, F2 and F3: Major firmware version, minor and built of the active code section
  • Stat: status of the application firmware code and the Total CRC. (0 if match, 1 if some mismatch) (only updated if the FE command is send)
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte11

Check Firmware version and serial number (V2)

This instruction will request firmware version and serial number information from any RS485 slave device active on the RS485 bus.

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F L C CRC.Byte1 CRC.Byte0 0 0 0 0 0 0 0 0 0 13 10
  • ID0..3 = ID of the Slave module addressed
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte5
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
RC ID0 ID1 ID2 ID3 F L Err Hw F1 F2 F3 Stat year Month Day Company Serial.MSB Serial.LSB Errors C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Hw: Hardware version type
  • F1, F2 and F3: Major firmware version, minor and built of the active code section
  • Stat: status of the application firmware code and the Total CRC. (0 if match, 1 if some mismatch) (only updated if the FE command is send)
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte18
  • Year: Testing year of this Module
  • Month: Testing Month
  • Day: Testing Day
  • Company: Production company that performed the testing (0: Openmotics, 1: Page, ...)
  • Serial.MSB & Serial.LSB: Serial number
  • The full serial number is composed out of following elements: production date + production company + serial number
  • Errors: Number of errors that have been found during testing

Goto to App mode (leave bootloader mode) (V1&V2)

This instruction will put the slave module back in normal (App) mode (leave bootloader mode)

Request M->S
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
ST ID0 ID1 ID2 ID3 F G C CRC.Byte1 CRC.Byte0 0 0 0 0 0 0 0 0 0 13 10
  • ID0..3 = ID of the Slave module addressed
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte5
Response S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F G Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6

Message when pushing Init button (V1&V2)

When the module is in Bootloader mode and the init button is pressed, the below message is sent.

Sent when init button is pressed S->M
' 0 1 2 3 4 5 6 7 8 9 10 11 12 13
RC ID0 ID1 ID2 ID3 F B Err C CRC.Byte1 CRC.Byte0 13 10 13 10
  • Err: Error code received from module in Bootloader, see Bootloader Error Codes
  • See Bootloader for more information how the Bootloader of the Remote Modules works
  • CRC.Byte1 (MSB) and CRC.Byte0 (LSB): Sum of Byte0 to Byte6