*`flow3r-<macaddress>/event`: The app publishes events to this topic. see "Events" below.
*`flow3r-<macaddress>/status`: The app publishes the string `Online` to this topic when started, and submits an `Offline` LWT message.
*`flow3r-<macaddress>/ui_config`: You can publish a label for each petal to this topic, which will be shown on the flow3r's display. See "UI Config" below.
| `event` | The type of gesture that was detected. One of `touch_tip`, `touch_base`, `swipe_up`, `swipe_right`, `swipe_down`, `swipe_left`, whereas `swipe_up` always means a swipe towards the tip of the petal, and `swipe_down` towards its base. |
| `dx` | The distance between start and end of the touch event in `x` (base-to-tip) direction. Unitless number, as returned by [captouch's `position()` function][captouch]. |
| `dy` | The distance between start and end of the touch event in `y` (side-to-side) direction. |
| `duration` | The duration between start and end of the touch event in `ms`. |
For handling touch gestures, another rule can be created; the example below runs a JS script that parses the JSON payload and reacts on a long press on petal 10:
```yaml
configuration: {}
triggers:
- id: "1"
configuration:
thingUID: mqtt:topic:...
channelUID: mqtt:topic:...:event
type: core.ChannelEventTrigger
conditions: []
actions:
- inputs: {}
id: "2"
type: script.ScriptAction
configuration:
type: application/javascript
script: >-
var payload = JSON.parse(this.event.event);
if (payload.petal == "10" and payload.duration > 1000) {