Update mqtt.md
This commit is contained in:
102
docs/mqtt.md
102
docs/mqtt.md
@@ -1,49 +1,77 @@
|
|||||||
# MQTT Commands
|
# MQTT Commands
|
||||||
|
|
||||||
### Dismiss notification
|
## Dismiss Notification
|
||||||
Dismiss a notification wich was set to "hold"=true
|
|
||||||
##### Topic
|
|
||||||
`[PREFIX]/notify/dismiss`
|
|
||||||
##### Payload
|
|
||||||
empty payload
|
|
||||||
|
|
||||||
### Switch apps
|
|
||||||
##### Topic
|
|
||||||
`[PREFIX]/nextapp`
|
|
||||||
`[PREFIX]/previousapp`
|
|
||||||
##### Payload
|
|
||||||
empty payload
|
|
||||||
|
|
||||||
### Switch to specific app
|
Dismiss a notification which was set to "hold"=true.
|
||||||
##### Topic
|
|
||||||
`[PREFIX]/switch`
|
| Topic | Payload |
|
||||||
##### Payload
|
|
||||||
`{"name":"time"}`
|
| --- | --- |
|
||||||
|
|
||||||
|
| `[PREFIX]/notify/dismiss` | empty payload |
|
||||||
|
|
||||||
|
## Switch Apps
|
||||||
|
|
||||||
|
Switch to next or previous app.
|
||||||
|
|
||||||
|
| Topic | Payload |
|
||||||
|
|
||||||
|
| --- | --- |
|
||||||
|
|
||||||
|
| `[PREFIX]/nextapp` | empty payload |
|
||||||
|
|
||||||
|
| `[PREFIX]/previousapp` | empty payload |
|
||||||
|
|
||||||
|
## Switch to Specific App
|
||||||
|
|
||||||
|
Switch to a specific app by name.
|
||||||
|
|
||||||
|
| Topic | Payload |
|
||||||
|
|
||||||
|
| --- | --- |
|
||||||
|
|
||||||
|
| `[PREFIX]/switch` | `{"name":"time"}` |
|
||||||
|
|
||||||
|
Built-in app names are:
|
||||||
|
|
||||||
Build-in app names are
|
|
||||||
- `time`
|
- `time`
|
||||||
|
|
||||||
- `date`
|
- `date`
|
||||||
|
|
||||||
- `temp`
|
- `temp`
|
||||||
|
|
||||||
- `hum`
|
- `hum`
|
||||||
|
|
||||||
- `bat`
|
- `bat`
|
||||||
|
|
||||||
For custompages you need to call the name you set in the topic:
|
For custom pages, use the name you set in the topic. For example, if `[PREFIX]/custom/test` is your topic, then `test` is the name.
|
||||||
If `[PREFIX]/custom/test` is your topic,
|
|
||||||
then `test` is the name.
|
|
||||||
|
|
||||||
## Change Settings
|
## Change Settings
|
||||||
##### Topic
|
|
||||||
`[PREFIX]/settings`
|
Change various settings related to the app display.
|
||||||
|
|
||||||
Each property is optional, you dont need to send all!
|
| Topic | Payload |
|
||||||
|
|
||||||
##### JSON Properties
|
| --- | --- |
|
||||||
| Key | Type | Description | Value Range |
|
|
||||||
| ----------- | ------- | --------------------------------------------------------------------------- | ------------------------------------------ |
|
| `[PREFIX]/settings` | JSON properties |
|
||||||
| `apptime` | number | Determines the duration an app is displayed in milliseconds. | Any positive integer value. Default 7000 |
|
|
||||||
| `transition`| number | The time the transition to the next app takes in milliseconds. | Any positive integer value. Default 500 |
|
Each property is optional; you do not need to send all.
|
||||||
| `textcolor` | string | A color in hexadecimal format. | Any valid 6-digit hexadecimal color value, e.g. "#FF0000" for red |
|
|
||||||
| `fps` | number | Determines the frame rate at which the matrix is updated. | Any positive integer value. Default 23 |
|
| Key | Type | Description | Value Range | Default |
|
||||||
| `brightness`| number | Determines the brightness of the matrix. | An integer between 0 and 255 |
|
|
||||||
| `autobrightness`| boolean | Determines if automatic brightness control is active. | `true` or `false` |
|
| --- | --- | --- | --- | --- |
|
||||||
| `autotransition`| boolean | Determines if automatic switching to the next app is active. | `true` or `false` |
|
|
||||||
|
| `apptime` | number | Determines the duration an app is displayed in milliseconds. | Any positive integer value. | 7000 |
|
||||||
|
|
||||||
|
| `transition` | number | The time the transition to the next app takes in milliseconds. | Any positive integer value. | 500 |
|
||||||
|
|
||||||
|
| `textcolor` | string | A color in hexadecimal format. | Any valid 6-digit hexadecimal color value, e.g. "#FF0000" for red. | N/A |
|
||||||
|
|
||||||
|
| `fps` | number | Determines the frame rate at which the matrix is updated. | Any positive integer value. | 23 |
|
||||||
|
|
||||||
|
| `brightness` | number | Determines the brightness of the matrix. | An integer between 0 and 255. | N/A |
|
||||||
|
|
||||||
|
| `autobrightness` | boolean | Determines if automatic brightness control is active. | `true` or `false`. | N/A |
|
||||||
|
|
||||||
|
| `autotransition` | boolean | Determines if automatic switching to the next app is active. | `true` or `false`. | N/A |
|
||||||
|
|||||||
Reference in New Issue
Block a user