-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced Features
Carsten edited this page Oct 9, 2022
·
2 revisions
Topics can be differentiated by using the "recv" and "send" parameters instead of "topic".
For example this:
"MQTTtopics": [
{
"topic": "home/category1/light/state"
}
]
becomes this:
"MQTTtopics": [
{
"recv": "home/category1/light/statereceive",
"send": "home/category1/light/statesend"
}
]
Android supports these Templates:
| Name | Description | Supported |
|---|---|---|
| Toggle | A simple button, just toggles current state | yes |
| Range | Creates a slider | yes |
| ToggleRange | A Slider, which also turns off when tapped on | yes |
| Stateless | A button, which sends the same message on every tap | yes |
| TemperatureControl | no |
Example config:
"template": {
"offCommand": "off",
"onCommand": "on",
"templateType": "toggletemplate"
}
If you need different on and offCommandy as off/on or true/false, displaying the state on the server won't work yet, but will be adressed in a future version.
Example config:
"template": {
"formatString": "%.0f",
"maxValue": 100.0,
"minValue": 0.0,
"stepValue": 1.0,
"templateType": "rangetemplate"
}
{
"MQTTtopics": [
{
"topic": "home/room2/fan/speed"
},
{
"topic": "home/room2/fan/state"
}
],
"controlID": "0",
"deviceType": 8,
"enabled": true,
"retain": true,
"structure": "Room1",
"subtitle": "with ToggleRange",
"template": {
"formatString": "%.0f",
"maxValue": 100.0,
"minValue": 0.0,
"offCommand": "off",
"onCommand": "on",
"stepValue": 1.0,
"templateType": "togglerangetemplate"
},
"title": "Fan"
}
For the ToggleTemplate you also need to add a second MQTT Address. The first one will be used for the slider component and the second for the button.
"template": {
"command": "on",
"templateType": "statelesstemplate"
}