A Raspberry Pi camera works fine as a HomeKit accessory – you just need the right software layer between them. This isn’t a one-click process, but it’s not hard either. If you’ve ever used the terminal and installed a package or two, you’re qualified. Budget about an hour for a clean install.
The standard approach in 2026 is Homebridge with the homebridge-camera-ffmpeg plugin. It’s actively maintained, supports HomeKit Secure Video, and has solid documentation. There’s also a newer option called Scrypted that’s faster and easier to configure – more on that below.
What You Need
Hardware
- Raspberry Pi 4 or Pi 5 – the Pi 3 is too underpowered for smooth video transcoding. The Raspberry Pi 5 4GB is the better buy in 2026 if you’re starting fresh.
- Raspberry Pi Camera Module 3 – 12MP, autofocus, HDR support. The official Camera Module 3 connects via ribbon cable to the CSI port. Wide-angle and NoIR (night vision) variants are also available.
- Official Raspberry Pi power supply (USB-C for Pi 4/5)
- 16GB+ microSD card
Software
- Raspberry Pi OS (Bookworm or later) – use the Raspberry Pi Imager to flash it
- Homebridge (free, open source)
- homebridge-camera-ffmpeg plugin
- ffmpeg-for-homebridge (static FFmpeg binary maintained by the Homebridge project)
Setup Steps
Flash Raspberry Pi OS and boot the Pi
Use Raspberry Pi Imager to write Raspberry Pi OS (64-bit, Bookworm) to your microSD card. In the Imager settings, pre-configure your Wi-Fi credentials and enable SSH – this saves you from needing a monitor and keyboard. Insert the card, connect power, and wait about 60 seconds for first boot.
Connect the Camera Module
Shut down the Pi first (sudo shutdown now). Locate the CSI ribbon cable port – on the Pi 5 it’s labeled ‘CAM/DISP 0’. Gently pull up the plastic locking tab, slide in the ribbon cable (contacts facing the board on Pi 4; contacts facing away on Pi 5 – check your model), and press the tab back down. Power the Pi back on.
Verify the camera is detected
SSH into the Pi (ssh [email protected]) and run: rpicam-still -o test.jpg
If it captures without error, the camera is working. On older Pi OS versions you may need to run: sudo raspi-config > Interface Options > Camera to enable it.
Install Homebridge
Follow the official installation for Debian/Ubuntu-based systems. Run these commands one at a time:
curl -sSfL https://repo.homebridge.io/KEY.gpg | sudo gpg –dearmor | sudo tee /usr/share/keyrings/homebridge.gpg > /dev/null
echo “deb [signed-by=/usr/share/keyrings/homebridge.gpg] https://repo.homebridge.io stable main” | sudo tee /etc/apt/sources.list.d/homebridge.list > /dev/null
sudo apt-get update && sudo apt-get install homebridge
Homebridge runs as a service and starts automatically on reboot. Access the web UI at http://raspberrypi.local:8581
Install homebridge-camera-ffmpeg and ffmpeg
In the Homebridge web UI, go to Plugins and search for homebridge-camera-ffmpeg. Install it. Then install the Homebridge FFmpeg binary the same way – search for ffmpeg-for-homebridge. This gives you a static FFmpeg build with hardware acceleration support for V4L2M2M (used by the Pi’s GPU).
Configure the camera plugin
In the Homebridge web UI, click the Settings icon next to homebridge-camera-ffmpeg. Use this configuration as a starting point for Raspberry Pi Camera Module:
{
“name”: “Pi Camera”,
“videoConfig”: {
“source”: “-f v4l2 -i /dev/video0”,
“stillImageSource”: “-f v4l2 -i /dev/video0”,
“maxStreams”: 2,
“maxWidth”: 1280,
“maxHeight”: 720,
“maxFPS”: 30,
“vcodec”: “h264_v4l2m2m”
}
}
Note: use h264_v4l2m2m (not h264_omx – that codec was removed in newer Pi OS versions). The /dev/video0 path assumes the Camera Module is your only video device; run ls /dev/video* to confirm.
Add Homebridge to HomeKit
Open the Home app on your iPhone or iPad. Tap the + button, then Add Accessory. Tap More options if Homebridge doesn’t appear automatically. Scan the QR code shown in the Homebridge web UI dashboard, or tap “Enter Code” and type the 8-digit PIN. Accept the “Uncertified Accessory” warning – that’s expected for Homebridge. Your Pi camera should then appear in HomeKit under the Cameras section.
Streaming Quality and Limitations
With a Pi 4 or Pi 5 using h264_v4l2m2m hardware encoding, you’ll get clean 720p or 1080p streaming at 30fps with low CPU load. A Pi 3 can technically run this, but the CPU will struggle with transcoding and you’ll get choppy video – don’t bother.
Latency sits around 1-3 seconds in HomeKit’s live view, which is normal for RTSP-over-HomeKit. You’re not getting a doorbell camera experience here. It’s fine for monitoring, not great for real-time security response.
The camera only streams when you open the Home app to view it, or when motion recording is active. There’s no persistent local recording out of the box with this setup.
HomeKit Secure Video vs Basic Streaming
The homebridge-camera-ffmpeg plugin supports HomeKit Secure Video (HKSV) as of v4.0. HKSV gives you motion-triggered recording stored in iCloud, event timeline in the Home app, and face/person/animal detection. It’s what dedicated HomeKit cameras like Logitech Circle or Eufy do natively.
The catch: HKSV requires an iCloud+ subscription (starts at $0.99/month for 50GB, which covers up to one camera). Without iCloud+, you get live streaming only – no recordings, no motion alerts.
Motion detection quality on a Pi camera through Homebridge is also software-based (ffmpeg pixel difference), which means more false positives than a dedicated camera with on-device AI. For a workshop monitor or baby cam, that’s fine. For a front door where every passing car triggers it, less so.
If you want better motion detection without buying dedicated hardware, Scrypted is worth a look. It’s a video integration platform that runs on the Pi, has a cleaner UI than Homebridge, and handles HKSV with better performance. The tradeoff is a slightly higher learning curve to configure the Pi camera source.
Related Guides
If you’re building out a larger HomeKit setup with your Pi, these might be useful:
