-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.conf
80 lines (69 loc) · 2.05 KB
/
example.conf
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
Base MQTT topic is used for device key
Meta-data will be published to announce/<baseTopic> when receiving discover
*/
device "sensor/contact/bedroom_window" {
/* Name that shows up in homekit */
name = "Bedroom window"
/* Device type */
device = "contactSensor"
/* Exported features */
feature = {
contactSensorState = {
info = {
min = 0
max = 1
step = 1
/*
Topics used for Pub/Sub in MQTT, can be omitted
Default is <base topic>/<feature>/get and set
*/
getTopic = "sensor/contact/bedroom_window/state/get",
setTopic = "sensor/contact/bedroom_window/state/set",
}
gpioIn = {
/* GPIO Pin, uses BCM2835 pinout */
pin = 16
/* Set to true to invert the state before reporting to MQTT */
invert = true
/*
Interval between reading GPIO state (in milliseconds).
Lower value gives better precision, but uses more CPU
*/
readInterval = 200
/*
Don't consider state changed to until 5/10 reads of the same value.
Useful for devices that might be flapping between states
*/
minReadOpened = 5
minReadClosed = 10
}
}
}
}
/*
Sample gpioOut feature
*/
device "switch/gpio" {
/* Name that shows up in homekit */
name = "Sample switch"
/* Device type */
device = "switch"
/* Exported features */
feature = {
on = {
gpioOut = {
/* GPIO Pin, uses BCM2835 pinout */
pin = 17
/* Set to true to invert the state before reporting to MQTT (invert=true means 1=low and 0=high) */
invert = true
}
}
}
}
/*
Additional devices can be added with:
device "base/topic" {
...
}
*/