Skip to content

Homekit controller reconnect#17060

Merged
balloob merged 3 commits intohome-assistant:devfrom
emlove:homekit-controller-reconnect
Oct 4, 2018
Merged

Homekit controller reconnect#17060
balloob merged 3 commits intohome-assistant:devfrom
emlove:homekit-controller-reconnect

Conversation

@emlove
Copy link
Copy Markdown
Contributor

@emlove emlove commented Oct 2, 2018

Description:

This PR updates the homekit controller component so that it attempts to reconnect when the connection to a device is lost. This allows the component to recover after an intermittent network issue.

I've also added a threaded call_later helper, since that variant seemed to be missing. I can split that commit to a separate PR if necessary, or I can remove it if I'm overlooking some reason we don't need this.

_LOGGER.info(
"Failed to connect to HomeKit device. Retrying in %d seconds.",
RETRY_INTERVAL, exc_info=ex)
call_later(self.hass, RETRY_INTERVAL, lambda _: self.accessory_setup())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (83 > 79 characters)

@balloob
Copy link
Copy Markdown
Member

balloob commented Oct 2, 2018

👍 on threaded call later. Didn't add it originally because no reason to add anything if it's not needed

@balloob
Copy link
Copy Markdown
Member

balloob commented Oct 2, 2018

CC @cdce8p

Copy link
Copy Markdown
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that is in a way that is not going bad for devices and future calls. Also the logic is small.

@cdce8p
Copy link
Copy Markdown
Member

cdce8p commented Oct 2, 2018

CC @mjg59

@balloob
Copy link
Copy Markdown
Member

balloob commented Oct 2, 2018

Oops @cdce8p, wrong homekit component 😆

@mjg59
Copy link
Copy Markdown
Contributor

mjg59 commented Oct 4, 2018

Homekit commits look good to me

@balloob balloob merged commit 3abdf21 into home-assistant:dev Oct 4, 2018
@ghost ghost removed the in progress label Oct 4, 2018
@emlove emlove deleted the homekit-controller-reconnect branch October 4, 2018 21:33
@balloob balloob mentioned this pull request Oct 12, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants