blob: 6df398859e7b8e3df8094f95a3715a8678313f1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<!--
SPDX-FileCopyrightText: 2020 Ethel Morgan
SPDX-License-Identifier: CC0-1.0
-->
# Kiki's Dispatch Service
A Webhook & MQTT dispatch server.
TODO:
- variable substitution.
- MQTT triggers.
## Config
For example,
```json
{
"rules": {
"update Catbus UI": {
"triggers": [
{
"url": "/gitolite-repo-updated",
"formValues": {
"repo": "catbus-web-ui"
}
}
],
"actions": [
{
"url": "https://build.eth.moe/deploy",
"formValues": {
"project": "catbus-web-ui"
}
}
]
},
"turn lights on": {
"triggers": [
{
"url": "/living-room/lights-on",
"formValues": {
"power": "on"
}
}
],
"actions": [
{
"mqtt": "tcp://catbus.eth.moe/home/living-room/sofa-light/power",
"value": "on"
},
{
"mqtt": "tcp://catbus.eth.moe/home/living-room/front-light/power",
"value": "on"
}
]
}
}
}
```
|