MQTT auto reconnect
[nodemcu-iot-bme280-weather-station.git] / config.lua
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
-- config.lua --
 
serialDebug = true
 
-- network
wifiEnabled = true
network = {}
--network.ip = "192.168.0.51"
--network.netmask = "255.255.255.0"
--network.gateway = "192.168.0.1"
 
-- MQTT
prefix = "/iotcc"
device = "/" .. wifi.sta.getmac() -- set the device as the wifi card mac address. Is unique, also easy to trace
 
mqttConfig = {}
mqttConfig.enabled = true
mqttConfig.host = ''
mqttConfig.port = ''
mqttConfig.user = ''
mqttConfig.pass = ''
mqttConfig.secure = false
mqttConfig.connected = false
 
sData = {}
sData.baro_qfe = 0
sData.baro_qnh = 0
sData.temperature = 0
sData.humidity = 0
sData.dew_point = 0
sData.altitude = 0
sData.pageName = "Comana weather station"
sData.pageId = 50
sData.pageOrder = 100
sData.widget = "data"
sData.title = "Summer kitchen temperature"
sData.topic = prefix .. device ..'/ws1'
sData.template = "template-1"
sData.icon = "fa fa-thermometer-quarter"
sData.class = "bg-green"
sData.class2 = "text-center"
sData.order = 10
 
-- BME280
sda, scl = 1, 2
altitude = 81 -- altitude of the measurement place
 
-- other
deviceTitle = "Comana weather station"
ntpserver = "194.177.34.116"
timezoneHours = 2
 
comments