Clone the repo
python -m venv envcd env/- Activate the virtual env
python -m pip install -r requirements.txt
- Download mosquitto
cdinto the install location- Add these lines to the
mosquitto.conffile.
per_listener_settings true
listener 1883
protocol mqtt
listener 8883
protocol websockets
allow_anonymous true
- Remove trailing spaces from the above lines, if any
- Start the broker by running
mosquitto -c [path-to-mosquitto.conf] -v
The subscriber.py and publisher.py have sample implementations of pub sub with mqtt.
Set appropriate IP and port to connect to the mosquitto broker.