Skip to content

Commit 9bf945c

Browse files
Small improvements in HANDBOOK.md
1 parent 5dc088a commit 9bf945c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

HANDBOOK.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,8 +1429,8 @@ section must exist.)
14291429
The `mqtt_filter` target executes the specified program and its arguments. It is similar
14301430
to `pipe` but it doesn't open a pipe to the program. It provides stdout as response
14311431
to a configured queue.
1432-
Example use cases are f.e. IoT buttons which publish a message when they are pushed
1433-
and the execute an external program. It is also a clone of [mqtt-launcher](https://github.com/jpmens/mqtt-launcher).
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).
14341434
With no response configured it acts like `execute` with multiple arguments.
14351435
14361436
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
@@ -1442,8 +1442,11 @@ outgoing_topic is constructed by parts of incoming topic or as full_incoming top
14421442
[config:mqtt_filter]
14431443
targets = {
14441444
# full_topic, topic[0], topic[1], args[0], .....
1445+
# touch file /tmp/executed
14451446
'touch' : [ None,0,0,'touch', '/tmp/executed' ],
1447+
# uses firtzctl to set temperature of a room
14461448
'fritzctl' : [ None,0,0,'/usr/bin/fritzctl','--loglevel=ERROR','temperature', "{args[0]}", "{args[1]}" ]
1449+
# performs a dirvish backup and writes stdout as a new messages to response topic
14471450
'backup' : ["response/{topic[1]}/{topic[2]}",0,0,'/usr/bin/sudo','/usr/sbin/dirvish','--vault', "{args[0]}" ],
14481451
}
14491452
```

0 commit comments

Comments
 (0)