Can't get Homebridge to auto-load

Posted on
Tue Sep 13, 2016 4:58 pm
petematheson offline
Posts: 847
Joined: Sep 14, 2014
Location: Southampton, UK

Can't get Homebridge to auto-load

Hiya,

Followed all the steps in your post on how to install / set up Homebridge.

When I run the launchctl command it loads, but no devices show in the HomeKit app.
If I try and re-launch the app it tells me it's already running.
If I stop the app, then manually fire up home kit then the devices report in fine.

There's no log file being created either so I can't see any errors anywhere?

Posted on
Wed Sep 14, 2016 6:52 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Can't get Homebridge to auto-load

On a complete side note to this Colorado4Wheeler hinted he was going to be writing a HomeBridge plugin for Indigo 7.. might be worth waiting for that since that cannot be long off? :D

Computer says no.

Posted on
Wed Sep 14, 2016 10:31 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Can't get Homebridge to auto-load

I'm in the same boat. No errors, but no HomeBridge either.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Sep 15, 2016 12:13 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Can't get Homebridge to auto-load

petematheson wrote:
Hiya,

Followed all the steps in your post on how to install / set up Homebridge.

When I run the launchctl command it loads, but no devices show in the HomeKit app.
If I try and re-launch the app it tells me it's already running.
If I stop the app, then manually fire up home kit then the devices report in fine.

There's no log file being created either so I can't see any errors anywhere?


If you followed all of the installation instructions, then the log file should be in <your home directory> -> Library -> Logs -> homebridge.log

-Mike

Posted on
Thu Sep 15, 2016 6:31 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Can't get Homebridge to auto-load

isn't it a trick to separate the log entries from the working, manually run instance from the not-working, not running instance?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Sep 15, 2016 8:01 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Can't get Homebridge to auto-load

Different Computers wrote:
isn't it a trick to separate the log entries from the working, manually run instance from the not-working, not running instance?


Running manually puts the output in the Terminal window, not a log file.

Posted on
Thu Sep 15, 2016 5:53 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Can't get Homebridge to auto-load

Sooooo this is what my log says. (Apparently my mini has been running for 4+ months)

Code: Select all
[6/5/2016, 11:17:20 AM] Loaded plugin: homebridge-indigo
[6/5/2016, 11:17:21 AM] Registering platform 'homebridge-indigo.Indigo'
[6/5/2016, 11:17:21 AM] ---
[6/5/2016, 11:17:21 AM] Loaded config.json with 0 accessories and 1 platforms.
[6/5/2016, 11:17:21 AM] ---
[6/5/2016, 11:17:21 AM] Loading 1 platforms...
[6/5/2016, 11:17:21 AM] [Two Dog Hill] Initializing Indigo platform...
[6/5/2016, 11:17:21 AM] [Two Dog Hill] Indigo base URL is http://127.0.0.1:8176
[6/5/2016, 11:17:21 AM] [Two Dog Hill] Indigo request: http://127.0.0.1:8176/devices.json/
[6/5/2016, 11:17:21 AM] Loading 0 accessories...
[6/5/2016, 11:17:21 AM] [Two Dog Hill] Indigo request: http://127.0.0.1:8176/devices/Almanac.json

many many many skipped entries....
and it ends with
Code: Select all
[6/5/2016, 11:17:22 AM] [Two Dog Hill] Discovered WUnderground Ten Day Forecast (ID 821705499): Forecast Ten Day
[6/5/2016, 11:17:22 AM] [Two Dog Hill] Ignoring excluded ID 821705499


I note that this looks very different from when I run it manually, where it ends with

Code: Select all
[9/15/2016, 7:51:28 PM] [Two Dog Hill] Initializing platform accessory '⭐️⭐️'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 0#1-##-###│     
    └────────────┘     
                       
[9/15/2016, 7:51:28 PM] Homebridge is running on port 51826.


(code obfuscated with ##'s)

No errors.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Sep 15, 2016 6:21 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Can't get Homebridge to auto-load

OK, I'm a rusty UNIX idiot. Should have tried tail instead of more.

I restarted, and then checked homebridge.log all the way to the end and I got this, inexplicably:
Code: Select all
[6/5/2016, 10:45:26 PM] [Two Dog Hill] Bedroom Lights: executeAction(false)
[6/5/2016, 10:47:40 PM] Got SIGINT, shutting down Homebridge...


So, seems like something is making the SIGINT happen, because I'm not sitting here pressing CTRL-C!

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Sep 15, 2016 7:19 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Can't get Homebridge to auto-load

Different Computers wrote:
OK, I'm a rusty UNIX idiot. Should have tried tail instead of more.

I restarted, and then checked homebridge.log all the way to the end and I got this, inexplicably:
Code: Select all
[6/5/2016, 10:45:26 PM] [Two Dog Hill] Bedroom Lights: executeAction(false)
[6/5/2016, 10:47:40 PM] Got SIGINT, shutting down Homebridge...


So, seems like something is making the SIGINT happen, because I'm not sitting here pressing CTRL-C!


Go ahead and PM me the entire log file and I'll see if there's any other clues in there.

Posted on
Thu Sep 15, 2016 9:35 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Can't get Homebridge to auto-load

Just noticed that after the restart, the log is not updating. Last entry still dated back in June.

So it appears that something in launchctl isn't right. I'll revisit that.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Sep 15, 2016 9:36 pm
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Can't get Homebridge to auto-load

Different Computers wrote:
Just noticed that after the restart, the log is not updating. Last entry still dated back in June.

So it appears that something in launchctl isn't right. I'll revisit that.


You can also check Console to see if there are any errors there right after you do the launchctl command.

Posted on
Fri Sep 16, 2016 7:51 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Can't get Homebridge to auto-load

It just gets stranger.

tail on the log, still lists 6/5 as the last date it ran, with a SIGINT to end.

But launchctl load -w ~/Library/LaunchAgents/com.webdeck.homebridge.plist gave me "already running".

I unloaded it, no error. reloaded it, no error.

But the log doesn't update.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri Sep 16, 2016 8:12 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Can't get Homebridge to auto-load

man, I must have been drinking when I tried to make this run at startup.

the launchctl plist still had USERNAME for the user name.

Fixed that.

Still doesn't seem to start up the shell script when I make launchctl load it.. But when I start the shell script manually, now I get

Code: Select all
[9/16/2016, 10:06:22 AM] Homebridge is running on port 51826.
[9/16/2016, 10:07:54 AM] Got SIGINT, shutting down Homebridge...


So it looks like two problems:
1. launchctl still isn't finding the script
2. the script runs, but something sends a SIGINT and shuts the process down as soon as it finishes starting up.

I'll pound on the first problem, but I have no idea how to troubleshoot the latter. And keep in mind, again, HomeBridge runs just fine when I start it in a terminal window!


So for problem 1, should this line in the launchctl plist

Code: Select all
    <string>/Users/USERNAME/runhomebridge</string>

actually be
Code: Select all
    <string>/Users/USERNAME/runhomebridge.sh</string>

?
Because it seems like it's referring to the shell script by file name, and its name is runhomebridge.sh.
Last edited by Different Computers on Fri Sep 16, 2016 8:20 am, edited 1 time in total.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri Sep 16, 2016 8:16 am
webdeck offline
Posts: 436
Joined: May 07, 2005

Re: Can't get Homebridge to auto-load

Feel free to pm me the script and launch plist and I can take a look.

Posted on
Thu Oct 13, 2016 2:19 am
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Can't get Homebridge to auto-load

Is this solved in any way? I am having a similar issue, running home bridge -D from terminal loads devices, but using the load procedure does not.
I am keeping a window open by now
Thanks,
Ramiro

Who is online

Users browsing this forum: No registered users and 5 guests

cron