Simple MQTT client for DHT22 temperature and humidity sensor
MQTT client is configured with specific to AWS IoT Broker
Install dependencies
pip3 install -r requirements.txtAdjust configuration, specify DHT22 pin, broker configuration and other options
cp config.ini.example config.iniConfigure daemon. copy service description and adjust execution command
cp dht22_mqtt.service.example dht22_mqtt.serviceMake adjustments and then install service:
cp dht22_mqtt.service /etc/systemd/system/
sudo systemctl enable dht22_mqtt
sudo systemctl daemon-reload
sudo systemctl start dht22_mqtt.service
sudo systemctl status dht22_mqtt.service