Service Agreement

Get individual device status

Name version number Date created Last Update Status
Get individual device status 1.0 2021/12/30 2021/12/30 Definition
Description
Get the status of a single device, which is the cached data of the server; To get the latest status, you need to call the request update command in 1.4.3. Verify whether it is the latest state, which can be judged by the timestamp.
Request description
Request address https://{host}/api/v1/equip-read/equip-state?unid={unid}
Head 部分
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Response message parameter description
Name Type Length Constraints Description
id string   M Unique ID assigned by device
name string   M Device name.
unid string   M The hardware unique ID of the device
userid string   M The home account ID of the device
ai Json   M Sensor information of the device
ao Json   M Device Holding Register Information
do Json   M Relay status of the device
di Json   M Device switch input status information
Response JSON data format
AI Description
Analog parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
unit string   M Physical quantity unit, such as °C
value double   M Sensor Value
alarm bool   M Whether an alarm has occurred true: an alarm has occurred
fAlarmH double   M Alarm upper limit set value
fAlarmL double   M Alarm lower limit set value
fX1 double   O Linear relationship,{x1,y1}{x2,y2}
fY1 double   O
fX2 double   O
fY2 double   O
t long   M Update timestamp in milliseconds
AO description
Holding register parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
unit string   M Physical quantity unit, such as frequency hz
value double   M Output sensor value
min double   M Minimum output value
max double   M Maximum value of output value
t long   M Update timestamp in milliseconds
DO description
Holding register parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
value bool   M Relay state: false: release state, true: pull-in state
t long   M Update timestamp in milliseconds
DI Description
Holding register parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
value bool   M False:off true:on
alarm bool   M true:Alarmed
t long   M Update timestamp in milliseconds

Get the status of all devices under the account

Name version number Date created Last Update Status
Get individual device status 1.0 2021/12/30 2021/12/30 Definition
Description
Get all device status of user
Request description
Request address https://{host}/api/v1/equip-read/all-equip-state
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Response message parameter description
Name Type Length Constraints Description
data Json   M Multiple sensor information list Information status reference 1.4.1
Response JSON data format

Read Status

Name version number Date created Last Update Status
Read Status 1.0 2021/12/30 2021/12/30 Definition
Description
Trigger the server to read the real-time status of the device, If you want to get the latest status, you need to get the device status through the command 1.4.1 after calling this command, at an interval of 1 second.
Request description
Request address https://{host}/api/v1/equip-opr/equip-read
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io bool   M Turn off port 1 of the device as the first relay
dly int   M Delay time for closing the unit is 0.1 seconds, the maximum is 65535, with absolute precision error
Response message parameter description
 
Read AI Status: Body Section
Read AI Status: Response JSON Data Format
Read AO status: example Body section
Read AO Status: Response JSON Data Format
Read DO status: example Body section
Read DO Status: Response JSON Data Format
Reading DI Status: Example Body Section
Read DI Status: Response JSON Data Format

[Post][Relay Action]Close all channels

Name version number Date created Last Update Status
Close all channels 1.0 2021/12/30 2021/12/30 Definition
Description
[Relay Action]Close all channels
Request description
Request address https://{host}/api/v1/equip-opr/equip-close-all
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M unid
Response message parameter description
ACLOSE Operation Description
Example Body section
Response JSON data format

[Post][Relay Operation]Close a channel

Name version number Date created Last Update Status
Close a channel relay 1.0 2021/12/30 2021/12/30 Definition
Description
Close a channel relay
Request description
Request address https://{host}/api/v1/equip-opr/equip-close
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io bool   M Turn off port 1 of the device as the first relay
Response message parameter description
CLOSE Operation Description
Example Body section
Response JSON data format
unid string   M Unique ID of the device
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Relay Operation]Open a channel

Name version number Date created Last Update Status
Open a channel 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay to open a channel
Request description
Request address https://{host}/api/v1/equip-opr/equip-open
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io int   M Turn off port 1 of the device as the first relay
Response message parameter description
 
Example Body section
Response JSON data format
unid string   M Unique ID of the device Response message parameter description   Example Body section Response JSON data format

[Post][Relay Operation]Open a channel

Name version number Date created Last Update Status
Open a channel 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay to open a channel
Request description
Request address https://{host}/api/v1/equip-opr/equip-open
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io int   M Turn off port 1 of the device as the first relay
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Relay Operation] On for a while and then off

The delay time of
Name version number Date created Last Update Status
Open for a while and then close 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, open for a while and then close
Request description
Request address https://{host}/api/v1/equip-opr/equip-open-one
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io bool   M Close the device's port 1 for the first relay
dly Int   M opening is 0.1 second, the maximum is 65535, and there is an absolute precision error.
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Relay Operation]Multi-Channel Operation

Name version number Date created Last Update Status
Multi-channel operation 1.0 2021/12/30 2021/12/30 Definition
Description
Operation relay, multi-channel operation
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-do
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
regstart bool   M The starting address of the register 0 is invalid 1 represents the first relay
doinfo Int   M The control state group of the relay, which supports multiple numerical meanings: 0 means closed, 1 means open, 2 means ignore operation
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Holding Register Operation]Write Operation

Name version number Date created Last Update Status
Write Holding Registers 1.0 2021/12/30 2021/12/30 Definition
Description
Write Holding Register
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-ao
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
regstart Int   M The starting address of the register 0 is invalid 1 represents the 0 of the modbus register
aoinfos Int Array   M register contents 16-bit unsigned type
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Holding Register Operation]Write Operation Hex

Name version number Date created Last Update Status
Write Holding Registers 1.0 2021/12/30 2021/12/30 Definition
Description
Write holding registers in HEX format
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-ao-hex
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
regstart Int32   M The starting address of the register 0 is invalid 1 represents the 0 of the modbus register
aoinfos string   M The content of the register is a string in hexadecimal format, such as 1234ABCD
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Lora Operation]Read Communication Parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-read-lora-param
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format
 

[Post][Lora Operation]Read work parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-read-lora-config
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format
 

[Post][Lora operation]Write communication parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-lora-param
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format
 

[Post][Lora operation]Write work parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-lora-config
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format
 

Service Agreement

Get individual device status

Name version number Date created Last Update Status
Get individual device status 1.0 2021/12/30 2021/12/30 Definition
Description
Get the status of a single device, which is the cached data of the server; To get the latest status, you need to call the request update command in 1.4.3. Verify whether it is the latest state, which can be judged by the timestamp.
Request description
Request address https://{host}/api/v1/equip-read/equip-state?unid={unid}
Head 部分
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Response message parameter description
Name Type Length Constraints Description
id string   M Unique ID assigned by device
name string   M Device name.
unid string   M The hardware unique ID of the device
userid string   M The home account ID of the device
ai Json   M Sensor information of the device
ao Json   M Device Holding Register Information
do Json   M Relay status of the device
di Json   M Device switch input status information
Response JSON data format
AI Description
Analog parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
unit string   M Physical quantity unit, such as °C
value double   M Sensor Value
alarm bool   M Whether an alarm has occurred true: an alarm has occurred
fAlarmH double   M Alarm upper limit set value
fAlarmL double   M Alarm lower limit set value
fX1 double   O Linear relationship,{x1,y1}{x2,y2}
fY1 double   O
fX2 double   O
fY2 double   O
t long   M Update timestamp in milliseconds
AO description
Holding register parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
unit string   M Physical quantity unit, such as frequency hz
value double   M Output sensor value
min double   M Minimum output value
max double   M Maximum value of output value
t long   M Update timestamp in milliseconds
DO description
Holding register parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
value bool   M Relay state: false: release state, true: pull-in state
t long   M Update timestamp in milliseconds
DI Description
Holding register parameter description
Name Type Length Constraints Description
io int   M io starts at 0 as the first channel
name string   M Channel name
value bool   M False:off true:on
alarm bool   M true:Alarmed
t long   M Update timestamp in milliseconds

Get the status of all devices under the account

Name version number Date created Last Update Status
Get individual device status 1.0 2021/12/30 2021/12/30 Definition
Description
Get all device status of user
Request description
Request address https://{host}/api/v1/equip-read/all-equip-state
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Response message parameter description
Name Type Length Constraints Description
data Json   M Multiple sensor information list Information status reference 1.4.1
Response JSON data format

Read Status

Name version number Date created Last Update Status
Read Status 1.0 2021/12/30 2021/12/30 Definition
Description
Trigger the server to read the real-time status of the device, If you want to get the latest status, you need to get the device status through the command 1.4.1 after calling this command, at an interval of 1 second.
Request description
Request address https://{host}/api/v1/equip-opr/equip-read
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io bool   M Turn off port 1 of the device as the first relay
dly int   M Delay time for closing the unit is 0.1 seconds, the maximum is 65535, with absolute precision error
Response message parameter description
 
Read AI Status: Body Section
Read AI Status: Response JSON Data Format
Read AO status: example Body section
Read AO Status: Response JSON Data Format
Read DO status: example Body section
Read DO Status: Response JSON Data Format
Reading DI Status: Example Body Section
Read DI Status: Response JSON Data Format

[Post][Relay Action]Close all channels

Name version number Date created Last Update Status
Close all channels 1.0 2021/12/30 2021/12/30 Definition
Description
[Relay Action]Close all channels
Request description
Request address https://{host}/api/v1/equip-opr/equip-close-all
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M unid
Response message parameter description
ACLOSE Operation Description
Example Body section
Response JSON data format

[Post][Relay Operation]Close a channel

Name version number Date created Last Update Status
Close a channel relay 1.0 2021/12/30 2021/12/30 Definition
Description
Close a channel relay
Request description
Request address https://{host}/api/v1/equip-opr/equip-close
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io bool   M Turn off port 1 of the device as the first relay
Response message parameter description
CLOSE Operation Description
Example Body section
Response JSON data format
unid string   M Unique ID of the device
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Relay Operation]Open a channel

Name version number Date created Last Update Status
Open a channel 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay to open a channel
Request description
Request address https://{host}/api/v1/equip-opr/equip-open
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io int   M Turn off port 1 of the device as the first relay
Response message parameter description
 
Example Body section
Response JSON data format
unid string   M Unique ID of the device Response message parameter description   Example Body section Response JSON data format

[Post][Relay Operation]Open a channel

Name version number Date created Last Update Status
Open a channel 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay to open a channel
Request description
Request address https://{host}/api/v1/equip-opr/equip-open
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io int   M Turn off port 1 of the device as the first relay
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Relay Operation] On for a while and then off

The delay time of
Name version number Date created Last Update Status
Open for a while and then close 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, open for a while and then close
Request description
Request address https://{host}/api/v1/equip-opr/equip-open-one
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
io bool   M Close the device's port 1 for the first relay
dly Int   M opening is 0.1 second, the maximum is 65535, and there is an absolute precision error.
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Relay Operation]Multi-Channel Operation

Name version number Date created Last Update Status
Multi-channel operation 1.0 2021/12/30 2021/12/30 Definition
Description
Operation relay, multi-channel operation
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-do
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
regstart bool   M The starting address of the register 0 is invalid 1 represents the first relay
doinfo Int   M The control state group of the relay, which supports multiple numerical meanings: 0 means closed, 1 means open, 2 means ignore operation
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Holding Register Operation]Write Operation

Name version number Date created Last Update Status
Write Holding Registers 1.0 2021/12/30 2021/12/30 Definition
Description
Write Holding Register
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-ao
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
regstart Int   M The starting address of the register 0 is invalid 1 represents the 0 of the modbus register
aoinfos Int Array   M register contents 16-bit unsigned type
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Holding Register Operation]Write Operation Hex

Name version number Date created Last Update Status
Write Holding Registers 1.0 2021/12/30 2021/12/30 Definition
Description
Write holding registers in HEX format
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-ao-hex
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
body section
Name Type Length Constraints Description
unid string   M Unique ID of the device
regstart Int32   M The starting address of the register 0 is invalid 1 represents the 0 of the modbus register
aoinfos string   M The content of the register is a string in hexadecimal format, such as 1234ABCD
Response message parameter description
 
Example Body section
Response JSON data format

[Post][Lora Operation]Read Communication Parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-read-lora-param
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format
 

[Post][Lora Operation]Read work parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-read-lora-config
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format
 

[Post][Lora operation]Write communication parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-lora-param
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format
 

[Post][Lora operation]Write work parameters

Name version number Date created Last Update Status
Turn off after a period of time 1.0 2021/12/30 2021/12/30 Definition
Description
Operate the relay, turn off after a period of time
Request description
Request address https://{host}/api/v1/equip-opr/equip-write-lora-config
Head section
Name Type Length Constraints Description
Authorization string   M Refer to 1.2 Authentication
Example Body section
 
Response JSON data format