Rpi2home-assistant: Expose Raspberry PI inputs and outputs to HomeAssistant through MQTT

Hi,
Just wanted to share one project I have been developing in the last few months:

GitHub - f18m/rpi2home-assistant: Expose Raspberry PI inputs and outputs to HomeAssistant through MQTT

This project provides a Python daemon to transform a Raspberry PI into a bridge between GPIO inputs/outputs and HomeAssistant, through MQTT. In particular this software allows to:

  • sample low-voltage inputs from Raspberry GPIO pins directly (with no isolation/protection/HAT), publish them on MQTT and get them exposed to Home Assistant as binary sensors;
  • sample a wide range of electrical signals (voltages) from 3V-48V AC or DC, using a dedicated Raspberry HAT, publish them on MQTT and get them exposed to Home Assistant as binary sensors;
  • expose Raspberry GPIO output pins in Home Assistant as switches or as buttons to e.g. activate relays, using a dedicated Raspberry HAT / relay board or just drive low-voltage electrical devices;

I’ve been using it to implement my home alarm system so I tried my best to make it very robust (it is covered by unit and integration tests, has a pipeline for automatic dependency updates, etc etc).
More recently I used that to integrate also e.g. the garage door remote, and other remotes as well.

Hope it can be useful to someone else, too!

Francesco

2 Likes