Recently, SimCam sent me one of their AI Security Cameras to have a play with. But, I like being able to see things from one place—the Apple Home app. SimCam doesn’t work natively with HomeKit, but when I discovered it puts out an RTSP stream the Homebridge cogs started turning in my brain.

This guide will work for any IP camera that outputs an RTSP stream, but there may be some differences between your cameras app and the SimCam one.

Before getting started I recommend setting a static IP for your IP camera. You can do this on almost all routers, but the steps will be different. Just search the name of your router + ‘DHCP assignment’ and follow the instructions presented!

After setting a static IP you’ll want to jump onto your Raspberry Pi running Homebridge. If you haven’t already got a Homebridge setup, check out my previous post.

Installing h264 and FFmpeg

Before installing the Homebridge plugin you’ll need to first install FFmpeg itself. Installing FFmpeg requires several commands, but the steps for this are detailed below! Firstly you’ll want to install several build tools, simply run the below command in terminal:

sudo apt-get install git pkg-config autoconf automake libtool libx264-dev

After this has installed you’ll need to download the h264 library. To do this run the following commands:

cd ~
git clone --depth 1
cd x264

Once this has downloaded and you’ve navigated to the subfolder, you’ll need to configure the installation. To do this run the following command:

./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl

The next command you enter will depend on what Rasberry Pi you have.

If you have a model older than the 3B+ instead of make -j4 run the command make -j (the difference in command is due to the number of cores available in older Pis)

This process took around 3-4 minutes for me, so set it running and go make a cup of tea 🙂

make -j4
sudo make install.

After the above has finished, you now have all the prerequisites and can start to install FFmpeg itself. To do this first run the following commands:

cd ~
git clone git:// --depth=1
cd ffmpeg

Like before, you’ll need to configure the installation. To do this run the following command:

./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree

After this you will again want to run the make -j4 (or make -j) command. This process took around 30 minutes on my Raspberry Pi 3b+ and will take considerably longer when ran with make -j.

After this has completed the final step will be to run the command:

sudo make install

Homebridge Setup

Now that FFmpeg is installed we can start setting up and configuring the homebridge-camera-ffmpeg plugin. The first step to this will be to install the plugin itself. To do this run the following command:

sudo npm install -g homebridge-camera-ffmpeg

Before adding the plugin to Homebridge you’ll want to find out the RTSP stream URL for your camera. For SimCam the way to do this is as follows:

  • Open the SimCam app and press the Settings cog on the camera you want to add.
  • From this list, select ‘Camera Information’.
  • Press the ‘Obtain’ button on the option ‘RTSP streaming address’
  • Write down this URL, as you will need to include it in your config.json.

Now you have the RTSP URL, open your config.json and add the following code underneath the platforms header. Substituting RTSP URL for the RTSP URL you just copied.

    "platform": "Camera-ffmpeg",
    "cameras" [{
        "name": "Camera Name",
        "manufacturer": "",
        "model": "SimCam",
        "videoConfig": {
            "source": "-re -i RTSP URL",
            "videoFilter": "none",
            "vcodec": "copy",
            "maxBitrate": 200,
            "packetSize": 188

The above config is what I’ve found works best for the SimCam and gives me a low latency feed both at home and away. You may want to change the Camera Name as this is what will appear in HomeKit.

After saving your config.json restart Homebridge. After restarting, the camera won’t immediately appear in HomeKit, this is because it needs to be added directly.

If you’re running Homebridge as a systemctl and can’t see this log, the setup code is the same as your main Homebridge pin.

To add the camera to your HomeKit system:

  • Open the HomeKit app and press the + button.
  • Select the option ‘I Don’t Have a Code or Cannot Scan’.
  • Your SimCam camera will be listed at the top under ‘Nearby Devices’ click on the camera’s icon.
  • Enter your Homebridge Code.

After adding the camera it will appear at the bottom of your favorites page, and when full-screening the camera it loads quickly! You can also see what output quality and settings Homebridge is sending in the Homebridge Log.

Overall I’m extremely happy with the end results of this little project! It has definitely improved the usefulness of the SimCam cameras for me, and my grand quest to have any and all smart products I buy appear in the Apple HomeKit app. If you have any questions about this setup please drop me a comment below and I’d be more than happy to answer them!

We don’t run ads on Tech Trail. So if you’ve found this or any of our other posts useful, then why not buy us a coffee!

By Sam Brooks

Sam is the founder and editor for Tech Trail. With a background in Broadcast Engineering, and great enthusiasm for smart home and emerging technologies.

More by Sam →