Skip to content

suvambasak/thingspeak-pub-sub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThingSpeak Publish and Subscribe

A GUI tool made with Python Tkinter for publishing and subscribing to your ThinksSpeak cloud channel for pushing and fetching sensors data. And also a local solution to save sensor data with LAMPP stack in Raspberry Pi.

ThingSpeak


Dependencies

  • For DHT sensor (humidity and temperature sensors) follow the steps from there : Adafruit_Python_DHT.
  • For MQTT Client install paho-mqtt
$ sudo apt install python3-paho-mqtt

Execute

  • Clone the repository and change the directory.
  • Execute thingspeak_pubsub.py
$ git clone https://github.com/suvambasak/thingspeak-pub-sub.git
$ cd thingspeak-pub-sub/thingspeak/
$ python3 thingspeak_pubsub.py



LAMPP Stack


Dependencies

  • For DHT sensor (humidity and temperature sensors) follow the steps from there : Adafruit_Python_DHT.
  • Install LAMPP stack on Raspberry Pi. Follow this: LAMP Web Server.
  • Install pymysql, matplotlib
$ sudo apt install python3-pymysql python3-matplotlib

Execute

  • Clone the repository and change the directory.
$ git clone https://github.com/suvambasak/thingspeak-pub-sub.git
$ cd thingspeak-pub-sub/lampp/

Create Table

  • Start LAMPP server.
$ sudo opt/lampp/lampp start

Run

  • Execute dht_mysql_db.py
$ python3 dht_mysql_db.py