- Creating the Virtual Environment
- python -m venv env
- Activating the Environment
- env\Scripts\activate
- pip install paho-mqtt
- pip install numpy
- pip install pandas
- pip install sklearn
- pip install pyserial
- pip install requests
- If you have Arduino go to Arduino Folder to execute the files,though you will need to generate a new API key for your thingspeak account
- If you do not have the Arduino then go to NoArduino folder to test the files.
The first concept is the publish and subscribe system. In a publish and subscribe system, a device can publish a message on a topic, or it can be subscribed to a particular topic to receive messages
- For example Device 1 publishes on a topic.
- Device 2 is subscribed to the same topic as device 1 is publishing in.
- So, device 2 receives the message.
1. Mqtt-Publish/mqtt-publish.py
2. Mqtt-Subscribe/mqtt-subscribe.py
We are using a REST API to connect the data from local system to the cloud platform,we are plotting the average value of sensor data we collected from local and plot it against time in the Thingspeak platform.
- Code Execution
- Data Representation in Thingspeak