SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

Posted on
Sat Jan 30, 2021 12:28 pm
Alphaman offline
Posts: 36
Joined: Jun 07, 2014

SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

I’ve got my cameras setup in SecuritySpy and using HK Bridge in Indigo, see them in my Home apps, on the Mac, iOS, and tvOS. I can even long-press the TV button on the remote and bring up the cameras on my TV. Works great and absolutely love it!
Recently I learned that doorbell cameras with HomeKit integration can actually have a pop up PIP with the camera on-screen.
Anyone have any ideas as to what triggers can be pulled from Indigo through HKBridge to trick the  TV into doing that?

Posted on
Sat Jan 30, 2021 1:08 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

I think it’s a HomeKit setting that HKB doesn’t support.
I’d suggest looking at running Homebridge.io as a separate instance for devices like cameras that a few of us to and not only can you set up any camera as a doorbell one but I think use any device to trigger, ie motion rather than doorbell push.

Posted on
Sun Jan 31, 2021 5:00 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

I use Homebridge.io with a ring doorbell and it shows up on my Apple TV. Was straightforward to set up. Don’t know about security spy but might be worth looking there.

Posted on
Sun Jan 31, 2021 5:39 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

I have this working outside of Indigo and HKB via a separate Homebridge server and the homebridge-camera-ffmpeg plugin. It allows you to indicate the doorbell ringing by hitting a url, and I have a Security Spy motion trigger setup to hit that url. It’s a bit to get it setup, but it works.

It is possible to add this support to HKB, I believe, but it would require a bunch of coding to update the plugin.

Posted on
Sun Jan 31, 2021 6:29 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

Here are the details of how I have this working:

This is all assuming you're using the friendly web interface to configure your Homebridge server. This can all be done with config.json, but it's less friendly.

In Homebridge configuration for Homebridge Camera FFmpeg:

Camera video source as (replace LOGIN, PASSWORD, HOSTNAME, PORT, and CAMERA as configured in SecuritySpy - update width and height to match your camera's resolution):
Code: Select all
-re -i http://LOGIN:PASSWORD@HOSTNAME:PORT/++video?cameraNum=CAMERA&width=2560&height=1440

Still image source as (replace LOGIN, PASSWORD, HOSTNAME, PORT, and CAMERA as configured in SecuritySpy - update width and height to match your camera's resolution):
Code: Select all
-i http://LOGIN:PASSWORD@HOSTNAME:PORT/++image?cameraNum=CAMERA&width=2560&height=1440

Check Enable Motion Sensor and/or Enable Doorbell under Automation.

Under Global Automation, choose any unused HTTP Port under HTTP Server.

Save the configuration and restart your Homebridge server.


In SecuritySpy, camera configuration, Actions, create a script to run when motion is detected. The script should be (replace HOSTNAME with the hostname of your Homebridge server, PORT with the HTTP Port you chose above, and CAMERANAME with the name of the camera you chose when you configured it in Homebridge, replacing any spaces with %20 [url encoding]):

Code: Select all
do shell script "/usr/bin/curl -s http://HOSTNAME:PORT/doorbell?CAMERANAME"

You can replace "doorbell" with "motion" to indicate motion instead of a doorbell.

You can now get notifcations on your Macs, iOS devices, Apple TVs, Apple Watches, and Homepods (which chime when there is a doorbell notification.) They will all be turned on by default on Homekit. You have to turn the notifications off individually for each device where you don't want them.

-Mike
Attachments
Screen Shot 2021-01-31 at 4.11.31 PM.png
Screen Shot 2021-01-31 at 4.11.31 PM.png (380.67 KiB) Viewed 2644 times
Screen Shot 2021-01-31 at 4.12.22 PM.png
Screen Shot 2021-01-31 at 4.12.22 PM.png (91.12 KiB) Viewed 2644 times

Posted on
Sun Jan 31, 2021 10:19 pm
Alphaman offline
Posts: 36
Joined: Jun 07, 2014

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

Nice! I’ll review your code and give it a try this week!

Posted on
Wed Dec 01, 2021 5:58 pm
mikejandreau offline
Posts: 78
Joined: Jul 07, 2016

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

Are you using your Secrutiy Spy IP and port here to connect to Homebridge? Or directly connecting to the cameras and just using the motion triggers from Security Spy?

I’m in the process of setting Homebridge up for the first time and trying to find the best approach. If I can get cameras to work, I’ll work on moving all my INSTEON stuff over and ditch Indigo entirely.

Posted on
Wed Dec 01, 2021 7:21 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

I am using SecuritySpy's camera feed as that is the same regardless of the type of camera being used. If you want to use a camera directly without SecuritySpy, then you need to figure out how to configure the streaming URL properly - I can't help with that.

Posted on
Thu Dec 02, 2021 8:32 am
mikejandreau offline
Posts: 78
Joined: Jul 07, 2016

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

Thanks @webdeck.

I added the Security Spy camera, but can't get live video. But I'll figure that out.

When I try to add your action to Security Spy's Actions, I get an error:

Code: Select all
do shell script "/usr/bin/curl -s http://HOMEBRIDGEIP:HOMEBRIDGEPORT/doorbell?DrivewayCam"

/bin/bash: -c: line 0: syntax error near unexpected token `do'
/bin/bash: -c: line 0: `do shell script "/usr/bin/curl -s http://HOMEBRIDGEIP:HOMEBRIDGEPORTdoorbell?DrivewayCam"'

[Command fininshed running]


If I try to curl the right URL right from iTerm, I get "no matches found" for any of the doorbell/motion sensors I try.

What am I missing?

Posted on
Thu Dec 02, 2021 9:20 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

Sorry, I missed a step - create that script in Script Editor - it is an AppleScript command. Save it and then set that AppleScript file as the action in SecuritySpy.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest