├── mydb.db ├── .gitignore ├── .gitattributes ├── dbSetup.py ├── templates └── index.html ├── sender.py ├── README.md ├── DHT_Sensor_data_SENDER.py └── reciever.py /mydb.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranajoy-dutta/IoT-MQTT/master/mydb.db -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows thumbnail cache files 2 | Thumbs.db 3 | ehthumbs.db 4 | ehthumbs_vista.db 5 | 6 | # Folder config file 7 | Desktop.ini 8 | 9 | # Recycle Bin used on file shares 10 | $RECYCLE.BIN/ 11 | 12 | # Windows Installer files 13 | *.cab 14 | *.msi 15 | *.msm 16 | *.msp 17 | 18 | # Windows shortcuts 19 | *.lnk 20 | 21 | # ========================= 22 | # Operating System Files 23 | # ========================= 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /dbSetup.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | 3 | try: 4 | conn = sqlite3.connect("mydb.db") 5 | cur = conn.cursor() 6 | cur.execute("CREATE TABLE dataTable (" 7 | "id INTEGER PRIMARY KEY AUTOINCREMENT, state TEXT(5), timestamp INTEGER)") 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.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 || SNo | 24 |New State | 25 |Time | 26 |27 | |
|---|---|---|---|
| {{row["id"]}} | 33 |{{row["new_state"]}} | 34 |{{ row["timestamps"]}} | 35 |