Homebridge boot

Homebridge is working fine for me but it does not start at boot. Is it possible to create an automation rule to start homebridge after HA starts?

Thanks.

I have the same question

if you are using hass.io just click on the toggle and it will change from manual to auto

I know that!

But I want to do start an addon with an automation.

my answer was for @iMarkus he wants to start homebridge on boot
on your questions i do not know if it is posible

Iā€˜m sorry. You are right

Hi Kem, thanks for your answer.

I tried this but everytime I restart Home Assistant on hass.io Homebridge does not start. Meaning it switches back to

Boot manual

1 Like

I am also seeing the same thing, completely fresh install on pi 3. I have to manually go in and press start everytime its rebooted.

Here is the log file after boot up:

**> [fix-attrs.d] 20-dbus: exited 0.**
**> [fix-attrs.d] 30-avahi: applying... **
**> [fix-attrs.d] 30-avahi: exited 0.**
**> [fix-attrs.d] done.**
**> [cont-init.d] executing container initialization scripts...**
**> [cont-init.d] 00-banner.sh: executing... **
**> -----------------------------------------------------------**
**>  Hass.io Add-on: Homebridge v2.1.1**
**>  HomeKit support for your Home Assistant instance using Homebridge**
**>  From: Community Hass.io Add-ons**
**>  By: Franck Nijhof <[email protected]>**
**> -----------------------------------------------------------**
**> [cont-init.d] 00-banner.sh: exited 0.**
**> [cont-init.d] 01-log-level.sh: executing... **
**> Log level is set to INFO**
**> [cont-init.d] 01-log-level.sh: exited 0.**
**> [cont-init.d] 02-updates.sh: executing... **
**> INFO: You are running the latest version of this add-on**
**> [cont-init.d] 02-updates.sh: exited 0.**
**> [cont-init.d] 20-dbus.sh: executing... **
**> [cont-init.d] 20-dbus.sh: exited 0.**
**> [cont-init.d] 30-avahi.sh: executing... **
**> [cont-init.d] 30-avahi.sh: exited 0.**
**> [cont-init.d] 50-config.sh: executing... **
**> [cont-init.d] 50-config.sh: exited 0.**
**> [cont-init.d] 60-ipv6-hotfix.sh: executing... **
**> [cont-init.d] 60-ipv6-hotfix.sh: exited 0.**
**> [cont-init.d] 80-user-packages.sh: executing... **
**> [cont-init.d] 80-user-packages.sh: exited 0.**
**> [cont-init.d] 81-user-scripts.sh: executing... **
**> [cont-init.d] 81-user-scripts.sh: exited 0.**
**> [cont-init.d] 82-user-plugins.sh: executing... **
**> [cont-init.d] 82-user-plugins.sh: exited 0.**
**> [cont-init.d] done.**
**> [services.d] starting services**
**> starting version 3.2.2**
**> [services.d] done.**
**> Found user 'avahi' (UID 86) and group 'avahi' (GID 86).**
**> Successfully dropped root privileges.**
**> avahi-daemon 0.6.32 starting up.**
**> WARNING: No NSS support for mDNS detected, consider installing nss-mdns!**
**> Successfully called chroot().**
**> Successfully dropped remaining capabilities.**
**> No service file found in /etc/avahi/services.**
**> *** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. *****
**> *** WARNING: Detected another IPv6 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. *****
**> Joining mDNS multicast group on interface hassio.IPv6 with address [removed for security].**
**> New relevant interface hassio.IPv6 for mDNS.**
**> Joining mDNS multicast group on interface hassio.IPv4 with address [removed for security].**
**> New relevant interface hassio.IPv4 for mDNS.**
**> Joining mDNS multicast group on interface eth0.IPv6 with address [removed for security].**
**> New relevant interface eth0.IPv6 for mDNS.**
**> Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.77.**
**> New relevant interface eth0.IPv4 for mDNS.**
**> Network interface enumeration completed.**
**> Registering new address record for [removed for security] on hassio.*.**
**> Registering new address record for [removed for security] on hassio.*.**
**> Registering new address record for [removed for security] on eth0.*.**
**> Registering new address record for [removed for security] on eth0.*.**
**> Server startup complete. Host name is hassio.local. Local service cookie is 2165809362.**
**> *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.**
**> *** WARNING *** Please fix your application to use the native API of Avahi!**
**> *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>**
**> *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.**
**> *** WARNING *** Please fix your application to use the native API of Avahi!**
**> *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>**
**> [2017-11-12 12:39:57] Loaded plugin: homebridge-homeassistant**
**> [2017-11-12 12:39:57] Registering platform 'homebridge-homeassistant.HomeAssistant'**
**> [2017-11-12 12:39:57] ---**
**> [2017-11-12 12:39:57] Loaded config.json with 0 accessories and 1 platforms.**
**> [2017-11-12 12:39:57] ---**
**> [2017-11-12 12:39:57] Loading 1 platforms...**
**> [2017-11-12 12:39:57] [HomeAssistant] Initializing HomeAssistant platform...**
**> [2017-11-12 12:39:57] [HomeAssistant] Fetching HomeAssistant devices.**
**> [2017-11-12 12:39:57] Loading 0 accessories...**
**> undefined:1**
**> 502: Bad Gateway**
**>    ^**
**> SyntaxError: Unexpected token : in JSON at position 3**
**>     at JSON.parse (<anonymous>)**
**>     at Request.request [as _callback] (/usr/lib/node_modules/homebridge-homeassistant/index.js:101:38)**
**>     at Request.self.callback (/usr/lib/node_modules/homebridge-homeassistant/node_modules/request/request.js:186:22)**
**>     at emitTwo (events.js:125:13)**
**>     at Request.emit (events.js:213:7)**
**>     at Request.<anonymous> (/usr/lib/node_modules/homebridge-homeassistant/node_modules/request/request.js:1163:10)**
**>     at emitOne (events.js:115:13)**
**>     at Request.emit (events.js:210:7)**
**>     at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-homeassistant/node_modules/request/request.js:1085:12)**
**>     at Object.onceWrapper (events.js:314:30)**
**> /usr/bin/run.sh exited 1**
**> [cont-finish.d] executing container finish scripts...**
**> [cont-finish.d] done.**
**> [s6-finish] syncing disks.**
**> [s6-finish] sending all processes the TERM signal.**
**> Got SIGTERM, quitting.**

Then after I press start on the homebridge add-on everything seems to work fine (logs below)

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-homebridge: applying... 
[fix-attrs.d] 10-homebridge: exited 0.
[fix-attrs.d] 20-dbus: applying... 
[fix-attrs.d] 20-dbus: exited 0.
[fix-attrs.d] 30-avahi: applying... 
[fix-attrs.d] 30-avahi: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Homebridge v2.1.1
 HomeKit support for your Home Assistant instance using Homebridge
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 20-dbus.sh: executing... 
[cont-init.d] 20-dbus.sh: exited 0.
[cont-init.d] 30-avahi.sh: executing... 
[cont-init.d] 30-avahi.sh: exited 0.
[cont-init.d] 50-config.sh: executing... 
[cont-init.d] 50-config.sh: exited 0.
[cont-init.d] 60-ipv6-hotfix.sh: executing... 
[cont-init.d] 60-ipv6-hotfix.sh: exited 0.
[cont-init.d] 80-user-packages.sh: executing... 
[cont-init.d] 80-user-packages.sh: exited 0.
[cont-init.d] 81-user-scripts.sh: executing... 
[cont-init.d] 81-user-scripts.sh: exited 0.
[cont-init.d] 82-user-plugins.sh: executing... 
[cont-init.d] 82-user-plugins.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
starting version 3.2.2
[services.d] done.
Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
Successfully dropped root privileges.
avahi-daemon 0.6.32 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Successfully called chroot().
Successfully dropped remaining capabilities.
No service file found in /etc/avahi/services.
*** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
*** WARNING: Detected another IPv6 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
Joining mDNS multicast group on interface hassio.IPv6 with address [removed for security].
New relevant interface hassio.IPv6 for mDNS.
Joining mDNS multicast group on interface hassio.IPv4 with address [removed for security].
New relevant interface hassio.IPv4 for mDNS.
Joining mDNS multicast group on interface eth0.IPv6 with address [removed for security].
New relevant interface eth0.IPv6 for mDNS.
Joining mDNS multicast group on interface eth0.IPv4 with address [removed for security].
New relevant interface eth0.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for [removed for security] on hassio.*.
Registering new address record for [removed for security] on hassio.*.
Registering new address record for [removed for security] on eth0.*.
Registering new address record for [removed for security] on eth0.*.
Server startup complete. Host name is hassio.local. Local service cookie is 3348839066.
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
[2017-11-12 13:03:37] Loaded plugin: homebridge-homeassistant
[2017-11-12 13:03:37] Registering platform 'homebridge-homeassistant.HomeAssistant'
[2017-11-12 13:03:37] ---
[2017-11-12 13:03:37] Loaded config.json with 0 accessories and 1 platforms.
[2017-11-12 13:03:37] ---
[2017-11-12 13:03:37] Loading 1 platforms...
[2017-11-12 13:03:37] [HomeAssistant] Initializing HomeAssistant platform...
[2017-11-12 13:03:37] [HomeAssistant] Fetching HomeAssistant devices.
[2017-11-12 13:03:37] Loading 0 accessories...
[2017-11-12 13:03:37] [HomeAssistant] Initializing platform accessory 'FIBARO System FGRM222 Roller Shutter Controller 2 Level'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”     
    ā”‚ [removed for security] ā”‚     
    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜     
                       
[2017-11-12 13:03:38] Homebridge is running on port 51826.