HomeKit Bridge Replacement = Priorities?

Posted on
Mon Apr 11, 2022 7:24 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: HomeKit Bridge Replacement = Priorities?

For SecuritySpy, right now I have it setup and working using homebridge completely outside of Indigo. The benefit of SecuritySpy is that any camera supported by SecuritySpy looks exactly the same to HomeKit, so by doing one integration you support hundreds of different cameras.

I haven't looked into the more recent homebridge advances that add HomeKit Secure Video support for arbitrary cameras, but if you pull that off, that would be even more amazing.

Anyway, here is how I have things setup in my system. On the homebridge side, using the https://github.com/Sunoo/homebridge-camera-ffmpeg#readme plugin, configure video source as (things in all caps are values to be inserted - SS=SecuritySpy):
Code: Select all
-re -i http://SSUSERNAME:SSPASSWORD@SSHOSTNAME:8001/++video?cameraNum=CAMERANUMBER&width=WIDTH&height=HEIGHT

And the image source is identical except instead of ++video it is ++image

Now as for detecting motion and ringing a doorbell, the plugin has the option of attaching a motion sensor and a doorbell to the camera. You can trigger either by hitting a URL - docs here: https://sunoo.github.io/homebridge-came ... /http.html

So then the last piece is I have SecuritySpy configured to trigger a call to the motion detected and/or doorbell URL when it detects motion (SecuritySpy can use AI to detect motion even on cameras that don't support it.)

So the upshot is that when someone walks up to my front door, SecuritySpy detects motion, triggers the script that hits the URL to ring the "doorbell", which then magically appears on all my Apple devices with a live video feed. It is an awesome setup.

Anyway, what I have works, but given that Indigo has a SecuritySpy plugin, I figured this kind of setup could be automated more easily within Indigo instead of how I have it cobbled together through a homebridge instance, SecuritySpy configurations, and the shell script to run curl to hit the doorbell URL.

-Mike

Posted on
Mon Apr 11, 2022 8:05 pm
GlennNZ offline
User avatar
Posts: 1565
Joined: Dec 07, 2014
Location: Central Coast, Australia

HomeKit Bridge Replacement = Priorities?

webdeck wrote:
For SecuritySpy, right now I have it setup and working using homebridge completely outside of Indigo. The benefit of SecuritySpy is that any camera supported by SecuritySpy looks exactly the same to HomeKit, so by doing one integration you support hundreds of different cameras.

I haven't looked into the more recent homebridge advances that add HomeKit Secure Video support for arbitrary cameras, but if you pull that off, that would be even more amazing.

Anyway, here is how I have things setup in my system. On the homebridge side, using the https://github.com/Sunoo/homebridge-camera-ffmpeg#readme plugin, configure video source as (things in all caps are values to be inserted - SS=SecuritySpy):
Code: Select all
-re -i http://SSUSERNAME:SSPASSWORD@SSHOSTNAME:8001/++video?cameraNum=CAMERANUMBER&width=WIDTH&height=HEIGHT

And the image source is identical except instead of ++video it is ++image
Now as for detecting motion and ringing a doorbell, the plugin has the option of attaching a motion sensor and a doorbell to the camera. You can trigger either by hitting a URL - docs here: https://sunoo.github.io/homebridge-came ... /http.html

So then the last piece is I have SecuritySpy configured to trigger a call to the motion detected and/or doorbell URL when it detects motion (SecuritySpy can use AI to detect motion even on cameras that don't support it.)

So the upshot is that when someone walks up to my front door, SecuritySpy detects motion, triggers the script that hits the URL to ring the "doorbell", which then magically appears on all my Apple devices with a live video feed. It is an awesome setup.

Anyway, what I have works, but given that Indigo has a SecuritySpy plugin, I figured this kind of setup could be automated more easily within Indigo instead of how I have it cobbled together through a homebridge instance, SecuritySpy configurations, and the shell script to run curl to hit the doorbell URL.

-Mike


Hi Mike

BlueIris - is essentially (a better!) version of Security Spy - so similiar rules apply, any camera/any number of cameras for same price as well (I have 21 - all in Homekit now) and only one setup needed to get into Homekit. So understand that bit!

Will see how go regarding adding Security Spy - it will need is own class - so not simply a matter of changing the video/image stream like it is in ffmpeg addon.

My understanding from limited reading is Security Spy rtsp stream provides much better image/speed in HomeKit:
This is from ffmpeg config page - using hls
Code: Select all
-i http://<SecurityspyUsername>:<SecurityspyPassword>@<SecurityspyIP>:<SecurityspyPort>/++hls?cameraNum=0&codec=h264&width=1280&height=720

or this is rtsp stream - which should be better.
Code: Select all
-rtsp_transport tcp -probesize 32 -analyzeduration 0 -re -i rtsp://192.168.1.2:8000/stream?cameraNum=1&codec=h264


If/When I get to installing security spy I'll try them out as well.

As for Motion/Doorbell - the plugin - I presume you mean ffmpeg. See my last post about Doorbell and Motion. What you describe is working with Homekit plugin and Blueiris - plus more.
I have that integrated into the Homekit camera device for BlueIris, except no script needed. (and can directly select notification for motion or doorbell events in Homekit for each camera)
But in addition to what you describe (which is motion triggering, via a doorbell callback),you can also trigger on a Indigo "Doorbell" device, so if door opened/doorbell pressed/motion detected in any non-camera sensor - can have the same - "Doorbell pressed, Camera stream" notification to all devices.
Last edited by GlennNZ on Tue Apr 12, 2022 2:34 am, edited 1 time in total.

Posted on
Mon Apr 11, 2022 8:11 pm
rehafer offline
Posts: 279
Joined: Feb 08, 2013

Re: HomeKit Bridge Replacement = Priorities?

I would like to add Humidity sensors and ceiling fans to the list.
This is a fine undertaking and I would encourage you wholeheartedly.
BTW, there’s an app called Harmony Bridge in the Mac App Store that bridges Harmony hubs to HomeKit.

Posted on
Mon Apr 11, 2022 9:59 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: HomeKit Bridge Replacement = Priorities?

GlennNZ wrote:
Hi Mike

BlueIris - is essentially (a better!) version of Security Spy - so similiar rules apply, any camera/any number of cameras for same price as well (I have 21 - all in Homekit now) and only one setup needed to get into Homekit. So understand that bit!

Will see how go regarding adding Security Spy - it will need is own class - so not simply a matter of changing the video/image stream like it is in ffmpeg addon.

My understanding from limited reading is Security Spy rtsp stream provides much better image/speed in HomeKit:
This is from ffmpeg config page - using hls
Code: Select all
-i http://<SecurityspyUsername>:<SecurityspyPassword>@<SecurityspyIP>:<SecurityspyPort>/++hls?cameraNum=0&codec=h264&width=1280&height=720

or this is rtsp stream - which should be better.
Code: Select all
-rtsp_transport tcp -probesize 32 -analyzeduration 0 -re -i rtsp://192.168.1.2:8000/++stream?cameraNum=1&codec=h264


If/When I get to installing security spy I'll try them out as well.

As for Motion/Doorbell - the plugin - I presume you mean ffmpeg. See my last post about Doorbell and Motion. What you describe is working with Homekit plugin and Blueiris - plus more.
I have that integrated into the Homekit camera device for BlueIris, except no script needed. (and can directly select notification for motion or doorbell events in Homekit for each camera)
But in addition to what you describe (which is motion triggering, via a doorbell callback),you can also trigger on a Indigo "Doorbell" device, so if door opened/doorbell pressed/motion detected in any non-camera sensor - can have the same - "Doorbell pressed, Camera stream" notification to all devices.


Is BlueIris available for macOS? I only see a Windows version, so that doesn't work for me.

I'll have to try the hls or rstp config - I set up my SecuritySpy integration a long time ago before they added support for those, and there is a delay before the video feed comes through with my current setup. Thanks for the pointer.

The one thing I'm not clear on is how you know when motion is detected. That's why I had to have the script triggered by SecuritySpy when it detects motion. If there is a way to do that without having to configure it within SecuritySpy, that's even better.

And thanks for taking this on. I didn't even know there was a python implementation for HomeKit - all I've used is homebridge.

-Mike

Posted on
Mon Apr 11, 2022 11:19 pm
GlennNZ offline
User avatar
Posts: 1565
Joined: Dec 07, 2014
Location: Central Coast, Australia

HomeKit Bridge Replacement = Priorities?

Yep BlueIris is only for Windows…
Windows micro PC 1/3 price OSX running 21 cameras with CPU usage of about 33%. (eg.Dell Optiplex Micro 7040 i7 35Watts)
Currently I’m trailed Security Spy and have 37% usage with one camera on a old Mac mini.

The BI Indigo Plugin - reports motion back to Indigo and updates the Device states. This is how HomeKit Cameras know about motion and where the motion for the camera sensor comes from.

I see that Security Spy plugin - has a trigger option, but no device states update. This will be issue as don’t wish to catch all triggers just to update security spy. May with even more time be able to make user selectable motion sensor device for HomeKit camera usage…

& I have tried your settings:
/video++ - this is a mjpeg stream from Security Spy. No audio and gets converted to h264 - pretty average quality stream because of this - but once I disabled audio have it working. Starts very quickly - and seems relatively usable on further reflection. This seems the best option - despite the negatives of quality, conversion to h264 (uses local CPU++) and no sound….

The maybe newer hls++ and stream++ and rtsp: settings sometimes results in a h264 stream - but not a HomeKit compatible stream from my initial testing. Or not one I have got working as yet. Lots of ffmpeg errors are reported when run the same settings separately. May not be an option, but will try some more.


Sent from my iPad using Tapatalk

Posted on
Tue Apr 12, 2022 9:26 am
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: HomeKit Bridge Replacement = Priorities?

I love this community! Glad to see GlennNZ working on this and sharing with the group. Thank you.

I now run a hybrid with Indigo HomeKit Buddy Bridge and regular HomeKit Bridge in a docker container on my NAS.

Indigo devices I project via HomeKit Bridge (some types already mentioned here):

    Locks
    Window Shades (mine are Lutron and I use Lutron to send the lights, but Lutron does not support shades as a stand-alone device)
    Temp sensor
    Luminance sensor
    Motion
    Humidity sensor (all four separate devices in HomeKit; in reality one Aeon multi sensor device)

    A Indigo Virtual Device that triggers a scene (to power cycle my internet connection)
    A WaterCop (Z-Wave) device that projects as a valve

On my Homebridge Docker, I use native plugins for:
    Balboa Spa
    Nest
    Ring
    Yamaha Receiver

I also use Cmd4 that allows Homebridge to control virtual devices. This CMD4 connects to Indigo via api url for:
My Samsung Televisions (to turn on, it calls an Indigo virtual device that triggers a scene on my receiver to turn on the Tv via HDMI CEC)
For on/off, it just hits the Indigo api and frees for isOn : True
to turn off, it calls a scene on Indigo to trigger the Samsung plugin off command
HomeKit allows me to control input source on the TV; which is actually done in my house via my Yamaha Receiver, so I have the script connect to my Yamaha Receiver directly for input source control for the TV. This is nice in that HomeKit shows a single virtual TV device merging two physical devices.

This is also nice in that it shows up as an actual TV device in HomeKit; was not able to do that in projecting my TV from Indigo Homebridge buddy.

I have also been playing with Home Assistant (lots of options, but Indigo is MUCH more refined :)) and use it to send my Garage Door and Cameras (Security Spy) and SenseMe fans and a Samsung TV not connected to a Yamaha Receiver.

In Summary -- My Z-wave devices are all managed by Indigo and it would be good to support those (locks, multi-sensors, and valve in my case, and of course switches). Additional device types would be nice as well, but for MVP the devices I can't get elsewhere are those. I thought my Rachio sprinkler (Saw this mentioned here) natively supports HomeKit. But I have that off at the moment (another week or two before I need to start watering, and didn't see the need to have sprinkler control in HomeKit).

Posted on
Mon Apr 18, 2022 3:18 am
GlennNZ offline
User avatar
Posts: 1565
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: HomeKit Bridge Replacement = Priorities?

Ok.

Teaser of HomeKit Spawn... I'm sure some wondered what has been happening...

Yeah - pretty stuck with name... it does spawn a whole lot of new Homekit devices.. hence the name.

Image

Getting there supporting devices...
Also have supported multiple, well really unlimited bridges... via HomeKit Spawn Device Bridges - create and away you go.
Each device is able to be independently stopped/started as is needed when new devices added.
Took a while to sort out given the asyncio nature, and threads (not the easiest combo) and probably not much advantage of multiple versus one or 2, except for setup and deletion/redoing..

Supports deleting accessories, readding etc.. all seemingly going well and haven't lost a bridge now for a number of versions...
(Homekit had a nasty habit of getting upset - limited testing but seems robust)

Image

And finally adding new bridges - super easy - just create new bridge, select devices, save -- this will restart the Bridge.

Then go back into device and click Show QR Code - and viola! a QR code in web brower.
Easy to Scan in HomeKit app and couldn't be easier.

(Pincode - is also there in device states if needed - but QR code much quicker.)

Image

So far, so good - have 140 devices running across 8 bridges in development system,
Running on main system production now and CPU heads up to 1-5% if app open and downloading camera stream (cameras are relatively high CPU users) - if no cameras CPU under 0.5% or so.

Fun stuff is largely over, just the documentation (yuck) - "pretty straight forward he says..." and fine tuning & bug fixing+++ - won't be long for Beta...
Still need to add new support for new devices/and finalizing ongoing support for current devices -- few big devices (Windows covering and security system..) missing -- but that is far more tedious... but still depends now on how much time I have left (bit chunk over) and how far away Indigo 2022.1 is....

:D

Glenn

Posted on
Wed Apr 20, 2022 3:36 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: HomeKit Bridge Replacement = Priorities?

Great work Glenn! Outta interest is this using a newer release of homebridge?


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Wed Apr 20, 2022 4:11 pm
GlennNZ offline
User avatar
Posts: 1565
Joined: Dec 07, 2014
Location: Central Coast, Australia

HomeKit Bridge Replacement = Priorities?

durosity wrote:
Great work Glenn! Outta interest is this using a newer release of homebridge?


Sent from my iPhone using Tapatalk Pro
It actually doesn’t use homebridge at all.

No potentially problematic, external homebridge node thingy running. It is all python based and all within indigo. (With the exception of ffmpeg for camera streams - which in itself given binary nature is problematic)

Has big advances - updates with indigo well, can stop/start without major problems, and any device issues can log. I have added substantial logging options - including capturing any individual device to log in detail, to find tune any support down the track

Glenn


Sent from my iPad using Tapatalk

Posted on
Wed Apr 20, 2022 9:54 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: HomeKit Bridge Replacement = Priorities?

Interesting! I look forward to trying it out!


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Thu Apr 21, 2022 1:15 am
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: HomeKit Bridge Replacement = Priorities?

Likewise.

Posted on
Thu Apr 21, 2022 2:48 pm
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Re: HomeKit Bridge Replacement = Priorities?

Sounds promising. If not Homebridge, is this plugin moving toward Matter?

Posted on
Thu Apr 21, 2022 3:06 pm
GlennNZ offline
User avatar
Posts: 1565
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: HomeKit Bridge Replacement = Priorities?

7rdr7 wrote:
Sounds promising. If not Homebridge, is this plugin moving toward Matter?

No its still homebridge - just not “homebridge” the external running server app that is common and was the basis for the previous plugin. (The one runnning on node.js).

This uses a python 3 library to create a homebridge server all by itself.

Matter - seems interesting, well the words about it do, as anything tangible has been delayed and delayed..


Sent from my iPad using Tapatalk

Posted on
Thu Apr 21, 2022 3:37 pm
dduff617 offline
Posts: 661
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: HomeKit Bridge Replacement = Priorities?

Does that mean it be possible to run other HomeBridge plugins in the same server?

I ask because I have a few devices in my house that I'd like to be able to integrate with HomeKit and for which I understand HomeBridge plugins exist. These include a Ring doorbell and some Nest thermostats and Nest Protect smoke/CO detectors (which were at one time supported by a wonderful Indigo plugin, but fell out of support a few years ago).

Posted on
Thu Apr 21, 2022 3:49 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: HomeKit Bridge Replacement = Priorities?

dduff617 wrote:
Does that mean it be possible to run other HomeBridge plugins in the same server?

I ask because I have a few devices in my house that I'd like to be able to integrate with HomeKit and for which I understand HomeBridge plugins exist. These include a Ring doorbell and some Nest thermostats and Nest Protect smoke/CO detectors (which were at one time supported by a wonderful Indigo plugin, but fell out of support a few years ago).


I run the Run and Nest Homebridge plugins in a home bridge docker container on my NAS. Worst case you could run these in docker on your Mac with a separate IP; though pretty sure Homebridge allows you to change the port so should be able to avoid port conflicts if using the same IP w/o docker.

Who is online

Users browsing this forum: No registered users and 3 guests