Example application using MQTT in Python.
- Python3 > 3.9.*
- Clone the repository
git clone https://github.com/alptbz/mqttdemo
- Change into repository
cd mqttdemo
- Create venv
python -m venv env
- Activate enviroment
# Linux:
source env/bin/activate
# Windows (PowerShell):
.\env\Scripts\activate
# Windows (bash):
source env/Scripts/activate
- Install requirements
python -m pip install -r requirements.txt
- Create own config.py and insert credentials and connection information
cp config.template.py config.py
vim config.py
- Run
python main.py
- Use
python3
instead ofpython
if you're using Linux