Homebridge, LaunchAgents, and LaunchDaemons!

Thanks to Homebridge, I’ve forced a few non-Homekit devices in the house to play with the existing HomeKit devices in our house. Along the way, I followed nfarina’s advice to make a LaunchAgent for macOS Sierra, but I’m running macOS Sierra Server and I noticed Console.app->system.log keeps reporting the following errors

Feb 15 00:04:33 schwie com.apple.xpc.launchd[1] (com.homebridge.server): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Feb 15 00:04:43 schwie com.apple.xpc.launchd[1] (com.homebridge.server[62564]): Service could not initialize: 17C205: xpcproxy + 11572 [1522][1729AB5E-4591-3F1B-AC72-36700ABA4F74]: 0xd

I first installed HomeBridge a couple years ago, so nfarina’s instructions may be different from what I followed. I also perused these posts and decided I could try to fix the situation:

1. Unload the existing LaunchAgent you created as described by nfarina:

launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist

2. Move the LaunchAgent .plist you created for HomeBridge from the ~/Library/LaunchAgents folder to the /Library/LaunchDaemons folder.

3. Load the LaunchDaemon for HomeBridge with the following command in Terminal:

sudo launchctl load -wF /Library/LaunchDaemons/com.homebridge.server.plist

This seems to fix the problem for me, although step #3 causes system.log to spew out this message:

Feb 15 00:12:01 schwie com.apple.xpc.launchd[1] (com.homebridge.server): This service is defined to be constantly running and is inherently inefficient.

Console.app only reports this error message once, so I think I can live with my inherently inefficient situation for a little while.

Leave a Reply