homebridge-intercom-automation-hat
v2.1.2
Published
Homebridge plugin to expose an intercom's doorbell and opener through an Raspberry Pi and Pimoroni Automation (p)Hat
Maintainers
Readme
homebridge-intercom-automation-hat
Homebridge plugin for controlling an intercom lock and doorbell using a Pimoroni Automation HAT / Automation HAT Mini and Raspberry Pi GPIO.
Features:
- Doorbell detection using analog input
- Lock control using relay output
- Support for Automation HAT and Automation HAT Mini
- Configurable Python virtual environment support
- Compatible with Raspberry Pi Zero 2
Adapted from / credits to: Luke Hoersten https://github.com/lukehoersten/homekit-door https://medium.com/dirigible/siri-controlled-1970s-intercom-door-ecd7a6b0df31
Using a Raspberry Pi Zero W and Pimoroni Automation pHAT or Pimoroni Automation HAT Mini, make a simple circuit-based door lock and door bell intercom into a Siri-controlled HomeKit smart accessory. Siri integration is provided by HomeBridge.
Connecting wires to the automation phat
- Connect the intercom's ground wire to the automation phat ground
- Connect the intercom's door opener (high) to automation phat output one
- Connect the intercom's doorbell wire (high) to automation phat analog one
Installation
If you are new to Homebridge, please first read the Homebridge documentation. Specifically for running on a Raspberry, you will find a tutorial in the homebridge Wiki.
Assure you're using the most up-to-date version of Raspbian
Install Homebridge Install Homebridge using the official instructions
Install system dependencies
sudo apt update
sudo apt install -y python3 python3-pip python3-venv- Create Python virtual environment A Python virtual environment is recommended to avoid package conflicts on modern Raspberry Pi OS versions.
mkdir -p /home/pi/venvs
python3 -m venv /home/pi/venvs/automationhatActivate the virtual environment:
source /home/pi/venvs/automationhat/bin/activateUpgrade pip:
pip install --upgrade pipInstall Automation HAT Python library:
pip install automationhatTest installation:
python -c "import automationhat; print('automationhat OK')"Deactivate the virtual environment:
deactivate- Install plugin Install using Homebridge UI or manually:
sudo npm install -g homebridge-intercom-automation-hatWhen running this plugin using homebride-config-ui you need to set permission to access i2c and gpio: First install homebridge-config-ui-x according to their instructions. Then open a terminal and execute the following two commands and reboot afterwards:
sudo adduser homebridge i2c
sudo adduser homebridge gpioConfiguration
Add the accessory in config.json in your home directory inside .homebridge.
Example configuration:
{
"platforms":
[{
"platform": "IntercomAutomationHAT",
"name": "Intercom",
"bellTimeout": "1000",
"lockTimeout": "1000",
"voltageLowLimit": "0.25",
"pythonPath": "/home/pi/venvs/automationhat/bin/python",
}]
}