Adding SecuritySpy Cameras To HomeKit Using Homebridge

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

FFmpeg is a free library used for video processing. The easiest way to install this is to download the latest compiled version from the FFmpeg static binaries for macOS page:

  • 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
  • Verify that ffmpeg has permission to run by right-clicking on it and selecting the Open option; agree to any permissions prompt, and it should open in Terminal and show some informational text

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), and make sure to add the -i prefix before each URL as shown above.

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:

The thumbnails will update every 10s – tap on one to view the full live stream.

4 thoughts on “Adding SecuritySpy Cameras To HomeKit Using Homebridge

  1. Chip

    I am so very grateful for you putting this together (and for security spy in general). I had read the instructions in blogs before but didn’t trust the instructions until I saw them all here. I have don’t everything listed above, and double checked, I only get still images updated everything 10s, when I try to see the actual video it never starts. Any ideas? Thanks!

    1. Ben Software Post author

      The 10s update time for still images is up to Home – I don’t think this can be adjusted unfortunately. As for the live video, check that you have the “-i” prefix before the URL as entered into the plugin, as this is a common thing that can get left out. Another thing you can do is to turn on debug logging in the plugin (in the Advanced section), and then see what messages are displayed in the log on the main page of the Homebridge screen when you attempt to start the video – this may give you some clues as to what is going wrong. Remember to restart Homebridge when you make any settings changes in the plugin.

  2. Troy

    Will the video only work if you are on the local network, or will they work from anywhere? I will have to try this out.
    I find the blogs to be as much help if not more than the documentation. Keep up the good work!


Leave a Reply

Your email address will not be published. Required fields are marked *