forked from HotNoob/PythonProtocolGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.cfg.example
More file actions
64 lines (50 loc) · 1.6 KB
/
config.cfg.example
File metadata and controls
64 lines (50 loc) · 1.6 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
61
62
63
64
[general]
# Global logging level (DEBUG, INFO, WARNING, ERROR)
log_level = DEBUG
[transport.0] #name must be unique, ie: transport.modbus
# Logging level specific to this transport
log_level = DEBUG
#rs485 / modbus device
#protocol config files are located in protocols/
protocol_version = v0.14
# Modbus address
address = 1
port = {{serial port, likely /dev/ttyUSB0}}
baudrate = 9600
#modbus tcp/tls/udp example
#host = 192.168.0.7
#port = 502
#override protocol's / transport type
#transport = modbus_tcp
# The 'transport' that we want to share this with
bridge = transport.1
# Device identity (for MQTT topic structure or HA discovery)
manufacturer = HDHK
model = HDHK 16CH AC
name = HDHK 1
# Optional; auto-detect if omitted
serial_number = HDHK777
# How often read (in seconds)
# interplays with per register read timings: https://github.com/HotNoob/PythonProtocolGateway/blob/main/documentation/usage/creating_and_editing_protocols.md#read-interval
read_interval = 10
#advanced users only - see https://github.com/HotNoob/PythonProtocolGateway/blob/main/documentation/usage/transports.md#writing
write = false
# incomplete feature to help identify which protocol to use
# will only "analyze" if enabled
analyze_protocol = false
[transport.1]
# Set transport type to MQTT
transport=mqtt
# MQTT broker settings
host = {{mqtt ip / host}}
port = 1883
user = {{mqtt username here}}
pass = {{mqtt password}}
# MQTT topic settings
base_topic = home/inverter/
error_topic = /error
# Home Assistant discovery settings
discovery_enabled = true
discovery_topic = homeassistant
# If true, values are sent in JSON format
json = false