+ input_file = cur.get(config,"input","file")
+ input_exec = cur.get(config,"input","exec")
+ alarm_exec = cur.get(config,"alarm","exec")
+
+ if serial_port then
+
+ command = "stty -F "..serial_port.." "..serial_baud
+ os.execute(command)
+
+ end
+
+ mqtt_host = cur.get(config,"mqtt","host")
+ mqtt_port = cur.get(config,"mqtt","port")
+ mqtt_id = cur.get(config,"mqtt","id")
+ mqtt_topic = cur.get(config,"mqtt","topic")
+ mqtt_alarm_topic = cur.get(config,"mqtt","alarm_topic")
+
+ mqtt_user = cur.get(config,"mqtt","user")
+ mqtt_passwd = cur.get(config,"mqtt","password")
+
+ if mqtt_host and not mqtt_id then
+ mqtt_id="weather-"..web_devid
+ end
+
+ if mqtt_host and not mqtt_port then
+ mqtt_port = 1883
+ end
+
+ if mqtt_host and not mqtt_topic then
+ mqtt_topic = 'weathermon/{dev}/{type}/{id}/{param}'
+ end
+
+ if mqtt_host and not mqtt_alarm_topic then
+ mqtt_alarm_topic = 'alarm/{dev}/{type}/{id}'
+ end