Closed mrking closed 2 years ago
I can see this has been raised before #56.
Unfortunate the underlying library hasn't seen any updated since 2018.
Interestingly the error is still present with all the devices flagged with forceMiCloud? I haven't stepped through all the code yet to see where the entry point to connecting to the cloud is but thought miio library was strictly local? @merdok
I'll look further at this when I get some time.
Hi, Thanks for the info. Yeah it seems that the issue comes from the miio library and you are right, it was not updated for a long time. I am currently working on a bigger update where I remove the dependency to the miio and will write my own code for that, so maybe that will fix it.
The issue will also appear for mi cloud devices since I first check locally if the device is even responding, if it does not respond locally then there is no need to spam the mi cloud with requests.
Hi @merdok, Thanks for the reply.
I've worked around the issue on my forked and branch removing the connection check. https://github.com/mrking/homebridge-miot/tree/fix-connection-error-from-miio-library
Given you are already working on a major rewrite, I'll wait for the fix. Feel free to comment back and I'll happily retest the issue.
Yes, as soon as the update is ready I will comment here and you can retest it. It will probably just take quite some time till the update will be ready so please be patient🙂
Update 1.0.0 is now out which ditches the miio library, you can try it now.
I'll have a test of it this weekend if I get time. Thanks!
Adding more devices >20 is resulting an unhandled exception when grabbing device id. I've provided device ID in config however, it still appears to be looking the ID regardless. This causes homebridge to restart.
Removing the number devices fixes the problem for the ones that end up not being able to connect, but adding others back causes those to fail to connect.
Full Log: