Startup problem

Posted on
Sun May 26, 2019 1:50 am
berkinet offline
User avatar
Posts: 3307
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Startup problem

Normally, the HomeKit Bridge plugin runs just fine. However, if the computer restarts (like after power failure) the plugin will not load when Indigo restarts. Here is the log...
    24 May 2019 at 12:03:39
    Starting Indigo Server version 7.3.0 (Mac OS X 10.14.4)
    Loading attachments
    Loading database "/Library/Application Support/Perceptive Automation/Indigo 7.3/Databases/CasaMilagro.indiDb"

    Loading plugin "HomeKit Bridge 1.0.2"
    Starting plugin "HomeKit Bridge 1.0.2" (pid 952)
    HomeKit Bridge : Caching all HomeKit Bridge devices...
    Started plugin "HomeKit Bridge 1.0.2"
    HomeKit Bridge: Attempting to start 'Casa Milagro HomeKIt Server'
    HomeKit Bridge: HomeKit Bridge is running the latest version, no update needed
    HomeKit Bridge : HomeKit Bridge is loaded and ready to use

    24 May 2019 at 12:04:10
    Trigger: Start system Homebridge [=> This is where I start a separate Homebridge server instance outside of Indigo <=]

    24 May 2019 at 12:05:05
    HomeKit Bridge Error: HomeKit server 'Casa Milagro HomeKIt Server' could not be started, please check the service logs for more information,
    now issuing a forced shutdown of the service to be safe.

    If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder.
    Instructions at https://github.com/Colorado4Wheeler/Hom ... dge-folder

    HomeKit Bridge: Attempting to stop 'Casa Milagro HomeKIt Server'
    HomeKit Bridge Error: Exception in hkfactory.send_refresh_to_homebridge line 177: HTTPConnectionPool(host='127.0.0.1', port=8445): Max retries exceeded with url: /devices/26e8fd7a8c2bb0241b4dab16e16ff364204ede07fd2e6554e05e8094db17f330 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x105ef6750>: Failed to establish a new connection: [Errno 61] Connection refused',))
    CODE: r = requests.post(url, data=payload, headers=headers)

    HomeKit Bridge Error: Exception in hkfactory.send_refresh_to_homebridge line 177: HTTPConnectionPool(host='127.0.0.1', port=8445): Max retries exceeded with url: /devices/26e8fd7a8c2bb0241b4dab16e16ff364204ede07fd2e6554e05e8094db17f330 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x105ef6ad0>: Failed to establish a new connection: [Errno 61] Connection refused',))
    CODE: r = requests.post(url, data=payload, headers=headers)

    HomeKit Bridge Error: Exception in hkfactory.send_refresh_to_homebridge line 177: HTTPConnectionPool(host='127.0.0.1', port=8445): Max retries exceeded with url: /devices/26e8fd7a8c2bb0241b4dab16e16ff364204ede07fd2e6554e05e8094db17f330 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x105ef69d0>: Failed to establish a new connection: [Errno 61] Connection refused',))
    CODE: r = requests.post(url, data=payload, headers=headers)

    HomeKit Bridge Error: Exception in hkfactory.send_refresh_to_homebridge line 177: HTTPConnectionPool(host='127.0.0.1', port=8445): Max retries exceeded with url: /devices/26e8fd7a8c2bb0241b4dab16e16ff364204ede07fd2e6554e05e8094db17f330 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x105ef6a90>: Failed to establish a new connection: [Errno 61] Connection refused',))
    CODE: r = requests.post(url, data=payload, headers=headers)


    HomeKit Bridge: HomeKit server 'Casa Milagro HomeKIt Server' has been stopped

    24 May 2019 at 12:05:54
    HomeKit Bridge: Attempting to start 'Casa Milagro HomeKIt Server'

    24 May 2019 at 12:06:09 [=>At this point I manually restart the Plugin from Indigo <=]
    HomeKit Bridge: Server 'Casa Milagro HomeKIt Server' has successfully started, you can use your HomeKit apps or Siri for this accessory [=> And, now it is running <=]

It is interestingvthe plugin fails right after I start a separate instance of Homebridge out side of Indigo (I needed to run a Homebridge plugin that is not supported by the Indigo Homeit plugin). Note, I am using different server identification, etc for the other server and, once the Indigo plugin is restarted, everything works fine.

Any ideas?

Posted on
Sun May 26, 2019 6:23 am
FlyingDiver offline
Posts: 3208
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Startup problem

Have you tried putting a delay on the startup of the "outside" Homebridge, so that it doesn't start until the HKB devices are all running?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun May 26, 2019 7:50 am
berkinet offline
User avatar
Posts: 3307
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Startup problem

FlyingDiver wrote:
Have you tried putting a delay on the startup of the "outside" Homebridge, so that it doesn't start until the HKB devices are all running?

No. But that's worth a try. What is interesting is this does not happen if I kill and restart Indigo, only on initial startup after rebooting the computer.

Posted on
Mon Jun 03, 2019 8:12 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Startup problem

What Diver said is a legitimate way to address the problem. The issue is that you are trying to start up a server instance before the plugin has finished initializing and that means that the built in HTTP server cannot answer requests yet, so when you try to start an HKB server in this fashion it cannot talk to the plugin and throws that error.

What is the purpose of hand-starting the HKB server in this way rather than just letting the plugin auto start your servers for you?

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Mon Jun 03, 2019 8:29 am
berkinet offline
User avatar
Posts: 3307
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Startup problem

Colorado4Wheeler wrote:
What Diver said is a legitimate way to address the problem. [... ...] What is the purpose of hand-starting the HKB server in this way rather than just letting the plugin auto start your servers for you?

Yes. Adding the delay fixed the problem. I am using a separate HKB instance to run the HomeBridge Doorbird plugin.

Posted on
Mon Aug 12, 2019 12:41 pm
rehafer offline
Posts: 225
Joined: Feb 08, 2013

Re: Startup problem

I’m having a similar problem with auto restart after a power failure. I’m using an app called Delay Start to delay the starting of Indigo for 3 min which fixes most problems except I have to manually reload the KKB plugin to get the servers running. The reload always works the first try. (I have too much experience with power outages) Any ideas?



Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest