##### Brief description - The backend server pushes messages to the price tag device through MQTT, and the price tag device executes corresponding tasks based on the instructions in the messages. ##### Parameter Description
Messags Name Message content Description
Report device information ```json { "action": "pushdeviceinfo", "push_id": 0, "clientid": "lcd_device_123" } ``` - `action` - Type of action to be executed: **Report device information**. - `push_id` - Push sequence. - `clientid` - Object under control.
Synchronize price tag details ```json { "action": "updatelabel", "push_id": 0, "clientid": "lcd_device_123", "clear-res": 1 } ``` - `action` - Type of action to be executed: **Synchronize price tag details**. - `push_id` - Push sequence. - `clientid` - Object under control. - `clear-res` - When the value is 1, the device resources will be cleared before downloading.
Synchronize price tag details through DATA ```json { "action": "updatelabelbydata", "push_id": 0, "clientid": "lcd_device_123", "clear-res": 0, "Data": {"price tag details"} } ``` - `action` - Type of action to be executed: **Synchronize price tag details through DATA**. - `push_id` - Push sequence. - `clientid` - Object under control. - `clear-res` - When the value is 1, the device resources will be cleared before downloading. - `Data` - Price tag details, retrieve price tag details in HTTP mode and return Data.
Power Control Plan ```json { "action": "power_ctrl", "push_id": 0, "clientid": "lcd_device_123", "power-on": [ { "start": "08:00:00", "end": "10:00:00", "enable": 0 }, { "start": "08:00:00", "end": "10:00:50", "enable": 1 } ] } ``` - `action` - Type of action to be executed: **Power Control Plan**. - `push_id` - Push sequence. - `clientid` - Object under control. - `power-on` - Array of objects, describing the normal working time period. - This group is controlled by enable to enable. - Multiple groups can control multiple periods of time. - The power plan will start executing after connecting to the server normally.
Set time zone ```json { "action": "set-timezone", "push_id": 0, "clientid": "lcd_device_123", "timezone ": "UTC+08:00" } ``` - `action` - Type of action to be executed: **Set time zone**.
When using a power plan, it is necessary to set the time zone. The network time obtained by the device through the network needs to be controlled in conjunction with the time zone. Default China Standard Time (CST), also known as Eastern Standard Time. - `push_id` - Push sequence - `clientid` - Object under control - `timezone` - time zone
Clear resources ```json { "action": "clear-res", "push_id": 0, "clientid": "lcd_device_123" } ``` - `action` - Type of action to be executed: **Clear resources**. - `push_id` - Push sequence. - `clientid` - Object under control.
Clear configuration (restore factory configuration) ```json { "action": "clear-config", "push_id": 0, "clientid": "lcd_device_123" } ``` - `action` - Type of action to be executed: **Clear configuration** (restore factory configuration). - `push_id` - Push sequence. - `clientid` - Object under control.
UI page layout control ```json { "action": "force-hide", "push_id": 0, "clientid": "lcd_device_123", "BottomStatusBar": 1, "SystemStatusPanel": 1, "TopMessageBar": 1, "DeviceQR": 1 } ``` - `action` - Type of action to be executed: **UI page layout display or hide**. - `push_id` - Push sequence. - `clientid` - Object under control. - `BottomStatusBar` - Bottom status WiFi and Bluetooth information. - `SystemStatusPanel` -System Display Panel. - `TopMessageBar` - Top Messages. - `DeviceQR` - This machine comes with a device QR code. - Control parameter values: 1 hidden, 0 displayed.
Turn on backlight ```json { "action": "backlight-on", "push_id": 0, "clientid": "lcd_device_123" } ``` - `action` - Type of action to be executed: **Turn on backlight**. - `push_id` - Push sequence. - `clientid` - Object under control.
Turn off backlight ```json { "action": "backlight-off", "push_id": 0, "clientid": "lcd_device_123" } ``` - `action` - Type of action to be executed: **Turn off backlight**. - `push_id` - Push sequence. - `clientid` - Object under control.
Brightness setting ```json { "action": "backlight-set", "push_id": 0, "backlight": 50, "clientid": "lcd_device_123" } ``` - `action` - Type of action to be executed: **Brightness setting**. - `push_id` - Push sequence. - `backlight` - Backlight brightness. - `clientid` - Object under control.
Device restart ```json { "action": "deviceRestart", "push_id": 0, "clientid": "lcd_device_123" } ``` - `action` - Type of action to be executed: **Device restart**. - `push_id` - Push sequence. - `clientid` - Object under control.
##### Remarks - When `push_id` does not have this field or `push_id`=0, it defaults to execution. When the `push_id` matches the `push_id` recorded by the device, this push will be ignored. Introduce `push_id` to avoid instruction repetition caused by multiple push notifications. `push_id` will be uploaded in the device status. - `clientid`: The object subject to control. When there is no such field, it is always executed by default.