Skip to content

Config(New)

1、Device authentication: After connecting to MQTT, this initialization configuration interface will be called and the data will be updated locally.
2、If the interface call fails, local data will be used instead.

Command send ▼

Subscribe to topic: /powerbank/{uuid}/user/get

Data format: JSON string

NameIdentification codeData typeRemarks
Command namecmdstringinit

MQTT:Update initialization configuration

text
{"cmd":"init"}

Command Reply △

None, But Trigger API request

API Request

Request URL

POST

https://{host}/api/rentbox/client/init?uuid={uuid}&sign={sign} 

text
Request URL: /api/rentbox/client/init
Content-Type: text/plain
sign=MD5("uuid={uuid}")

body

json
{
   "version": "20240904-RBMG-3.0.0.0",
   "manufacturer": "Welink",
   "model": "3568A",
   "radioVersion": "EC20CEHCLGR06A05M1G"
}

Request Parameters

NameIdentification codeData typeRemarks
Server domain namehostYESProvided by the customer, for example: s.abc.com
uuiduuidYES4G communication module, IMEI number
Interface signaturesignYESMD5 encryption

Body

NameIdentification codeData typeRemarks
VersionversionstringProgram version number
Manufacturermanufacturerstringwelink, BST
Modelmodelstring-
Radio versionradioVersionstring-

Request Example

POST

https://s.abc.com/api/rentbox/client/int?uuid=860602069165357&sign=dfd1c44ce6c5a85d74627d8ffa6bff40

text
Request URL: /api/rentbox/client/init
Content-Type: text/plain
sign = MD5("uuid=860602069165357") = dfd1c44ce6c5a85d74627d8ffa6bff40

body

json
{
   "version": "20240904-RBMG-3.0.0.0",
   "manufacturer": "Welink",
   "model": "3568A",
   "radioVersion": "EC20CEHCLGR06A05M1G"
}

API Response

NameIdentification codeData typeRemarks
Status codecodeintDefault: 200
Status typetypeintDefault: 0
Custom datadatajsonInitialization parameters
Error messagemsgstringDefault: "OK"
TimestamptimelongCurrent timestamp in milliseconds

Initialization parameters

NameIdentification codeData typeRemarks
Area CodeareaConfigstringDifferent customer power banks are not allowed to be returned;
For example: 0x00 (general), 0xAB (customer A), 0xCC (customer B)
Anti-theft Detectionantitheftint0: Off 1: On
Scenario: Power bank returned, side hole blocked; 0: Return successful 1: Return failed
Return LockreturnLockedint0: Off 1: On
Scenario: Return failed; 0: Power bank ejected 1: Not ejected
Maximum Charging SlotsmaxChargeSlotsint0: Off Range: 1~4;
Note: This function is related to the device's power supply and only supports some models. Machines with 16 or more slots do not support this setting.
Adjust Volumevolumeint0~100
Adjust Backlightbacklightint0~100
Invert BacklightinvertBacklightint0: Off 1: On
Scenario: Some manufacturers, 0 for maximum brightness, 100 for minimum brightness
Banner Imagebannerstring[]Example 1:["bottom", "https://abc.com/baaner.png"]
Display the banner image at the bottom, with a size of 1080*480 pixels.
Example 2: An empty array [], no banner will be displayed.
Qrcodeqrcodestring[]Example 1:["100", "10107853", "20", "30", "https://s.weirink.com/sw/app/r/scan.html?id=10107853"]100-pixel size, cabinet SN: 10107853, relative to banner coordinates (20, 30)
Example 2: Empty array [], does not display QR code

Banner Image

-NameIdentification codeData typeRemarks
string[0]positionpositionstringleft | right | bottom | top
string[1]urlurlstringFor example:https://abc.com/baaner.png

Qrcode

-NameIdentification codeData typeRemarks
string[0]sizesizestring100
string[1]SNsnstringFor example:10107853
string[2]Relative to the X coordinate of the bannerxstring0
string[3]Relative to the Y coordinate of the bannerystring0
string[4]contentcontentstringhttps://s.weirink.com/sw/app/r/scan.html?id=10107853
json
{
    "code": 200,
    "type": 0,
    "data": {
        "areaConfig": "0x00",
        "antitheft": 0,
        "returnLocked": 0,
        "maxChargeSlots": 0,
        "volume": 80,
        "backlight": 80,
        "invertBacklight": 0,
        "banner": ["bottom", "https://abc.com/baaner.png"],
        "qrcode": ["100", "10107853", "20", "30", "https://s.weirink.com/sw/app/r/scan.html?id=10107853"]
    },
    "msg": "OK",
    "time": 1705661910697
}