SecuritySpy, our macOS CCTV software, has built-in HomeKit integration that allows it to control, and be controlled from, accessories like sensors, switches and lights, across your Apple Home automation system.
But, what about making live video from SecuritySpy’s cameras available to Home? This blog post explains how to do this.
Step 1: Install FFmpeg
- You can either download the very latest build (left column) or the last official release (right column)
- Click the Download as ZIP link
- Once downloaded, double-click on the zip file to expand it, which should give you an executable file called ffmpeg
- In the Finder, select the Go to Folder option in the Go menu, enter /usr/local/bin, and press the Go button to open this folder
- Drag the downloaded ffmpeg executable into the /usr/local/bin folder
Step 2: Install Homebridge
Homebridge is a platform that allows the integration of a wide variety of devices, accessories and applications into your Home environment. Homebridge will act as an intermediary, taking video feeds from SecuritySpy and making them available to Home.
Follow these instructions to install Homebridge on the same Mac that is running SecuritySpy.
Step 3: Install the Homebridge Camera FFmpeg plugin
This plugin takes any RTSP stream, such as those provided by SecuritySpy, and creates virtual cameras from these that are then provided to Home.
- Log on to the Homebridge web interface – on the same computer that runs Homebridge, this is available at http://localhost:8581
- Click the Plugins tab at the top, search for Homebridge Camera, and this plugin should appear in your search results; click the INSTALL link to install it
- You should now see this installed in the Plugins section in Homebridge, like this:
Step 4: Configure cameras in the Homebridge Camera plugin
Click on the plugin’s SETTINGS link, and a panel appears that allows you to add and configure cameras. The only three items you will need to set are: Name, Video Source, and Still Image Source – leave all other settings at their default values.
To generate the URLs to give to the plugin, use SecuritySpy’s URL Generator window, which is available from the Window menu:
- Type: for the Video Source link, this should be set to RTSP H.264; for the Still Image Source link, this should be set to HTTP JPEG Still Image
- Client location: assuming Homebridge is running on the same Mac as SecuritySpy, this should be set to This Mac
- Camera: select which of SecuritySpy’s cameras you want to stream to Home
- Authentication: select a web account that has access to this camera, and a secure authentication token will be added to the URL. This token provides access to the specified resource only, and it is impossible to derive the account’s username or password from it. If the account is subsequently deleted, or its username or password changed, the token will become invalid.
- Encryption: leave this turned off (communication between SecuritySpy and Homebridge is within the same Mac, so this is not required)
Copy and paste the two generated links into the plugin’s setup panel, which should then look something like this:
Make sure to leave the audio option turned off (due to AAC licensing issues, this requires a special build of the FFmpeg library that isn’t readily available for download).
Step 5: Add Homebridge to Home
The main page of the Homebridge web interface will show a QR code: scan this with the Camera or the Home app on your iOS device to add Homebridge to your Home system.
That’s it! Live video from Your camera(s) should now appear in the Home app across all your devices, like this: