├── dbSetup.py ├── templates └── index_ws.html ├── README.md ├── DHT_Sensor_data_SENDER.py └── WS_Reciever.py /dbSetup.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | 3 | try: 4 | conn = sqlite3.connect("ws_db.db") 5 | cur = conn.cursor() 6 | cur.execute("CREATE TABLE dataTable_losant (" 7 | "id INTEGER PRIMARY KEY AUTOINCREMENT, humidity TEXT(5), timestamps TEXT(5))") 8 | 9 | conn.commit() 10 | cur.close() 11 | conn.close() 12 | print("Table Successfully Created!") 13 | except Exception as e: 14 | print("An error occurred!\n", 15 | "Reason : ",e) 16 | -------------------------------------------------------------------------------- /templates/index_ws.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 || SNo | 25 |Time | 26 |Humidity | 27 |temperature | 28 |Latitude | 29 |Longitude | 30 |31 | |
|---|---|---|---|---|---|---|
| {{row["id"]}} | 37 |{{ row["timestamps"]}} | 38 |{{row["humidity"]}} | 39 |{{row["temperature"]}} | 40 |{{ row["lat"]}} | 41 |{{ row["lng"]}} | 42 |