Possibility to make SecuritySpy HomeKit compatible?
  • I know HomeKit is just starting to come to some acceptable level of maturity, but was curious if anyone knows if Apple has talked about any future capability for Mac software (I'm of course thinking specifically of SecuritySpy) to become any kind of official provider for HomeKit. I haven't heard anything like that yet myself, but it could open some possibilities.

    Minus that, does anyone know of any good way to use HomeBridge with SecuritySpy in any manner? Or might Ben at some point consider making a HomeBridge plugin?

    Ultimately, I'd love to expose the cameras motion sensors to HomeKit so I could use those as triggers to do other things (i.e. something triggers the motion detector in the backyard at night, turn on the outdoor lights for 10 minutes). I have a ton of HomeKit lights and other things so I've already invested a lot in HomeKit and at this point am only interested in trying to somehow bridge HomeKit and SecuritySpy rather than switch to another ecosystem.

    Thanks for any pointers, particularly with HomeBridge. I've seen there are different plugins for HomeBridge for several camera manufacturers but I own 3 brands of IP cameras and they do not all have HomeBridge plugins. So I think the best bet would probably be to "bridge" SecuritySpy itself so that I can utilize the feeds and (maybe/hopefully) the motion detection for HomeKit use.
  • FWIW, I recently bumped into this IOT workflow thats web based. It might be more involved than what you're looking for, but I was thinking about poking around with it and see what's possible with SecSpy functionality expansion/tie-ins for other IOT devices around the network.

    http://nodered.org
  • I'd love an option to have SecuritySpy disable camera alerts from inside my house when we come home. I think HomeKit has a way to know when you've arrived at home.
  • jms703 - this could also be achieved through other means depending on hardware/software available - IFTTT with a compatible iOS app that supports geofencing - being one such software method to trigger an applescript on the Mac running Security Spy to turn off Actions for the internal cameras.

    I personally mostly rely on schedules, and turning the Actions on/off for the unusual days when someone is home (or turning it on when we are out in a time when we are normally home) - variety of people in a given week (in my case makes) it harder to automate fully.
  • I'm in a similar position, with many HomeKit devices. While its certainly possible to bring things together with a DIY solution, HomeKit solves the basic problem of getting the tech approved by the rest of the family (who for some reason think ssh'ing into a remote server to turn the lights on is a bad thing!). Integrating everything into HomeKit is a massive win, and anything sitting outside the shared eco-system is going to be less useful.

    Unfortunately Apple are really slow in bringing HomeKit to the Mac (i.e. they haven't!). While Homebridge is pretty neat, its essentially a hack which Apple could shut down at any time. As such I can't see it ever being officially supported in commercial software. I'd assume Ben is watching HomeKit very closely, but until Apple offer something official there's nothing that can be done.

    Things that could be done now - The iPhone Security Spy app could implement geofencing just for SS. The other easy option is to have an SS Action which turns on a Hue light through the Hue interface (very easy), and then have HomeKit do something when that bulb turns on. Similar you can check the status of a Hue bulb, and use that to control SS using Apple Script..
  • It can be done using homebridge ffm-e.g. (https://github.com/KhaosT/homebridge-camera-ffmpeg) and a URL for the camera feed that I copied from the web interface. I've not got it setup at present as Ive recently changed a lot of stuff but when I did it worked fairly well.. although was a bit slow to start.
  • I've looked at HomeBridge, but I am also a bit leery of an under-the-table interface to HomeKit.

    Nonetheless, does anyone know if HomeBridge has support for HomeKit security cameras?

    What I mean is that HomeKit was updated last year to support the D-Link Omna 180 IP Camera. That is the first (and possibly still only) IP camera that officially supported by HomeKit.

    So Apple has added some limited capability in HomeKit for a video stream and some ways to control it. Possibly also some limited support for motion sensor triggering.

    Just wondering if HomeBridge links into this directly to allow other IP Cameras to mimic the D-Link and appear as fully native IP Camera to HomeKit?

    Of course, with WWDC 2017 only a week away, I hope we seem some HomeKit enhancements tucked in amongst the higher value changes Apple will be introducing.
  • HomeBridge will do whatever functionality Apple provides with HomeKit. Someone just needs to link the two together with there coding skillz!
  • Don’t suppose anyone else has had any luck with this? Since my last post the way that used to kinda work doesn’t anymore.. I’m not sure why! This is one of the last few bits I haven’t got integrated into HomeKit and it bugs me! (The other being Doorbells, thank you very much Ring!)
  • Well in case it’s of interest to anyone else there’s now a plugin for Indigo Domotics that, along with every other type of HomeKit device, can also add SecuritySpy feeds directly into the home app. It’s currently in public beta but in my tests it works nearly perfectly:

    https://github.com/Colorado4Wheeler/HomeKit-Bridge
  • I added my working config to the homebridge-camera-ffmpeg wiki, hopefully this may help some people out there. https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki/Tested-Configurations#securityspy-for-macos

    SecuritySpy seems like the ideal interface for camera-ffmpeg because you should be able to get almost anything working without having to do any heavy lifting.
  • Thickey, thanks for posting your working config. I think I have the config correct, but how do I actually see the cameras in the Home app? I have my Nest working through Homebridge, Homebridge appears to load the camera ffmpeg when I view progress in the Terminal, but I do not see how to add the cameras in the actual iOS Home app... Any advice?
  • ...and no sooner do I ask the question than I figure it out... I'm not exactly sure what I did this time, but everyone make sure you install ffmpeg first (thought I already had, reloaded it, works...)
  • I can’t get the config correct. Anyone willing to share a json file of a working setup that I could modify?
  • I got ffmpeg installed, and the platform loads when home bridge starts...but I think something is wrong with my command line although the json config is fine. I think I'm not including the security spy items where I should.

    Anyone able to help?
  • When using the ffmpeg with security spy config, does the home app allow to assign each camera to a dedicated room ?
  • startak11 if you're still working on this, I had problems with the initial install too. It's worth mentioning that there is a full ffmpeg platform that is separate from the Homebridge plugin...you need to install that first. That's where i had trouble, I was trying to install the ffmpeg main platform from ffmpeg.org...it was confusing and I never got it to work. Once I installed it using Homebrew, everything worked fine (http://brewformulas.org/Ffmpeg).

    So the process for me was; install Homebrew, install ffmpeg (the full platform) using homebrew, then install the ffmpeg Homebridge plugin (https://github.com/KhaosT/homebridge-camera-ffmpeg).

    And this is the Homebridge config that's working for me (using Mac Mini and iPhone 6s and iPhone X)...

    {
    "platform": "Camera-ffmpeg",
    "cameras": [
    {
    "name": "CameraName",
    "videoConfig": {
    "source": "-re -i http://<<username:password>>@<<address>>/++video?cameraNum=0",
    "stillImageSource": "-i http://<<username:password>>@<<address>>/++image?cameraNum=0",
    "maxStreams": 1,
    "maxWidth": 1920,
    "maxHeight": 1080,
    "maxFPS": 25
    }
    }
  • Trying to get this to work but no joy as of yet. Installed the components mentioned by @ifunlisted (Homebrew + ffmpeg using home-brew + ffmpeg home bridge plugin).

    Used the same config as @ifunlisted as well, with the only difference that I put a colon and the port number after the address and changed the cameraNum to 1 to correspond to my actual camera number as so...

    "source": "-re -i http://username:password@address.viewcam.me:8080/++video?cameraNum=1",
    "stillImageSource": "-i http://username:password@address.viewcam.me:8080/++image?cameraNum=1",

    Ran Homebridge and added Homebridge to HomeKit. It runs but no cameras are showing up. Here is the output when I run Homebridge

    Loaded config.json with 0 accessories and 0 platforms.
    Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-camera-ffmpeg' since we already loaded the same plugin from '/Users/MYUSER/.nvm/versions/node/v10.12.0/lib/node_modules/homebridge-camera-ffmpeg'.
    Loaded plugin: homebridge-camera-ffmpeg
    Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
    ---
    Loaded plugin: homebridge-foscam
    Registering accessory 'homebridge-foscam.Foscam'
    ---
    Loaded plugin: homebridge-nest
    Registering platform 'homebridge-nest.Nest'
    ---
    Load homebridge-camera-ffmpeg.Camera-ffmpeg
    Setup Payload:
    X-HM://0023ISYWY5GC2


    Questions (to @ifunlisted or anyone else here who has this working)...

    1) Aside from getting the right software installed and the right configuration, is there any other step to "add" the cameras (as a new accessory in HomeKit/Home app)?

    2) If no, then any idea about why my config doesn't seem to work (again, using @ifunlisted's config with only the mods above to the 'source').

    Thanks
  • I did end up getting it to work. Been working solid for months at this point. Once I installed home brew - And figured out all my syntax errors. It worked. My json file was overly complicated because of the nest devices so that made it more complicated.
  • @startak11 any chance you could share the relevant part of your JSON? (with username and password removed of course) I've been working on this for hours trying to get my SecuritySpy cameras to show up in HomeKit and am continually getting "ERROR: FFmpeg exited with code 1" errors in my Homebridge log.

    I'm confident that I have the regular ffmpeg package installed + the homebridge-camera-ffmpeg plugin as well (I have a couple other Homebridge plugins already running so some what familiar with it all already).

    I think it's the data in JSON for my SecuritySpy cameras that is no good... The example that @ifunlisted write out above is different from what @Thickey wrote out over on GitHub: https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki/Tested-Configurations#securityspy-for-macos

    Unfortunately for me neither ways of formatting my JSON do the trick (nor do any of the other variants I've tried). Any chance you @startak11 (or any other members who have this working) could post the relevant part of their working JSON for me to reference while I try to figure this out?
  • Help me @startak11, @ifunlisted, @Jupeman, @Thickey... you're my only hope! :)
  • I know it’s frustrating. It took awhile for me to figure this out. I’ll post my json when I get home in a bit.
  • OK, so the json is too long to post...send me a pm with your email and i'll send it over.
  • Thanks!!
  • Any response from Ben on this issue?
  • Hi @Richinwal and others. We certainly appreciate the enthusiasm to add HomeKit support to SecuritySpy, and agree that it would be a great feature addition. However this simply isn't possible at the moment with an official Apple API; the only way is via unofficial third-party software modules, which as @dct correctly points out could be shut down by Apple at any time. As soon as Apple release an official macOS API, we will be able to move forward with this.
  • Any updates on SecuritySpy supporting HomeKit?

    There are a lot more video devices popping up with HomeKit support that increase my enthusiam.
  • There has actually been some positive news on this recently, which is that with the advent of the next macOS (Big Sur), Apple is allowing limited access to HomeKit via "Mac Catalyst", which is a platform that allows iOS apps to run on macOS. Therefore, it may be possible for us to use an accessory app running under Mac Catalyst to enable HomeKit support in SecuritySpy. We're looking at this now, and I'll post back with any further updates.
  • Two thumbs up Ben!
  • Brilliant ....hope apple don't mess it up !
  • So I have been investigating and testing this. It seems that technically this should work - I've got a basic proof-of-concept app up and running under Catalyst in Big Sur and it has full access to HomeKit - both for reading values from accessories to allow triggers like "when kitchen light is turned on, start recording from camera X", as well as setting values in accessories to allow actions like "when motion is detected in camera X, turn on kitchen light".

    However, there are two significant problems:

    1. HomeKit apps can't be distributed directly to users; Apple has mandated that they have to go through the Mac App Store. This is inconvenient, as we wouldn't be able to bundle this add-on in SecuritySpy itself; it would have to be a separate download via the App Store. This is suboptimal, but not a deal-breaker.

    2. Presumably, Apple have a good reason for preventing macOS apps access to HomeKit. So, they may reject an app that provides a bridge between HomeKit and macOS from being allowed in the App Store.

    It's not clear whether they would in fact reject such an app - the App Store guidelines don't specifically prohibit this. But we would want to find out for sure before spending significant work on this project, so I'm trying to find this out from Apple.
  • Cool Ben. Im not sure if this is what you're referring to but there's a number of apps in the App Store that run a homekit server for unsupported homekit accessories eg. https://apps.apple.com/us/app/tpl-bridge/id1441858267?mt=12

    is this what you mean re Apple's acceptance under their rules ?
    Either way, I am assuming that you won't be able to add HSV
  • This is fantastic news I have my fingers crossed you can get some clarification on this being allowed. Personally I think it is such a huge "add on" to SS that buying the app from the Mac App Store would not even bother me.
  • Good point about existing HomeKit apps on the app store. However the ones that I can see there involve the macOS app simulating a HomeKit accessory and making it available to the Home app. As far as I can tell there is nothing that operates in the reverse: making HomeKit devices available for control from other macOS apps, which is what would be needed for SecuritySpy.

    As for HSV (HomeKit Secure Video), I don't think this will be possible to integrate with SecuritySpy unfortunately. As far as I can tell, this is for allowing cameras to record directly to iCloud, for viewing and playback in Apple's Home app only.
  • Up until 10.15 no macOS apps were given access to homekit whereas on iOS there are third party apps that control homekit devices. This is supposed to have changed in 11.0 where third party apps can access homekit. I have been waiting for eg. Home + by Matt which is a fantastic iOS app
  • Good news everyone: we have just released SecuritySpy 5.3, which includes HomeKit integration. You can read about this via the user manual here: SecuritySpy HomeKit Integration. Please provide feedback when you all have had a chance to test this. It does require macOS 11 Big Sur, but I'm afraid there is no way around this.
  • Would it be possible to have Security Spy mimic a seperate Homekit compatible IP camera for each camera feed? So when web server is enabled, you can go to the iOS home app and add an new accessory/device that home thinks is a physical camera but its actually a feed from ss?

    The goal is to be able to show a feed on an AppleTV using picture in picture, so you can check the front door camera without interrupting the movie.

    Maybe adding PIP support to the tvos app is a simpler solution? However, I’m yet to discover any 3rd party app with PIP capability so maybe it isn’t simple at all.
  • @dmg15 - no, unfortunately this functionality is not possible. The current HomeKit integration is about Triggers and Actions: starting recording based on HomeKit events (e.g. "if switch X turns on, start recording in camera Y"), or setting the state of HomeKit accessories based on camera events (e.g. "if motion is detected in camera Y, turn on light Z").
  • Thanks a lot Ben. Will test it out. Glad you said it requires Big Sur and not M1 ;)
  • The only way to get live feeds of non Apple HomeKit certified cameras into HomeKit is by using HomeBridge.

    There are multiple plug-ins available that can take live feeds directly from cameras and have them appear as native HomeKit camera feeds for live viewing/thumbnails, and even Doorbell simulation.

    Typically, a Raspberry Pi is used and the heavy-lifting is done by ffmpeg plug-ins that transcode into a stream that HomeKit accepts.

    I haven't used this myself; but as there is a decent HomeBridge setup for Ubiquiti Unifi cameras (which I use), it's on my list to try one of these days.

    Note that this only provides basic/regular HomeKit camera support. At this time, and maybe forever, no third party has any bridge or emulation that brings a non-HomeKit camera into HomeKit Secure Video (HSV).

    Most IP cameras will allow multiple clients pulling live video, so you should be able to have both SecuritySpy and HomeBridge pulling the video from a camera simultaneously. SS would provide the recording and advanced features, while HomeBridge lets HomeKit have live viewing and basic features within the Apple Home App (or 3rd party apps like HomeCam).
  • Ben, I'm unable to upgrade the machine running SS to MacOS 11 for now, so I can't see the answer for myself yet... My hope for Homekit integration was to be able to control actions and notifications. So for example, a camera faces our shop door outside, and another inside. If the door has been opened via Homekit, than turn off notifications from both cameras. So basically only notify and do actions when the door is closed, making it sort of an alarm system. When the door is open there would be multiple people in/out making the notifications and actions annoying.

    Another use that I think would be pretty standard is to alert or run actions on any indoor camera only if the Homekit alarm system has been set to away mode.
  • I updated my Mac mini and installed HomeHelper. Working very well. Thanks Ben! Nice update to SS. Nice implementation to hook SS up to HomeKit.
  • @doodah - great to hear that, thanks for reporting back!

    @calvarez - what you describe is exactly what SecuritySpy's new HomeKit features can do. I hope you will be able to update to Big Sur in the near future to take advantage of the new features.

    And @Spiv's info is all correct. There is no official way for us to make SecuritySpy's cameras available to HomeKit - the only sanctioned HomeKit accessories allowed by Apple are hardware devices from manufacturers who have been through a strict certification process. Most IP cameras can indeed provide multiple streams, so you can have one going to SecuritySpy and another to HomeBridge.
  • Great! SS runs on a Hackintosh, so upgrades are scary. I will be getting a Mini M1 but have to wait for a custom order to get 16GB.

    For those considering Homebridge, I've been using it for many years and many iterations. I'm a Linux/VoIP admin by trade though, so that helps, but honestly HB has become so much easier to install and use lately. And there is a HOOBS package where it's pretty much all done for you. Good as far as easy, but possibly bad because it's kind of a black box and some people who have issues then have a seemingly difficult time with it.

    I have a Pi4 2GB running on PoE in the network closet. It is bridging a bunch of accessories as well as 7 cameras. The CPU runs at only 3-5% while idle and under 10% when streaming a 4k camera. So it's super efficient. It's also our ad-blocking DNS server and does a few other things like managing the Ubiquiti network devices. So much power for so little money. It has been 100% reliable and stable for years.

    So for the cost I'd tell people to go for it, give it a try.
  • Ben,

    Just upgraded to Big Sur and also downloaded the "HomeHelper" app to try and setup some triggers for HomeKit.

    One problem (and a small typo bug):

    The list of HomeKit devices is only a small subset of my total devices. I saw that 1.0.1 was supposed to make for a scrollable list (and this is the version I have) - but it's not working for me. Just shows the number of devices (in some 'random' order too) that fit in the dialog with no option to scroll to see more. As luck would have it the devices I need are NOT in the list I can see.

    Also, just FYI there is a small typo bug. In the explanatory text it says "No tiggers are configured - click here to add one". Should be triggers not tiggers :-)

    I know you'll get these little niggling issues sorted out quickly enough. Definitely appreciate the features and looking forward to trying it once I can select the devices I need.

    -Cameron
  • Hi @CameronB thanks for your feedback. We'll get that annoying spelling error fixed!

    As for the list of accessories, this is grouped by room, and is definitely now scrollable, so if the list is too big to fit on the screen then you should be able to scroll up/down. However note that HomeHelper only currently supports certain types of accessories, as follows:

    - Anything with a power state (e.g. power output, switch)
    - Anything with an input/contact state (e.g. a sensor)
    - Occupancy detectors
    - Security systems
    - Anything with a brightness (e.g. lightbulb).

    What are the types of accessories that you can't see in HomeHelper's list?

    Does the list actually go to the bottom of your screen (i.e. it looks like it's cut off)?
  • Ben,

    I see a total of 16 items. There is no scroll bar and neither the mouse nor the arrow keyboard keys 'scroll'. So either it isn't scrolling...or...it is missing some items that should be there.

    Thanks for letting me know that not every HomeKit device is supported. So that explains why things like the garage door opener and sprinkler controller isn't showing up.

    The main device I am looking for and not seeing is an external motion sensor (by Hue).

    Maybe there is an issue because it is a bridged accessory (through the Hue bridge)?
  • Hi @CameronB I can only assume that this accessory makes available services that HomeHelper does not currently support. This is surprising, as the motion sensor should provide a simple switched output, and HomeHelper does support all accessories that have switched outputs.

    I will email you directly with some instructions on how we can set up a test version of HomeHelper on your machine, so we can get some debugging information that will allow us to get to the bottom of this. It should be possible to add support for this device once we know what's going wrong.
  • Thanks Ben. I'll look forward to your email and trying to figure this out. The actual sensor is this one: https://www.philips-hue.com/en-us/p/hue-outdoor-sensor/046677541736 which, as I mentioned, is a bridged accessory. Hopefully we can figure it out offline.

    To make this at least a *little* interesting for everyone else reading this, I have tried at least three different motion detectors and the Hue one is by FAR the best. It is instantly reactive (though you can adjust the sensitivity), is weatherproof, also provides light reading (in lux) and accurate temperature readings and best of all SIPS battery. I have had one installed near the front door for at least 6 months and the battery still reads 100%. All for $50. Recommended.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!