- Port:
34001
- Base URL:
/api/v1.0/
- Description: Get device information
- Response:
{ "status": true, "data": { "name": "Pironman 5", "id": "pironman5", "peripherals": [ "ws2812", "oled" ] } }
- Description: Test if the server is running
- Response:
{ "status": true, "data": "OK" }
- Description: Test if the MQTT configuration is correct
- Data:
host
- MQTT Broker Hostport
- MQTT Broker Portusername
- MQTT Broker Usernamepassword
- MQTT Broker Password
- Response:
{"status": true, "data": {"status": true, "error": null}}
{"status": true, "data": {"status": false, "error": "Timeout"}}
{"status": true, "data": {"status": false, "error": "Connection failed, Check hostname and port"}}
{"status": true, "data": {"status": false, "error": "Connection failed, Check username and password"}}
{"status": false, "error": "[ERROR] host not found"}
{"status": false, "error": "[ERROR] port not found"}
{"status": false, "error": "[ERROR] username not found"}
{"status": false, "error": "[ERROR] password not found"}
- Description: Get history
- Data:
n
- Number of records to return
- Response:
{"status": true, "data": []}
- Description: Get time range
- Data:
start
- Start timeend
- End timekey
(optional) - Key to filter
- Response:
{"status": true, "data": []}
- Description: Get configuration
- Response:
{"status": true, "data": {}
- Description: Get log list
- Response:
{"status": true, "data": []}
- Description: Get log
- Data:
filename
- Log file namelines
(optional) - Number of records to returnfilter
(optional) - Filter, divided by commalevel
(optional) - Log level['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
- Response:
{"status": false, "error": "[ERROR] file not found"}
{"status": true, "data": []}
- Description: Set configuration
- Data:
data
- Configuration data
- Response:
{"status": true, "data": data}