It is a chatbot which integrates with Iot Devices(home appliances) and show their live status , give commands to change status.
- Adding multiple client requires threading and has overhead if we havemany IoT applications.So, we used MQTT protocol which is suitable for IoT network.
- We used Paho MQTT module in python library to create clients(sensors and IoT devices).They continuously send their data to their respective topic to the broker in small time intervals.
- This data is then received by flask server which acts as subscriber in this case. MQTT has been implemented in flask with the help of flask-mqtt module in python.
- We used Flask-python Framework for creating Chatbot and Dashboard
- We also added auth login system for security measures
- Sqlite3 act as an database in backend
- Microsoft Azure App services act as Cloud based hosting platform
- Currently our broker/server can handle upto 8 clients/Iot devices
- ML model for better User expreince and which can give best suggestions to user by analysing previous user input.
- More clients can be connected
- Raspberry Pi and Sensors usage so that we can deal with realtime data.
By Using Hosted Website
-
Download the all files from folder sensors
-
Install Python
-
Install Paho-mqtt
pip install paho-mqtt
-
Run each files in a seperate terminal
python pub_temp.py python pub_humidity.py python pub_fan.py python pub_light.py
-
Open the link IotChatbot
-
Use following credentials
Username: test Password : 1234
By Using Local Host
-
Downlaod the code as a zip file or clone the repo By using following command in git bash
git clone https://github.com/Nageshbansal/IotChatbot.git
-
create venv (optional)
-
Install required python-packages
pip install -r requirements.txt
-
Go to Iotchatbot directory in command line and run flask app
python app.py
-
Go to sensors directory and Run each files in a seperate terminal
python pub_temp.py python pub_humidity.py python pub_fan.py python pub_light.py
-
Open the link in browser
http://127.0.0.1:5000/
-
Use following credentials
Username: test Password : 1234