-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgw.toml
45 lines (38 loc) · 1.01 KB
/
gw.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
[log]
file_path = "log/gw.log"
file_path_pattern = "log/gw{}.log.gz"
# error, warn, info, debug, trace
level = "info"
# The size limit in bytes.
size = 1048576 #1*1024*1024
# The maximum number of archived logs to maintain
count = 5
[server]
address = "127.0.0.1:1883"
#address = "ssl://127.0.0.1:18885"
[tls]
cafile = "ca/ca.crt"
# pem 文件生成方式:cat client.crt client.key ca.crt > client.pem
key_store = "ca/client.pem"
[client]
id = "pepper_gw"
keep_alive = 60
username = "pepper_gw"
[topic]
sub_topic = "ctrl/#"
pub_topic = "v1/gateway/telemetry"
pub_log_topic = "v1/devices/me/telemetry"
qos = 0
[msg]
example = "{\"l\":\"SN-001\",\"t\": 27.45,\"h\": 25.36,\"v\": 3.88,\"e\": 0}"
template = "{<{l}>: [{\"ts\": <#TS#>,\"values\": {\"temperature\": <{t}>, \"humidity\": <{h}>,\"voltage\": <{v}>,\"status\": <{e}>}}]}"
[database]
path = "./"
name = "iot.db"
[data_if]
#if_name = "/dev/ttyS14"
#if_type = "serial_port"
#if_name = "/dev/spidev0.0"
#if_type = "spi_sx1276"
if_name = "./data_if.txt"
if_type = "text_file"