-
Notifications
You must be signed in to change notification settings - Fork 20
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
plugin causing repeated restart of Homebridge #21
Comments
Having the same issue |
It's broken for everybody. Coway changed their authentication response. Logging in via the iOS app asks you to switch to a "new membership scheme." Trying to sort out what that authentication looks like, but they've foolishly assumed that they can verify an email with a 5m countdown timer, which is fundamentally incompatible with a popular anti-spam technique called greylisting. |
Looks like another plugin has already solved the change in authentication methods. Give https://github.com/RobertD502/home-assistant-iocare a try after migrating your account in the IOCare app. |
Thanks — but this looks like it's a plugin for something called Home Assistant. Is there a version for HomeBridge or a way to install a Home Assistant plugin so it works under HomeBridge? |
For Homebridge, the updated authentication method will have to be translated from Python to TypeScript. |
Well above my paygrade, unfortunately. |
I'm looking at it, but I'm not much of a TypeScript developer. |
Same issue here. Really a bummer! Hoping someone smarter than me can fix this. |
So it appears as said above the auth mechanism has changed as well as the URIs. Existing URIs: Changes made for the URIs in the py lib above: Changes to the auth method from the py lib above: py client: Existing ts client: Should be somewhat simple to re implement this in typescript, although im a python dev so I might be speaking out of ignorance. Ill see if I can get a rough POC working over the next few days. If someone happens to stumble across this before I get to it at least the python answer is easily found. |
I've pushed a pull request here: mroth#2 Matthew's fork has a bunch of clean-up changes that looked like a better place to base this work, but I'm hitting the limits of my experience with these languages/tools. There may be some more changes to how tokens are refreshed, but I've gotten the new authentication working and now it's failing in relatively boring parts of the code. If Matthew doesn't reply, any additional eyes are most welcome. |
As none of the prior contributors to this plugin have responded, I've gone ahead and published my changes on npm as @ohmantics/homebridge-airmega at version 3.3.0. Many thanks to @RobertD502 for his work on the new authentication scheme and @mroth for his work on cleaning up the plugin structure. |
You are a god. Installed and working great over here! |
Fantastic — working perfectly here too. Thank you so much! |
@ohmantics I'm glad to hear Cowayaio is helping other projects aside from the Home Assistant integration. Regarding token refreshes: |
Just stumbled on this...this was a minor nuisance in my homebridge, but glad to have it cleaned up now. Thanks! |
Since updating Homebridge to v1.5.1 on my Raspberry Pi, the homebridge-airmega plugin appears to be triggering a repeated restart:
[29/10/2022, 09:29:31] TypeError: Cannot read properties of null (reading '0')
at Authenticator. (/usr/local/lib/node_modules/homebridge-airmega/lib/Authenticator.ts:89:49)
at Generator.next ()
at fulfilled (/usr/local/lib/node_modules/homebridge-airmega/dist/lib/Authenticator.js:4:58)
[29/10/2022, 09:29:31] Got SIGTERM, shutting down Homebridge...
[29/10/2022, 09:29:31] [Harmony Remote] INFO - shutdown
[29/10/2022, 09:29:32] [Homebridge UI] Homebridge restart request received
Disabling the plugin eliminated the problem. (But I would like to start using it again!)
The text was updated successfully, but these errors were encountered: