-
Notifications
You must be signed in to change notification settings - Fork 0
/
p1mqtt-example.toml
63 lines (52 loc) · 1.73 KB
/
p1mqtt-example.toml
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
encoding = "msgpack" # Four different encoding types are available: "json", "msgpack", "binc", and "cbor".
defaultKey = "value" # The default key to use for the measured value. You can override this per output key.
defaultUnitKey = "unit"
[p1]
device = "/dev/ttyUSB0"
baudrate = 115200 # This differs per device, won't work if chosen wrong.
[mqtt]
baseTopic = "utilities/" # Whatever you put here will be prepended to the topics in the outputs
host = "localhost:1883"
clientID = "p1mqtt"
[timestamp]
OBIS = "0-0:1.0.0"
key = "timestamp" # The key to use for the timestamp
# You have some flexibility in specifying how the timestamp is formatted.
# Choosing "unix" or "unixnano" will result in an integer representing the
# number of seconds respectively nanoseconds since epoch. Any other value will
# be interpreted as a date/time format string as per
# https://golang.org/pkg/time/#pkg-constants
format = "unixnano"
[[outputs]]
topic = "electricity/out/power"
[[outputs.keys]]
identifier = "1-0:2.7.0"
[[outputs]]
topic = "electricity/in/power"
[[outputs.keys]]
identifier = "1-0:1.7.0"
[[outputs]]
topic = "electricity/in/meter1"
[[outputs.keys]]
identifier = "1-0:1.8.1"
[[outputs]]
topic = "electricity/in/meter2"
[[outputs.keys]]
identifier = "1-0:1.8.2"
# [[outputs]]
# topic = "electricity/out/meter1"
# [[outputs.keys]]
# identifier = "1-0:2.8.1"
# [[outputs]]
# topic = "electricity/out/meter2"
# [[outputs.keys]]
# identifier = "1-0:2.8.2"
[[outputs]]
topic = "gas/in/meter"
[[outputs.keys]]
identifier = "0-1:24.2.1"
[[outputs]]
topic = "gas/in/perhour"
[[outputs.keys]]
delta = true # When delta=true the difference between the current and the previous value is used.
identifier = "0-1:24.2.1"