boston04and07

macrumors 68000
Original poster
May 13, 2008
1,594
574
Hello everyone...for the past few days I’ve been working on getting Homebridge to work with my home alarm system. After a lot of trial and error it seems as though I’ve got it up and running (fingers crossed at least!)

I’m running Homebridge on my always-on Mac mini, which I use as a headless file server. However, should the Mini lose power at some point, how do I make Homebridge automatically start again on its own when my Mac reboots? Is there a way to do this, or would I always need to start it again manually in Terminal?

Thanks in advance for any advice about this!
 
Last edited:

boston04and07

macrumors 68000
Original poster
May 13, 2008
1,594
574
Sorry for all the posts guys, but now I have another question...:rolleyes:

So the only other thing I have in my house right now that isn’t tied into homekit are my Nest smoke detectors. I’d ideally like to tie them in too, as I like the idea of being able to view their status in the Home app and having all my lights turn on should they go off. However, as it seems like I have a good thing going with my alarm system finally working, I’m kind of scared to mess with it. Is adding something to Homebridge as simple as downloading the plugin and editing the json file, or do I need to start from scratch again?

Thanks again everyone...
 

efp1

macrumors 6502
Oct 3, 2008
337
22
UK
All you have to do is install the plugin and then add the configuration to the config.json file, as you said. You just have to be careful when adding something new, cause a misplaced comma, for example, will screw up home ridge. You wouldn’t need to start from scratch though, just find and fix the error.

I have my nest protect on homebridge and it works flawlessly.
 
  • Like
Reactions: boston04and07

boston04and07

macrumors 68000
Original poster
May 13, 2008
1,594
574
@efp1, thank you for letting me know. I might try it tonight and see how it goes.

Just out of curiosity, are you running Homebridge on a Mac or something else? I have a few questions about specifically running Homebridge on a Mac but won’t bother you with them if you’re not doing that... :)
 

Hoek_NL

macrumors newbie
Jan 12, 2017
7
2
Almere Netherlands
@efp1, thank you for letting me know. I might try it tonight and see how it goes.

Just out of curiosity, are you running Homebridge on a Mac or something else? I have a few questions about specifically running Homebridge on a Mac but won’t bother you with them if you’re not doing that... :)


I have only yesterday installed Homebridge on my Mini after multiple attempts to get it installed on a RaspberryPi2 or RPi3 with NodeRed. My main purpose would be to connect to HomeKit and RETRIEVE HomeKit accessories data or control them via NodeRed automation, this because i can't find any WiFi enabled radiator valves i can talk to.
Homebridge got connected to HomeKit so that works ok, but have not had time to add accesories to config.json. I was thinking out loud if it's at all possible to add a homekit enabled device (in particular the Elgato EVE Thermo) in the config.json with all the particulars and then query Homekit thru homebridge for the EVE data........
Up to now all i've read about homebridge is that it emulates homekit and allows iOS control of non-homekit devices, so basically an emulator cq a one-way bridge.

@boston04and07 have a look at this for you hb running as a service on mac: https://github.com/nfarina/homebridge/issues/1177
 
  • Like
Reactions: boston04and07

shaneakus

macrumors member
Aug 18, 2010
36
27
Louisville
Hello everyone...for the past few days I’ve been working on getting Homebridge to work with my home alarm system. After a lot of trial and error it seems as though I’ve got it up and running (fingers crossed at least!)

I’m running Homebridge on my always-on Mac mini, which I use as a headless file server. However, should the Mini lose power at some point, how do I make Homebridge automatically start again on its own when my Mac reboots? Is there a way to do this, or would I always need to start it again manually in Terminal?

Thanks in advance for any advice about this!


l use an app called Lingon X to add start up processes. I created one call com.homebridge.server with the command line to execute homebridge set as /usr/local/bin/homebridge -I


i also use lingon to run scheduled applescripts. it's pretty handy.

Also, i had an issue with Homebridge where if the mac loses power or doesn't shut down gracefully, i'd have to re-add the homebridge device to homekit as all the accessories would got to a not responding state. to resolve that i marked the /users/username/.homebridge/cachedaccessories/cachedaccessories file and the ./users/username/.homebridge/persist/*.json files as read only.
 
Last edited:
  • Like
Reactions: boston04and07

haxrnick

macrumors 6502a
Aug 4, 2011
532
1,992
Seattle
@efp1, thank you for letting me know. I might try it tonight and see how it goes.

Just out of curiosity, are you running Homebridge on a Mac or something else? I have a few questions about specifically running Homebridge on a Mac but won’t bother you with them if you’re not doing that... :)
You can always use this site to test your code before saving and publishing.

https://jsonlint.com/
 

Otto Pilot

macrumors member
Jul 6, 2016
83
48
Yes, you can just add the plugin and the json code and you are good to go. I HIGHLY recommend the suggestion of validating the json code through jsonlint.com after making any changes. Small errors will really mess up the whole experience. I run homebridge on my mac, currently using the plugin for alarm.com and one to add my nestcam as a homekit camera. For automatic restart on launch, these are the instructions I used that work perfectly (as an aside for those better with terminal than I, is there a command to STOP homebridge if necessary??):

How to automatically start Homebridge with launchd
  • Create a launchd plist file for Homebridge in ~/Library/LaunchAgents
    • Example name com.homebridge.server.plist
  • Homebridge will now start automatically at boot and will restart if it crashes.

  • Run the following in a terminal to manually start Homebridge background process:
    • launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist
  • Run the following in a terminal to manually stop homebridge background process:

    • launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist
Does anyone know of a homebridge plugin to add the August doorbell cam as a homekit doorbell? I'm getting tired of waiting for official support, which they have continued to say is coming at some point.
 
  • Like
Reactions: boston04and07

boston04and07

macrumors 68000
Original poster
May 13, 2008
1,594
574
@efp1, @Hoek_NL, @shaneakus, @haxrnick, @Otto Pilot - thank you all very much for your help with this. It’s highly appreciated! I was able to get this work and now both my alarm.com panel and Nest smoke detectors are linked via Homebridge. It was my first foray into using Terminal for anything even remotely complex so I’m feeling pretty pleased with myself, haha. It definitely isn’t for the faint of heart if you’ve never done anything at this level before.

And I definitely agree - jsonlint was fantastic. I couldn’t figure out for the life of me what I was doing wrong when I tried to add Nest to the config but jsonlint found the issue immediately (an errant ellipses was the problem). Saved me a ton of frustration.

Anyway...I’m obviously very new to this, so I hope this question isn’t painfully obvious, but on the subject of getting Homebridge to launch automatically...how does one make a plist file? Do I just create a file with the name specified above, and if so, using what text editor, and is there anything I need to add within the file? Thanks in advance for answering my newbie questions :rolleyes:

Also...@Otto Pilot, I’m interested in how you got your Nest cam working. I primarily set up my Nest account for my smoke detectors as I haven’t used my Nest cam in a while (I switched to Logi Circles for the Homekit support this summer). I was planning to sell it, but once I got my smoke detectors working, I figured what the heck. Homekit saw the Nest cam but only recognized it as a motion sensor and not an actual camera. I followed these instructions to the letter so I’m not quite sure where I went wrong...
 

Otto Pilot

macrumors member
Jul 6, 2016
83
48
Yep, you just need to create a text file with that name and place it in the correct directory. It takes it from there and performs the necessary magic to keep you up and running.

As to the nest cam, this is a much more complicated process and you need to go outside the nest plugin...it involves running the ffmpeg plugin, and then getting the camera name from the stream from your camera on the nest webpage. This github page details the process and the json code for your config file: https://github.com/KraigM/homebridge-nest/issues/68

The only limitation to doing it this way is no sound in the home app. I am with you on moving over to Logi Circle 2s for future cameras...we used the nest cam as a baby monitor so I just played around with it to see if I could make it work.
 
  • Like
Reactions: boston04and07

boston04and07

macrumors 68000
Original poster
May 13, 2008
1,594
574
Yep, you just need to create a text file with that name and place it in the correct directory. It takes it from there and performs the necessary magic to keep you up and running.

As to the nest cam, this is a much more complicated process and you need to go outside the nest plugin...it involves running the ffmpeg plugin, and then getting the camera name from the stream from your camera on the nest webpage. This github page details the process and the json code for your config file: https://github.com/KraigM/homebridge-nest/issues/68

The only limitation to doing it this way is no sound in the home app. I am with you on moving over to Logi Circle 2s for future cameras...we used the nest cam as a baby monitor so I just played around with it to see if I could make it work.

That is great to know, and thanks again. I’ll try making the plist and see how it goes. So am I good to close the Terminal window when I do that?

As for the Nest cam, I think I might just leave well enough alone and continue to use my Logi Circles. So far my experience with them has been excellent. The picture is great (I have it set to the widest angle view and can see my entire room) and I haven’t had any connection issues. So far it’s been much more reliable than any of my bulbs or wall plugs. I definitely wouldn’t hesitate to get another if I needed it in the future.
 

efp1

macrumors 6502
Oct 3, 2008
337
22
UK
@boston04and07 Sorry, just noticed your replies!

I’m using a raspberry light zero w. I don’t need to run anything demanding (like ffmpeg for video), so the pi zero works great. To be honest, it’s almost identical to using a Mac. The configuration is nearly identical, I think.

Here’s my setup (attached photo)

650471E1-F5F0-4CE7-9E87-21985FF6F3BF.jpeg

At one point I did have ffmpeg running on a raspberry pi 3, and added the stream to HomeKit using homebridge. I stopped doing it because it wasn’t powerful enough. Had too many issues with freezing and low quality.

I’m now looking into getting a HomeKit compatible camera like the omna or circle 2. Haven’t decided which camera yet. Netatmo might get HomeKit compatibility soon so might wait for that?
 

questionmark32

macrumors regular
Sep 23, 2013
247
198
Thank you for this. I also have Frontpoint and I definitely will be trying all this out with Homebridge!

I'm extremely new to this, so does anyone have any links or a how-to on how to integrate Frontpoint (alarm.com) to Homebridge? This stuff seems fairly complicated, but I'm want to make this work.
[doublepost=1512048469][/doublepost]
Hello everyone...for the past few days I’ve been working on getting Homebridge to work with my home alarm system. After a lot of trial and error it seems as though I’ve got it up and running (fingers crossed at least!)

I’m running Homebridge on my always-on Mac mini, which I use as a headless file server. However, should the Mini lose power at some point, how do I make Homebridge automatically start again on its own when my Mac reboots? Is there a way to do this, or would I always need to start it again manually in Terminal?

Thanks in advance for any advice about this!


Can you send me any links to how you went about integrating Frontpoint with Homebridge?
 

Hoek_NL

macrumors newbie
Jan 12, 2017
7
2
Almere Netherlands
Sorry, i missed notifications on replies here. Homebridge is now fully configured and running in Mac mini, started via PM2, together with Node-Red. Quite pleased with PM2, it will try and restart Homebridge or Node-red on uncaught exceptions.

All items (Sonoff WiFi switches with Tasmota firmware, MQTT enabled) in the HB config are useable in Home(kit). Sensors show, switches are active and switchable. All fine.

But for Home(kit) to be useful will have to get me an AppleTV 4 to serve as Hub, not sure if i will, content in Europe is pretty bad, so not giving up on openHAB as HA system just yet.

Had to completely remove Homebridge after a config error messed it up, taking note that HomeKit is storing MAC addresses, so reinstalling devices in Homekit requires slightly modifying the MAC address in the config.json of HB...
 

nbwallace

macrumors member
Oct 18, 2011
58
6
Sorry for all the posts guys, but now I have another question...:rolleyes:

So the only other thing I have in my house right now that isn’t tied into homekit are my Nest smoke detectors. I’d ideally like to tie them in too, as I like the idea of being able to view their status in the Home app and having all my lights turn on should they go off. However, as it seems like I have a good thing going with my alarm system finally working, I’m kind of scared to mess with it. Is adding something to Homebridge as simple as downloading the plugin and editing the json file, or do I need to start from scratch again?

Thanks again everyone...
In my experience integrating nest is kind of a pain. If I remember correctly you need to get a developer account to get a security token. Upon reading the docs it doesn't seem so bad, maybe I'll try it again.

https://github.com/KraigM/homebridge-nest
 

bripab007

macrumors 6502a
Oct 12, 2009
529
26
In my experience integrating nest is kind of a pain. If I remember correctly you need to get a developer account to get a security token. Upon reading the docs it doesn't seem so bad, maybe I'll try it again.

https://github.com/KraigM/homebridge-nest

It's true that initially setting up the Nest Homebridge plugin is a bit of a pain, but not as involved as, say, setting up Homebridge in the first place.
 

questionmark32

macrumors regular
Sep 23, 2013
247
198
I’m hoping someone can lead me to a tutorial or send me their config.json when it comes to setting up alarm.com with Homebridge. I’m having a very difficult time trying to set this up. I have Frontpoint Security
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.