#!/usr/bin/python3 # For Multithread from threading import Thread # For HTTP server from http.server import BaseHTTPRequestHandler, HTTPServer import os from urllib.parse import urlparse import socket import requests import configuration # For MQTT and plot part import time import csv2geojs import paho.mqtt.client as mqtt # Common import json from userio import * MAXLRR=4 filename="mqttGeo.csv" filenameBase="mqttGeo" server = None broker = None latestHtml = "" def htmlLatest(deveui,subID,FCnt,timeLatest,lat,lon,err,rssi): global latestHtml htmlOutput="\n" htmlOutput+=csv2geojs.networkSurveyAddLeaflet() htmlOutput+="\n" htmlOutput+="
\n" htmlOutput+="\n" htmlOutput+="
\n
\n\n" htmlOutput+="\n
\n\n" htmlOutput+="\n" htmlOutput+="