Python API - MQTT example for Home Assistant

I have built a setup where I have a raspberry pi with a PIR sensor connected to the GPIO. When the sensor detects movement it sends a MQTT message to another raspberry pi running Home Assistant.

This python program uses the API to sends a notification with time stamp to meshtastic when motion is detected. It also subscribes to a MQTT-topic (temperature sensor) and relays that value to meshtastic.


I love it! Thanks for sharing.

I’ve read of a few posts from people hoping to do the same. I think this is a good resource.