API Reference Guide P1

From OpenMotics
Jump to navigation Jump to search

Introduction

The P1 module is a concentrator for 8 energy meters with a P1 port. The 8 P1 ports will be connected to the P1 module, the P1 module is connected over RS485 to the Gateway. The Master processor is not involved in the communication flow and all communication is performed on the RS485 bus that is directly connected on the Beagle Bone.

The P1 Module will scan all 8 P1 ports, request and read the full meter data, extract the necessary data and put it in memory of the P1 Module. The information received from the P1 meter is in readable ascii format, this same format will be kept, put in memory of the P1 module and transmit over the API.

Many of the below API instruction will send the data of the 8 connected ports. For example, API instruction “V1” will send Voltage 1 of the 8 connected P1 meters. The voltage is an asci representation of the actual voltage including the decimal point and the “V”. The asci representation of the Voltage is 7 bytes, example: “241.8*V”. All 8 meters will be sent in 1 payload of 56 bytes (8x7bytes) where the first bytes received are from meter 1, then meter 2 etc

G->M: Gateway request information from Module M->G: Module responds to a request of the gateway

The instruction Format looks as follows:

Request G->M
' 0 1 2 3 4 5 6 7 8..x x+1 x+2 x+3
STR Addr1 Addr0 CID Mode Instr2 Instr1 Instr0 length Data… CRC 13 10
  • module type, in the case of the P1 concentrator it’s “C”
  • Addr0: This is the module number (0-255) that the module receives during initialization
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Instr2..0: Those 3 bytes are the instruction what’s been Set or Get, those instruction are always represented as ascii characters. For example instruction "SP0" will be sent in decimal format as 83 80 48.
  • Length: This is the length of the data payload that follows. This byte will be sent as an integer in other words, if 10 bytes must be sent, the length byte will be sent in decimal format as 10.
  • Data: These are the data byte(s) that forms the payload
  • CRC: This is the CRC8 result byte that has been calculated over the data payload
  • X=7+length
  • Addr1 will always be "C" and will be sent in decimal byte format as 67 or in hex byte format as 0x43.
  • Addr0 is one byte for the address. When the address is 99, the address will be sent in decimal format as 99.

The P1 module can be in Normal Mode or in Init Mode. In Normal Mode, all meters will be read and the Gateway can request the different Meter values. In Init mode, the address will be set and initialisation will be done.

API Instructions Normal Mode

SPx -> Request Status P1 Port

This instruction will request the Status of the P1 Port. The P1 module has hardware built-in to detect if a P1 meter is detected. The status byte will indicate (1 bit per meter, 1=meter is connected, 0=No meter connected) the status of the 8 meters (Most significant bit -> Meter 8, Least significant bit -> Meter 1)

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode S P 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8 9 10 11
RTR C Addr0 CID Mode S P 0 1 status CRC 13 10
  • status: This is the byte that represents the status of the connected meters (1=connected, 0=not connected, Most significant Bit=Status Meter 8, Least Significant Bit=Status Meter 1)
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

V1x -> Request Voltage 1 of all meters

This instruction will request Voltage 1 of all meters. This instruction will send all Voltages (32.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode V 1 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..63 64 65 66
RTR C Addr0 CID Mode V 1 0 56 data CRC 13 10
  • The Voltage of 1 port is 7 bytes long and is represented in a readable asci format. Example: “241.8*V”
  • Data: These are the data byte(s) that forms the payload, in this case 56 bytes, 7 bytes per voltage x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

V2x -> Request Voltage 2 of all meters

This instruction will request Voltage 2 of all meters. This instruction will send all Voltages (52.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode V 2 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..63 64 65 66
RTR C Addr0 CID Mode V 2 0 56 data CRC 13 10
  • The Voltage of 2 port is 7 bytes long and is represented in a readable asci format. Example: “241.8*V”
  • Data: These are the data byte(s) that forms the payload, in this case 56 bytes, 7 bytes per voltage x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

V3x -> Request Voltage 3 of all meters

This instruction will request Voltage 3 of all meters. This instruction will send all Voltages (72.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode V 3 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..63 64 65 66
RTR C Addr0 CID Mode V 3 0 56 data CRC 13 10
  • The Voltage of 3 port is 7 bytes long and is represented in a readable asci format. Example: “241.8*V”
  • Data: These are the data byte(s) that forms the payload, in this case 56 bytes, 7 bytes per voltage x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

C1x -> Request Current 1 of all meters

This instruction will request Current 1 of all meters. This instruction will send all Currents (31.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode C 1 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..47 48 49 50
RTR C Addr0 CID Mode C 1 0 40 data CRC 13 10
  • The Current of 1 port is 5 bytes long and is represented in a readable asci format. Example: “003*A”
  • Data: These are the data byte(s) that forms the payload, in this case 40 bytes, 5 bytes per current x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

C2x -> Request Current 2 of all meters

This instruction will request Current 2 of all meters. This instruction will send all Currents (51.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode C 2 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..47 48 49 50
RTR C Addr0 CID Mode C 2 0 40 data CRC 13 10
  • The Current of 1 port is 5 bytes long and is represented in a readable asci format. Example: “003*A”
  • Data: These are the data byte(s) that forms the payload, in this case 40 bytes, 5 bytes per current x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

C3x -> Request Current 3 of all meters

This instruction will request Current 3 of all meters. This instruction will send all Currents (71.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode C 3 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..47 48 49 50
RTR C Addr0 CID Mode C 3 0 40 data CRC 13 10
  • The Current of 1 port is 5 bytes long and is represented in a readable asci format. Example: “003*A”
  • Data: These are the data byte(s) that forms the payload, in this case 40 bytes, 5 bytes per current x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

M1x -> Request Meter ID1 of all meters

This instruction will request the first Meter ID (electricity) of all meters. This instruction will send Meter ID 1 (96.1.1) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode M 1 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..231 232 233 234
RTR C Addr0 CID Mode M 1 0 224 data CRC 13 10
  • The Meter ID of 1 port is 28 bytes long and is represented in a readable asci format and can contain numbers and letters. Example: “3153414731313030303030373631”
  • Data: These are the data byte(s) that forms the payload, in this case 224 bytes, 28 bytes per Meter ID x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

M2x -> Request Meter ID2 of all meters

This instruction will request the second Meter ID (Gas) of all meters. This instruction will send Meter ID 2 (96.1.1) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode M 2 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..231 232 233 234
RTR C Addr0 CID Mode M 2 0 224 data CRC 13 10
  • The Meter ID of 1 port is 28 bytes long and is represented in a readable asci format and can contain numbers and letters. Example: “3153414731313030303030373631”
  • Data: These are the data byte(s) that forms the payload, in this case 224 bytes, 28 bytes per Meter ID x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

TSx -> Request Time Stamp of all meters

This instruction will request the Time Stamp of all meters. Every data stream that comes from the P1 port includes a Time Stamp. This Time Stamp will be used to verify if the data is actual or outdated. This instruction will send the Time Stamp (1.0.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode T S 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..111 112 113 114
RTR C Addr0 CID Mode T S 0 104 data CRC 13 10
  • The Time Stamp of 1 port is 13 bytes long and is represented in a readable asci format. Example: “190527083152S”
  • Data: These are the data byte(s) that forms the payload, in this case 104 bytes, 13 bytes per Time Stamp x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

c1x -> Request Consumption value Tariff1

This instruction will request the consumption (Tariff 1) of all meters. This instruction will send the Consumption (1.8.1) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode c 1 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..119 120 121 122
RTR C Addr0 CID Mode c 1 0 112 data CRC 13 10
  • The Consumption of 1 port is 14 bytes long and is represented in a readable asci format. Example: “000000.430*kWh”
  • Data: These are the data byte(s) that forms the payload, in this case 112 bytes, 14 bytes per Consumption x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

c2x -> Request Consumption value Tariff2

This instruction will request the consumption (Tariff 2) of all meters. This instruction will send the Consumption (1.8.2) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode c 2 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..119 120 121 122
RTR C Addr0 CID Mode c 2 0 112 data CRC 13 10
  • The Consumption of 1 port is 14 bytes long and is represented in a readable asci format. Example: “000000.430*kWh”
  • Data: These are the data byte(s) that forms the payload, in this case 112 bytes, 14 bytes per Consumption x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

cGx -> Request Consumption Gas

This instruction will request the consumption (Gas) of all meters. This instruction will send the Consumption (24.2.3) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode c G 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..103 104 105 106
RTR C Addr0 CID Mode c G 0 96 data CRC 13 10
  • The Gas Consumption of 1 port is 12 bytes long and is represented in a readable asci format. Example: “00000.000*m3”
  • Data: These are the data byte(s) that forms the payload, in this case 96 bytes, 12 bytes per Consumption x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

i1x -> Request Injection value Tariff1

This instruction will request the Injection (Tariff 1) of all meters. This instruction will send the Injection (2.8.1) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode i 1 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..119 120 121 122
RTR C Addr0 CID Mode i 1 0 112 data CRC 13 10
  • The Injection of 1 port is 14 bytes long and is represented in a readable asci format. Example: “000000.430*kWh”
  • Data: These are the data byte(s) that forms the payload, in this case 112 bytes, 14 bytes per Injection x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

i2x -> Request Injection value Tariff2

This instruction will request the Injection (Tariff 2) of all meters. This instruction will send the Injection (2.8.2) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode i 2 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..119 120 121 122
RTR C Addr0 CID Mode i 2 0 112 data CRC 13 10
  • The Injection of 1 port is 14 bytes long and is represented in a readable asci format. Example: “000000.430*kWh”
  • Data: These are the data byte(s) that forms the payload, in this case 112 bytes, 14 bytes per Injection x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

tix -> Request Tariff Indicator

This instruction will request the Tariff Indicator of all meters. This instruction will send the tariff Indicator (96.14.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode t i 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..39 40 41 42
RTR C Addr0 CID Mode t i 0 32 data CRC 13 10
  • The Tariff Indicator of 1 port is 4 bytes long and is represented in a readable asci format. Example: “0001”
  • Data: These are the data byte(s) that forms the payload, in this case 32 bytes, 4 bytes per Tariff Indicator x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

PDx -> Request Power Delivered

This instruction will request the Delivered Power of all meters. This instruction will send the Power Delivered (1.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode P D 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..39 40 41 42
RTR C Addr0 CID Mode P D 0 72 data CRC 13 10
  • The Power Delivered value of 1 port is 9 bytes long and is represented in a readable asci format. Example: “00.000*kW”
  • Data: These are the data byte(s) that forms the payload, in this case 72 bytes, 9 bytes per Power Delivered value x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

PRx -> Request Power Received

This instruction will request the ReceivedPower of all meters. This instruction will send the Power Received (2.7.0) of all 8 connected meters.

If no meter is connected, character “space” will represent all characters of the non-connected meter. If a meter was connected after start-up of a P1 module, the last value will be sent so make sure to check the timestamp to know the validity of the data.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode P R 0 length CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..39 40 41 42
RTR C Addr0 CID Mode P R 0 72 data CRC 13 10
  • The Power Received value of 1 port is 9 bytes long and is represented in a readable asci format. Example: “00.000*kW”
  • Data: These are the data byte(s) that forms the payload, in this case 72 bytes, 9 bytes per Power Received value x 8 meters
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

API Instructions Init Mode

AGT -> Address Mode GoTo

This instruction will set the modules in Normal or Init mode. When the modules are in Init mode, the address can be programmed by the Gateway in each module.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10 11
STR C Addr0 CID Mode A G T length data CRC 13 10
  • Addr0: Address number of this module
  • Addr0=255, 255 is used because this message is a broadcast to bring all "C" modules in the requested mode
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”S”
  • length=1, 1 data byte will be sent
  • if data=0 -> Normal Mode, if data=1 -> Init mode
Response M->G

No Response

WAD -> Want An Address

When a module is in Init mode and the Init button on the module is pressed, the "WAD" instruction from the Module to the Gateway will be sent to request an address. The gateway will respond with "SAD" (Set An Address). In the SAD instruction, the new address that the Module must take can be found in the data part.

Request M->G
' 0 1 2 3 4 5 6 7 8 9 10
RTR C Addr0 CID Mode W A D length CRC 13 10
  • Addr0: Current Random address for this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • CID=0
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”S”
  • length=0, No data bytes will be sent

Note:

  • When an address is already programmed in an earlier address cyclus, a new address will not be requested
Request G->M
' 0 1 2 3 4 5 6 7 8 9 10 11
STR C Addr0 CID Mode S A D length data CRC 13 10
  • Addr0: Address number of this module
  • Addr0=255, 255 is used because this message is a broadcast to bring all "C" modules in the requested mode
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”S”
  • length=1, 1 data byte will be sent
  • data: The gateway will check which address is free and put it in data. The module will program this address in its eeprom.

ERA -> Erase Address of all modules

This instruction will erase the communication address of all connected modules. When an erase is done, modules that where already being programmed with a network address can be initialised again.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode E R A length CRC 13 10
  • Addr0: Address number of this module
  • Addr0=255, 255 is used because this message is a broadcast to erase all "C" modules
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”S”
  • length=0, No data bytes will be sent
Response M->G

No Response

API Instructions Bootloading Preparation

FVE -> Request Firmware Version

This instruction will request the firmware Version. Before a bootload sequence is started, the Firmware Version will be checked first to see if an upgrade is needed.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10
STR C Addr0 CID Mode F V E 0 CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”G”
  • length=0, no data bytes will be sent
  • CRC=0 since no databytes are being sent
Response M->G
' 0 1 2 3 4 5 6 7 8..11 12 13 14
RTR C Addr0 CID Mode F V E 4 Data CRC 13 10
  • Data: These are the data byte(s) that forms the payload:
    • Data0: This is the first byte that came in and is the Hardware Version
    • Data1: Major Firmware Version
    • Data2: Minor Firmware Version
    • Data3: Firmware Built
  • CRC: This is the CRC8 result byte that has been calculated over the data payload

RES -> Reset Module and set Bootloader time

This instruction will set the time the module must remain in bootloader and the reset the module.

Request G->M
' 0 1 2 3 4 5 6 7 8 9 10 11
STR C Addr0 CID Mode R E S 1 Data CRC 13 10
  • Addr0: Address number of this module
  • CID: Is the Communication ID that the Gateway will sent to the module, the module will always respond with the same communication ID.
  • Mode: “G” is the Get instruction when information is requested from the P1 module, “S” when parameters will be Set on the P1 module
  • Mode=”S”
  • length=1, 1 data byte will be sent
  • Data: Will contain the time (in seconds) that the module will remain in bootloader, data<255.
  • CRC is calculated over the data payload
Response M->G
' 0 1 2 3 4 5 6 7 8. 9 10 11
RTR C Addr0 CID Mode R E S 1 Data CRC 13 10
  • Data: Will contain the time (in seconds) that the module will remain in bootloader
  • CRC: This is the CRC8 result byte that has been calculated over the data payload