Page 1 of 1

SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Sat Jan 30, 2021 12:28 pm
by Alphaman
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?

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Sat Jan 30, 2021 1:08 pm
by siclark
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.

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Sun Jan 31, 2021 5:00 pm
by Londonmark
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.

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Sun Jan 31, 2021 5:39 pm
by webdeck
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.

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Sun Jan 31, 2021 6:29 pm
by webdeck
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

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Sun Jan 31, 2021 10:19 pm
by Alphaman
Nice! I’ll review your code and give it a try this week!

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Wed Dec 01, 2021 5:58 pm
by mikejandreau
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.

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Wed Dec 01, 2021 7:21 pm
by webdeck
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.

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Thu Dec 02, 2021 8:32 am
by mikejandreau
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?

Re: SecuritySpy + Cynical + HomeKit Bridge to AppleTV?

PostPosted: Thu Dec 02, 2021 9:20 am
by webdeck
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.