-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiotserver.ini.sample
112 lines (105 loc) · 3.71 KB
/
iotserver.ini.sample
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
; This is a sample configuration file.
; All the values enclosed in sharp parentheses, mostly credentials, should be
; replaced with your real data.
[DEFAULT]
; MQTT seed topics
; Each topic can be considered as a logical group of topics. With added
; trailing '/#' it can be used as a topic filter.
mqtt_topic_server = server
;
mqtt_topic_script = %(mqtt_topic_server)s/iot
mqtt_topic_script_status = %(mqtt_topic_script)s/state
;
mqtt_topic_system = %(mqtt_topic_server)s/soc
mqtt_topic_system_data = %(mqtt_topic_system)s/data
;
mqtt_topic_fan = %(mqtt_topic_server)s/fan
mqtt_topic_fan_status = %(mqtt_topic_fan)s/state
mqtt_topic_fan_command = %(mqtt_topic_fan)s/cmd
[MQTTbroker]
; Hardcoded default - the hostname
clientid = <mqtt_clientid>
; Hardcoded default - localhost
host = localhost
; Hardcoded default - 1883
port = 1883
; Registered user for logging to MQTT broker
username = <mqtt_username>
; Password of MQTT registered user
password = <mqtt_password>
; Userdata for MQTT callback functions
;userdata = dummy
[MQTTfilters]
; Topics with wildcards aimed for topic filtering
; Usually only to these wildcard topics a client subscribes. Single topics
; are utilized for comparing and selecting only. The retain parameter is expressed
; in form of a number, where its absolute integer convertion 0 mean False,
; otherwise True.
; topic = topicName, topicQos, topicRetain
; Examples:
; fan_dummy = %(mqtt_topic_fan)s/dummy/#, 1, 0
; fan_dummy = %(mqtt_topic_fan)s/dummy/+/something/#, 2, 1
filter_fan = %(mqtt_topic_fan)s/#
[MQTTtopics]
; Theese single topics are utilized for publishing and in callbacks
; for comparing and selecting. The retain parameter is expressed in form of
; a number, where its absolute integer convertion 0 mean False, otherwise True.
; topic = topicName, topicQos, topicRetain
; Example:
; fan_dummy = %(mqtt_topic_fan)s/dummy, 0, 1
lwt = %(mqtt_topic_script_status)s, 0, 1
; Topics for system
system_data_temp_val = %(mqtt_topic_system_data)s/temp/val
system_data_temp_perc = %(mqtt_topic_system_data)s/temp/perc
; Topics for cooling fan
fan_status_percon = %(mqtt_topic_fan_status)s/perc/on
fan_status_percoff = %(mqtt_topic_fan_status)s/perc/off
fan_status_tempon = %(mqtt_topic_fan_status)s/temp/on
fan_status_tempoff = %(mqtt_topic_fan_status)s/temp/off
[Timers]
; Period in seconds for testing connection and attempting to reconnect
; to a MQTT broker.
; Hardcoded default 15.0s, hardcoded valid range 5 ~ 180s
period_mqtt = 30.0
; Period in seconds for publishing status data of system, usually current
; temperature.
; Hardcoded default 5.0s, hardcoded valid range 1 ~ 120s
period_soc = 5.0
; Period in seconds for publishing to the ThingSpeak cloud.
; Should be at least 15.0 s.
; Hardcoded default 60.0s = 1.0 min., hardcoded valid range 15 ~ 600s
period_thingspeak = 60.0
[System]
; Percentage rounding to provided integer of decimals.
; Hardcoded default 1, valid range 0 ~ 6 limited in code
round_perc = 1
; Temperature rounding to provided integer of decimals.
; Hardcoded default 1, valid range 0 ~ 6 limited in code
round_temp = 1
[ThingSpeak]
; Hardcoded default - the hostname
clientid = <thingspeak_clientid>
; Hardcoded default 1883
port = 1883
; Parameters without hardcoded default value
host = mqtt.thingspeak.com
mqtt_api_key = <ThingSpeak_mqtt_apikey>
; Testing channel Test - Chalupa
channel_id = <ThingSpeak_channel_id>
write_api_key = <ThingSpeak_write_apikey>
; Data field numbers 1 .. 8
; Hardcoded default 1
field_soc_temp = 1
[Blynk]
blynk_auth = <Blynk_apikey>
; Virtual pins
; Temperature gauge
vpin_temp = 1
; Fan status LED
vpin_fan_led = 2
; Fan control button
vpin_fan_btn = 3
; Fan set temperature percentage for fan on
;vpin_fan_percon = 4
; Fan set temperature percentage for fan off
;vpin_fan_percoff = 5