Periodic Upload
1、The device is powered on for 1 minute and reports data once.
2、The cabinet reports the complete machine data every 20 minutes.
3、Return the power bank (self-fix 0x28) and report the data immediately.
Command send ▼
Subscribe to topic: /powerbank/{uuid}/user/get
Data format: JSON string
| Name | Identification code | Data type | Remarks |
|---|---|---|---|
| Command name | cmd | string | upload_all |
Update the whole machine report
{"cmd":"upload_all"}Command Reply △
None, But Trigger API request
API Request
Request URL
POST
https://{host}/api/rentbox/client/upload?rentboxSN={rentboxSN}&signal={signal}&sign={sign}
/api/rentbox/client/uploadContent-Type:text/plainRequest Parameters
| Name | Identification code | Is it required | Remarks |
|---|---|---|---|
| Server domain name | host | YES | Provided by the customer, for example: s.abc.com |
| cabinet SN | rentboxSN | YES | 4G communication module, IMEI number |
| signal value | signal | YES | - |
| Interface signature | sign | YES | MD5 encryption |
Interface signature
sign=MD5("rentboxSN={rentboxSN}|signal={signal}")Body
Reported data: bytecode data, Hex, hexadecimal parsing
| Bytecode | Name | Identification code | Remarks |
|---|---|---|---|
| byte[0] | Header code | head | Default: 0xA8 |
| byte[1~2] | Packet length | length | For example: 0x00 0x89, converted to decimal, the packet length is 137 |
| byte[3] | Command name | cmd | Default: 0x10, cabinet information |
| byte[4~n] | Custom data | data | Movement board information, position information |
| byte[n+1] | Verification code | verify | Data packet complement check |
Example: Report 8-port cabinet information
A8 00 89 10 01 FF FF 00 04 16 01 01 00 EC 00 05 11 49 F1 64 1F 32 01 0D 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 80 03 01 00 E8 00 05 11 46 AC 64 20 32 00 0D 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 80 02 FF FF 00 04 16 05 01 00 D7 00 04 C6 F0 96 64 1F 32 00 1A 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 80 07 01 00 E9 00 05 11 49 DB 64 1E 32 00 0D 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 80 D8A8 -------------------------------------------- byte[0] Header code
00 89 ----------------------------------------- byte[1~2] Packet length: 137
10 -------------------------------------------- byte[3] Report cabinet information command
01 FF FF 00 04 16 ---------------------------- Movement board information: 1
01 01 00 EC 00 05 11 49 F1 64 1F 32 01 0D 00 -- Position information: 1
02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 -- Position information: 2
03 01 00 E8 00 05 11 46 AC 64 20 32 00 0D 00 -- Position information: 3
04 00 00 00 00 00 00 00 00 00 00 00 00 00 80 -- Position information: 4
02 FF FF 00 04 16 ----------------------------- Movement board information: 2
05 01 00 D7 00 04 C6 F0 96 64 1F 32 00 1A 00 -- Position information: 5
06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 -- Position information: 6
07 01 00 E9 00 05 11 49 DB 64 1E 32 00 0D 00 -- Position information: 7
08 00 00 00 00 00 00 00 00 00 00 00 00 00 80 -- Position information: 8
D8 -------------------------------------------- byte[136] checksumMovement board information
Total 6 bytes. Example: Single movement board data
01 FF FF 00 04 16| Byte code | Name | Identification code | Remarks |
|---|---|---|---|
| byte[0] | Movement board address | controlIndex | Default: 0x01 |
| byte[1] | Reserved 1 | undefined 1 | Default: 0x00 |
| byte[2] | Reserved 2 | undefined 2 | Default: 0x00 |
| byte[3] | Temperature | temp | 0x00: No NTC 0x10: 16℃ 0x64: 100℃ |
| byte[4] | Software version number | softVersion | 0x00: 0 0x10: 16 0xFF: 255 |
| byte[5] | Hardware version number | hardVersion | 0x00: 0 0x10: 16 0xFF: 255 |
Position information
15 bytes in total. Example: Single location data
01 01 00 EC 00 05 11 49 F1 64 1F 32 01 0D 00| Byte code | Name | Identification code | Remarks |
|---|---|---|---|
| byte[0] | Location address | holeIndex | Range: 1-100 |
| byte[1] | Status information | state | 0x00:No power bank 0x01:Power bank working normal 0x02:Region code error 0x03:Communication error 0x04-0xFF:Reserved |
| byte[2] | Power bank current | powerbankCurr | Keep 1 decimal place For example: 0x10=16, indicating 1.6A |
| byte[3] | Power bank voltage | powerbankVolt | Keep 1 decimal place For example, 0x10=16 means 1.6V |
| byte[4] | Area code | area | Customized |
| byte[5~8] | Power bank SN | powerbankSN | 0x05 0x11 0x49 0xF1=85019121 |
| byte[9] | Battery level | soc | 0x00: 0 0x10: 16% 0xFF: 255% |
| byte[10] | Temperature | temp | 0x00: No NTC 0x10: 16℃ 0x64: 100℃ |
| byte[11] | Charging voltage | chargeVolt | Keep 1 decimal place For example, 0x10=16 means 1.6V |
| byte[12] | Charging current | chargeCurr | Keep 1 decimal place For example, 0x10=16, indicating 1.6A |
| byte[13] | Software version | softVersion | 0x00: 0 0x10: 16 0xFF: 255 |
| byte[14] | Position detection | sensor | Parse to binary ----------- Bit[7]:Reserved Bit[6]:Reserved Bit[5]:Reserved Bit[4]:Reserved Bit[3]:IO status: 0 Normal 1 Abnormal Bit[2]:Infrared sensor: 0 Disconnected (damaged or blocked) 1 Closed (normal) Bit[1]:Touch sensor: 0 Disconnected (normal) 1 Closed (with power bank) Bit[0]:Charging status: 0 Not charging 1 Charging ---------- 0X04=0000 0100:No powerbank 0X06=0000 0110:With powerbank(Not charging) 0X07=0000 0111:With powerbank(Charging) |
Position diagram
API Example
Content-Type:text/plainBody Hex
A8 01 25 10 10 00 00 00 6E 6E 01 01 00 F1 04 05 8E 17 08 5F 18 00 00 CA 00 02 01 00 E1 04 05 8E 15 F0 63 18 00 00 CA 00 03 00 00 00 00 00 00 00 00 FF FF 00 00 00 80 04 01 00 EB 04 05 8D 99 F7 5F 18 00 00 CA 00 05 01 00 EA 04 05 8D FC 12 5F 18 00 00 CA 00 06 01 00 B6 04 05 8D 93 E7 1A 1C 32 14 CA 00 20 00 00 00 6E 6E 07 01 00 F1 04 05 8E 17 08 5F 18 00 00 CA 00 08 01 00 E1 04 05 8E 15 F0 63 18 00 00 CA 00 09 00 00 00 00 00 00 00 00 FF FF 00 00 00 80 0A 01 00 EB 04 05 8D 99 F7 5F 18 00 00 CA 00 0B 01 00 EA 04 05 8D FC 12 5F 18 00 00 CA 00 0C 01 00 B6 04 05 8D 93 E7 1A 1C 32 14 CA 00 30 00 00 00 6E 6E 0D 01 00 F1 04 05 8E 17 08 5F 18 00 00 CA 00 0E 01 00 E1 04 05 8E 15 F0 63 18 00 00 CA 00 0F 00 00 00 00 00 00 00 00 FF FF 00 00 00 80 10 01 00 EB 04 05 8D 99 F7 5F 18 00 00 CA 00 11 01 00 EA 04 05 8D FC 12 5F 18 00 00 CA 00 12 01 00 B6 04 05 8D 93 E7 1A 1C 32 14 CA 00 88
sign = f212709ce41a2c6ac4ac3f6c9bdee020
MD5("rentboxSN=860602069165357|signal=CSQ:30")
API Response
{
"code":200,
"type":0,
"data":"",
"msg":"OK",
"time":1705661910697
}| Name | Identification code | Type | Remarks |
|---|---|---|---|
| status code | code | int | Default: 200 |
| status type | type | int | Default: 0 |
| Custom data | data | string | Default: "" |
| Exception message | msg | string | Default: OK |
| timestamp | time | long | current millisecond timestamp |

