Modbus¶
/stm.cgi?modbus_sensor¶
Only in LC3.5+
-
Select the module connected to the serial port (Modbus).
GET /stm.cgi?modbus_sensor=AB
A
is index of Modbus slot 1-3, integer0-2
-
B
is a connected module, integer0-7
,100-102
{ "0": "OFF", "1": "SDM120", "2": "SDM72D-M", "3": "RDO-PRO-X", "4": "Epever Tracer", "5": "Sofarsolar", "6": "GTIL", "7": "Danfos EKC 202C", "100": "custom1 (custom)", "101": "custom2 (custom)", "102": "custom3 (custom)", }
Example:
http://192.168.1.100/stm.cgi?modbus_sensor=00
GET /stm.cgi?modbus_sensor=A
-
A
is a connected module, integer0-7
{ "0": "OFF", "1": "SDM120", "2": "SDM72D-M", "3": "RDO-PRO-X", "4": "Epever Tracer", "5": "Sofarsolar", "6": "GTIL", "7": "Danfos EKC 202C", }
Example:
http://192.168.1.100/stm.cgi?modbus_sensor=0
/stm.cgi?modbusid¶
Only in LC3.5+
-
Set the slave ID for the Modbus RTU sensor.
GET /stm.cgi?modbusid=AB
A
is index of Modbus slot 1-3, integer0-2
B
is the ID, integer
Example:
http://192.168.1.100/stm.cgi?modbusid=01
GET /stm.cgi?modbusid=A
A
is the ID, integer
Example:
http://192.168.1.100/stm.cgi?modbusid=1
/stm.cgi?modbusmapping¶
Added in LC3.5+ SW 1.36
-
Set the mapping of Modbus readings to variables
m1-m30
, for use in HTTP client, MQTT client, OLED, VOLED, Power and Energy.GET /stm.cgi?modbusmapping=A
A
is a list of 30 pairs of slot number (integer0-3
,0
for disabled) and reading number (integer0-29
)
Example:
http://192.168.1.100/stm.cgi?modbusmapping=10*11*12*13*14*15*16*17*18*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00
/stm.cgi?mod_custom_set¶
Added in LC3.5+ SW 1.36
-
Set the custom device name and communication parameters such as bitrate, parity bit and stop bit.
GET /stm.cgi?mod_custom_setA=B*C*D*E*F
A
is a index of custom configuration, integer0-2
B
is a name, string-
C
is a bitrate, integer0-5
{ "5": "4800", // added in SW 1.42b "0": "9600", "1": "19200", "2": "38400", "3": "57600", "4": "115200", }
-
D
is a parity bit, integer E
is a stop bit, integerF
is delay between register reads, integer (when divided by 10 equals real value in seconds), added in SW 1.40
Example:
http://192.168.1.100/stm.cgi?mod_custom_set0=sdm72_custom*0*0*1*1
/post.cgi?mod_custom_save¶
Added in LC3.5+ SW 1.36
-
Set the list of readings for a custom device, specifying name, unit, divisor, register address, function code, type for each.
POST /post.cgi?mod_custom_save &mAB=C*D*E*F*G*H&mAB=C*D*E*F*G*H&mAB=C*D*E*F*G*H&mAB=C*D*E*F*G*H&mAB=C*D*E*F*G*H&&
A
is a index of custom configuration, integer0-2
B
is a index of reading, integer0-29
C
is a name of reading, stringD
is an unit, stringE
is a divisor, integer1
,10
,100
F
is a register address in decimal format, integer-
G
is a function code, integer1-4
{ "1": "0x1", "2": "0x2", "3": "0x3", "4": "0x4", }
-
H
is a type of variable, integer0-2
{ "0": "int16", "1": "int32", "2": "float", }
Example:
http://192.168.1.100/post.cgi?mod_custom_save &m00=Total Power*W*100*52*4*2&m01=import*kWh*100*72*4*2&m02=export*kWh*100*74*4*2&m03=total energy*kwh*100*342*4*2&m04=set total ene*kwh*100*384*4*2&&
/stm.cgi?modbuson¶
Only in LC3.5+
-
Enable the Modbus TCP Server.
GET /stm.cgi?modbuson=A
A
determines whether the function is enabled, integer0-1
Example:
http://192.168.1.100/stm.cgi?modbuson=0