Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix retry logic "Unable to find Bond for IP Address" #229 #252

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

dxdc
Copy link
Contributor

@dxdc dxdc commented Nov 8, 2023

I had similar problems described in #229, which would resolve themselves after restarting HB.

I think it could be because, on initial startup, there are many services loading including homebridge, and a 1000 ms timeout may not have been sufficient -- especially on less powerful devices. But, when restarting it later, there was no issue.

The retry logic wasn't actually working because axiosRetry doesn't consider ECONNABORTED to be a retry, and shouldResetTimeout is also false by default.

It might also be helpful to increase the length of this timeout, or make it a parameter users can set.

@panzacoder
Copy link

Would you be willing to publish this to homebridge so others can easily try this out? Seems like this repo is not getting regular updates and PR reviews right now.

@panzacoder
Copy link

@aarons22 Are you still monitoring this project? If so I think this is a pretty common issue that could use a 👍

@dxdc
Copy link
Contributor Author

dxdc commented Nov 28, 2023

@panzacoder I'm not an active maintainer of this project, so I don't want to get into publishing npm packages on a temporary basis.

If you don't feel comfortable building this package from scratch, you can try this:

  • Find your homebridge-bond folder (e.g., /usr/lib/node_modules/homebridge-bond)
  • Navigate to the dist subfolder (e.g., /usr/lib/node_modules/homebridge-bond/dist)
  • Replace BondApi.js with the attached version. You can always back up that file first, if you like -- or just do a delete/uninstall if you want to revert to the package version later.

BondApi.js.zip

@aarons22
Copy link
Owner

@panzacoder thanks for tag. I'm not doing much with this right now, but happy to move this one along

@dxdc have you tested this locally?

@dxdc
Copy link
Contributor Author

dxdc commented Nov 28, 2023

hi @aarons22! yes.. and, it's been working for me. maybe publishing a beta version for others to test and gather feedback would be useful?

I think the retry logic in the plugin itself may not have been working as designed.

@aarons22 aarons22 merged commit c1aadfa into aarons22:main Nov 28, 2023
3 checks passed
@aarons22
Copy link
Owner

@panzacoder
Copy link

@aarons22 thanks for moving this along! I haven't done any extensive testing, but FWIW pulling this code in unblocked my setup, I have my HB running on reaally slim hardware so this timeout update was what I needed.

I'll update my local to 3.2.11-beta.1 and report back if I run into any bugs that seem related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants