You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HANDBOOK.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -326,6 +326,7 @@ _mqttwarn_ supports a number of services (listed alphabetically below):
326
326
* mastodon (see [tootpaste](#tootpaste))
327
327
* [mattermost](#mattermost)
328
328
* [mqtt](#mqtt)
329
+
* [mqtt_filter](#mqtt_filter)
329
330
* [mqttpub](#mqttpub)
330
331
* [mysql](#mysql)
331
332
* [mysql_dynamic](#mysql_dynamic)
@@ -1423,6 +1424,74 @@ This shows the currently full configuration possible. Global values from the
1423
1424
authentication (`auth`) or (`tls`) you may omit those sections. (The `defaults`
1424
1425
section must exist.)
1425
1426
1427
+
### `mqtt_filter`
1428
+
1429
+
The `mqtt_filter` target executes the specified program and its arguments. It is similar
1430
+
to `pipe` but it doesn't open a pipe to the program. It provides stdout as response
1431
+
to a configured queue.
1432
+
Example use cases are e.g. IoT buttons which publish a message when they are pushed
1433
+
and they execute an external program. It is also a clone of [mqtt-launcher](https://github.com/jpmens/mqtt-launcher).
1434
+
With no response configured it acts like `execute` with multiple arguments.
1435
+
1436
+
To pass the published data (json args array) to the command, use `{args[0]}` and `{args[1]}` which then gets replaced. Message looks like `'{ "args": ["' + temp + '","' + room + '"] }'` for `fr
1437
+
itzctl`.
1438
+
1439
+
outgoing_topic is constructed by parts of incoming topic or as full_incoming topic.
0 commit comments