+ serial_port = cur.get(config,"serial","port")
+ serial_baud = cur.get(config,"serial","baud")
+
+ 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")
+
+ 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/'..web_devid
+ end
+