-
Notifications
You must be signed in to change notification settings - Fork 172
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
Power outage to tuya devices makes homebridge unresponsive due to excessive logging #130
Comments
Hi there, this is a known issue, and will be patched in the next release. I'm going to release it as part of V1.x instead of V2. |
not sure if this is related, but after i updated the plugin to the latest version, I'm getting thousands of log messages like: The plugin had been working perfectly up til then. Note that I have also updated Homebridge to the latest released version (I think 1.2.0) All my other plugins are working fine but i've had to remove all my Tuya accessories from the config. I'm on
|
If the original issue that @sasikiran reported is an "ECONNRESET storm" (see below) when powering on a Tuya accessory powered off more than about a minute ago, I experienced the same thing about a month ago while repurposing some outlet accessories and fixed it last week in my own copy of TuyaAccessory.js. I don't know if I've made the correct fixes. The ECONNRESET storm in the logs is about 50 or more message pairs per second like this:
It happens for me only if you leave the accessory powered off long enough to get an ERR_CONNECTION_TIMED_OUT. The sequence where it starts looks like this:
My TuyaAccessory.js still includes some DEBUG log messages, as I'm not convinced I've really fixed it, despite it working repeatedly. These are the changes I made, and the console.log DEBUG statements can all be deleted with no functional impact:
This is the commit comment explaining my changes:
|
@iRayanKhan apologies if this is being discussed elsewhere and has already been addressed, but can you take a look at the changes above and if it seems appropriate, incorporate this change? I'm having the same issue with the current version of the plugin. |
Try 1.2.0 |
This is still happening in v1.2 |
I finally got around to opening a PR for this. #197 |
Merged and fixed. |
Checklist
Describe the bug
If a tuya device on homebridge loses power / connectivity, homebridge becomes unresponsive and requires force restart.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It can log errors, but only periodically. It shouldn't make homebridge unresponsive due to excessive logging.
Screenshots
Couldn't take screenshots. Had to force reboot Raspberry Pi 4B with 4GB RAM. If this happens again, will take screenshots and update it here.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: