Repository navigation
Expand file tree
/
Copy pathconfig.toml.example
More file actions
61 lines (53 loc) · 2.64 KB
/
Copy pathconfig.toml.example
File metadata and controls
61 lines (53 loc) · 2.64 KB
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
# Wattwolf Configuration File
#
# This file configures the connection to your smart meter and defines
# which sensors to read from it.
# Connection Configuration
# Choose either 'socket' for TCP connection (if device is "exported" via ser2net) or 'device' for (local) serial port
[connection]
socket = "localhost:2000"
# OR use a serial device:
# device = "/dev/ttyUSB0"
# MQTT Configuration
[mqtt]
host = "localhost" # Can be overridden with MQTT_HOST env var
port = 1883 # Optional, defaults to 1883
topic_prefix = "wattwolf" # Optional, defaults to "wattwolf"
availability_topic = "wattwolf/availability" # Optional, defaults to wattwolf/availability, used by Home Assistant to determine if the device is online.
min_publish_interval = "10s" # Optional, defaults to 10s. Do not publish values more often than this.
max_publish_interval = "5m" # Optional, defaults to 5m. Force-publish values at least this often,
# even if they haven't changed. Values are also published whenever ANY sensor value changes
discovery_expire = "7d" # Optional, defaults to 7d. Retained discovery messages expire at the broker after this
# (they're periodically re-published), so entities don't linger if wattwolf is decommissioned
# Durations use humantime format, e.g. "30s", "5m", "1h 30m", "7d"
# username = "your_mqtt_username" # Optional, can be overridden with MQTT_USERNAME env var
# password = "your_mqtt_password" # Optional, can be overridden with MQTT_PASSWORD env var
# Sensor Definitions
# Each sensor corresponds to a specific OBIS code in the SML data stream
# OBIS codes can be specified in multiple formats:
# - "1.8.0" (simplified, as shown in the meter)
# - "1-0:1.8.0" (specifying medium and channel)
# - "1-0:1.8.0*255" (full notation)
# Best overview of different OBIS codes I found is in German Wikipedia: https://de.wikipedia.org/wiki/OBIS-Kennzahlen#Elektrische_Energie
# For our meter, the values for 1.8.0 and 2.8.0 are interchanged. Probably values have been switched here.
[[sensors]]
name = "consumed"
friendly_name = "Energy Consumed"
obis = "1-0:1.8.0*255"
device_class = "energy"
state_class = "total_increasing"
[[sensors]]
name = "produced"
friendly_name = "Energy Produced"
obis = "1-0:2.8.0*255"
device_class = "energy"
state_class = "total_increasing"
# Additional sensor examples (not yet implemented!):
#
# Depending on your model, these values might need to be activated (sometimes via PIN you have to request from your electricity supplier)
# [[sensors]]
# name = "current_power"
# friendly_name = "Current Power"
# obis = "1-0:1.6.0*255"
# device_class = "power"
# state_class = "measurement"