HomeKitLink shuts down after power cut

Posted on
Wed Aug 16, 2023 3:32 am
CliveS offline
Posts: 771
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

HomeKitLink shuts down after power cut

Glenn, I am having problems with short power outages and slowly working out a way to restart all plugins that fail to restart properly due to lack of internal and external IP’s.
The HomeKitLink plugin is one that I cannot restart as it crashes when loading and I end up with a red spot instead of green which means that it will not respond to a reload request and has to be manually started.
Is there a way to restart the plugin after a set time instead of just closing it?

Code: Select all
2023-08-15 13:48:57.686   Application   Loading plugin "HomeKitLink Siri 0.6.16" using API v3.2
2023-08-15 13:48:57.690   Application   Starting plugin "HomeKitLink Siri 0.6.16" (pid 685)
2023-08-15 13:48:58.698   HomeKitLink Siri Error   Error in plugin execution InitializeMain:

  File "plugin.py", line 61, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/HomeKitDevices.py", line 34, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/HKConstants.py", line 63, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/pyhap/util.py", line 63, in get_local_address
type: local variable 'addr' referenced before assignment

Code: Select all
  HomeKitLink Siri               
   HomeKitLink Siri                ================================================ Initializing New Plugin Session =================================================
   HomeKitLink Siri                Plugin name:                   HomeKitLink Siri
   HomeKitLink Siri                Plugin version:                0.6.16
   HomeKitLink Siri                Plugin ID:                     com.GlennNZ.indigoplugin.HomeKitLink-Siri
   HomeKitLink Siri                Indigo version:                2022.2.2
   HomeKitLink Siri                Python version:                3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)]
   HomeKitLink Siri                Python Directory:              /Library/Frameworks/Python.framework/Versions/3.10
   HomeKitLink Siri               
   HomeKitLink Siri                ================================================== End Initializing New Plugin  ==================================================

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Wed Aug 16, 2023 3:55 am
GlennNZ offline
User avatar
Posts: 1574
Joined: Dec 07, 2014
Location: Central Coast, Australia

HomeKitLink shuts down after power cut

I can have a look at the error

It is a pretty low level library error as it seems that no network exists.

Often a exception and error as currently the case is best option otherwise will never be caught or seen:

But will have a look,

Try 0.6.17
Catches this particular error, but will be another subsequent error given no network so not completely sure will help....

(Hard for me to test downstream errors, as all my OSX devices are headless, including development Mac Mini. So if I disable network - I’m a bit stuffed! - as I remotes into it)

Glenn


Sent from my iPhone using Tapatalk
Last edited by GlennNZ on Wed Aug 16, 2023 10:43 pm, edited 1 time in total.

Posted on
Wed Aug 16, 2023 8:27 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: HomeKitLink shuts down after power cut

I have a trigger setup based on the online sensor plugin that restarts certain plugins when power is restored after a particular device stopped responding. Maybe that could also help?


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Wed Aug 16, 2023 9:07 am
CliveS offline
Posts: 771
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: HomeKitLink shuts down after power cut

durosity wrote:
I have a trigger setup based on the online sensor plugin that restarts certain plugins when power is restored after a particular device stopped responding. Maybe that could also help?
Sent from my iPhone using Tapatalk Pro

I am using the Indigo error
Code: Select all
Error   Unable to connect to IndigoDomo.com.

which I have only seen when I get the power blips and that then runs a 15 minute delayed execute action group that restarts all the plugins that I have seen fail in the logs.

They also run individually as they error at the Indigo restart which clears up most but not all, so the final delayed action runs after the time it takes to get the network back up.

At present the only one I can't restart is HomeKitLink as it shuts down but hopefully Glenn will sort that as HomeKitLink is in my must have plugins.

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Thu Aug 17, 2023 8:29 pm
GlennNZ offline
User avatar
Posts: 1574
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: HomeKitLink shuts down after power cut

CliveS wrote:
Glenn will sort that as HomeKitLink is in my must have plugins.


Hi Clive
You might have missed it - but try latest version as a post above.
Catches this particularly error, but will be others - but hopefully restartable from...

Glenn

Posted on
Fri Aug 18, 2023 6:05 am
CliveS offline
Posts: 771
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: HomeKitLink shuts down after power cut

GlennNZ wrote:
You might have missed it - but try latest version as a post above.

Yes I did as I didn't get notification of the edit you made as I had already read the original.

GlennNZ wrote:
Catches this particularly error, but will be others - but hopefully restartable from...

Yes more errors but only the ones stating the error

HomeKitLink Siri Error (util.py: Function: get_local_address line: 58): Error : Message : Error Getting local address IP address. See debug log for more details.
HomeKitLink Siri Error (util.py: Function: get_local_address line: 59): Error : Message : This is a breaking issue which until fixed will cause no connection to be possible.
HomeKitLink Siri Error (util.py: Function: get_local_address line: 61): Error : Message : Try setting Interface for HAP in advanced options, Home Server Options:Interface setting
HomeKitLink Siri Error (util.py: Function: get_local_address line: 58): Error : Message : Error Getting local address IP address. See debug log for more details.
HomeKitLink Siri Error (util.py: Function: get_local_address line: 59): Error : Message : This is a breaking issue which until fixed will cause no connection to be possible.
HomeKitLink Siri Error (util.py: Function: get_local_address line: 61): Error : Message : Try setting Interface for HAP in advanced options, Home Server Options:Interface setting


Which allows me to use 'Error Getting local address IP address. See debug log for more details' as the trigger to restart the plugin every minute until all the IP's are back up and running

Thanks Glenn
.

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Fri Aug 18, 2023 6:09 am
GlennNZ offline
User avatar
Posts: 1574
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: HomeKitLink shuts down after power cut

I had the fix up within 10 minutes or so! Thought you might have missed it.


Sent from my iPad using Tapatalk

Posted on
Fri Aug 18, 2023 6:41 am
CliveS offline
Posts: 771
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: HomeKitLink shuts down after power cut

GlennNZ wrote:
I had the fix up within 10 minutes or so! Thought you might have missed it.


Sent from my iPad using Tapatalk


Yes I did because I read the message as soon as the email arrived and obviously before the edit arrived, I suppose that is a problem with editing messages but all is now up and running.

Just restarted my Mac Mini (headless) without the network cable, waited 5 minutes and then plugged into the network to look at the logs and all 4 plugins did eventually sort themselves out, reloading every minute until the trigger errors stopped, last thing to come back was the reflector just before the final reload after 15 minutes of all 4 plugins (belt and braces)

Thanks for sorting it out, I control Indigo now from Siri and Apple Home so HKL is an essential plugin for me.

Hopefully I am covered now for when Northern Powergrid in the UK has their next outage

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Fri Aug 18, 2023 8:13 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: HomeKitLink shuts down after power cut

CliveS wrote:
Hopefully I am covered now for when Northern Powergrid in the UK has their next outage


So probably in the next 72 hours ; )


Sent from my iPhone using Tapatalk Pro

Computer says no.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 8 guests