-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.yml
54 lines (49 loc) · 1.55 KB
/
config.yml
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
# Logging configuration
log:
level: INFO
# Mikrotik CapsMan connection parameters
router:
# mode: "wifi"
mode: "capsman"
address: "192.168.1.1:8728"
username: "admin"
password: ""
interval: 3s
# Mikrotik DHCP server connection parameters
dhcp:
address: "192.168.1.1:8728"
username: "admin"
password: ""
interval: 1m
# Configuration file for MAC => DeviceName Name mapping
devices:
- name: "Device 01"
mac: "5C:C0:70:A1:00:00"
- name: "Device 02"
mac: "5C:C0:70:A2:00:00"
- name: "Device 03"
mac: "5C:C0:70:A3:00:00"
on.connect:
http.post: "http://127.0.0.1:8006/device/{mac}/{name}/state"
http.post.content: "{ \"state\": \"connect\" }"
http.header:
"Authorization": "Bearer HereIsPassword"
"Content-Type": "application/json"
on.disconnect:
http.post: "http://127.0.0.1:8006/device/{mac}/{name}/state"
http.post.content: "{ \"state\": \"disconnect\" }"
http.header:
"Authorization": "Bearer HereIsPassword"
"Content-Type": "application/json"
on.roaming:
http.post: "http://127.0.0.1:8006/device/{mac}/{name}/AP"
http.post.content: "{ \"AP\": \"{roaming.to}\", \"AP_OLD\": \"{roaming.from}\" }"
http.header:
"Authorization": "Bearer HereIsPassword"
"Content-Type": "application/json"
on.level:
http.post: "http://127.0.0.1:8006/device/{mac}/{name}/level"
http.post.content: "{ \"level\": \"{level.to}\" }"
http.header:
"Authorization": "Bearer HereIsPassword"
"Content-Type": "application/json"