MQTT Service for Raspberry Pi using Python
flowchart LR;
RPi --> MQTT_Broker;
MQTT_Broker <--> Consumer1;
MQTT_Broker <--> Consumer2;
Use the package manager pip to install foobar.
pip install paho-mqtt
pip install adafruit-circuitpython-dht
sudo apt-get install libgpiod2
# pub
dhtDevice = adafruit_dht.DHT11(board.D17)
mqttBroker = "test.mosquitto.org"
# sub
client.connect("test.mosquitto.org", 1883, 60)
client.loop_forever()
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.