iRayanKhan / homebridge-tuya-platform

This plugin has moved. Check: https://github.com/iRayankhan/homebridge-tuya
Https://Twitter.com/iRayanKhan
MIT License
9 stars 1 forks source link

Device offline - constant polling #17

Open MikeDProducer opened 4 years ago

MikeDProducer commented 4 years ago

When a device is disconnected (if someone shuts off the power to a bulb) the plugin begins frantically trying to connect to it. The home bridge logs light up like a Christmas tree and it seems to really bog everything down.

The original plugin (homebridge-tuya-lan) seems to address this in the current @rc build. Could these changes be applied here?

I would prefer to use this plugin, being that you are still actively developing it.

iRayanKhan commented 4 years ago

The home bridge logs light up like a Christmas tree and it seems to really bog everything down.

Lol Christmas Tree, Yes I can apply these changes. I'm a bit behind on other issue so I can try to have a beta for this on Sunday at the latest. Or if it's a really small change I can do it tonight

MikeDProducer commented 4 years ago

Thank you!!!

and Merry Christmas!!! :-)

MikeDProducer commented 4 years ago

Happy new year :) haha. Any luck? I know that you are SUPER busy so I am not rushing you. I am just curious and stuck at home with a lot more time on my hands to mess with this stuff. lol

iRayanKhan commented 4 years ago

I am stuck at home too, wish I had the time as well 🤣. I will make a fork in the next day or so to see if this will work, my other plugin never really ran into this issue so this will be fun to try to implement. Do you know how to git clone by chance?

MikeDProducer commented 4 years ago

Not yet but I will sure as hell learn! haha Reading a tutorial now.

cawmit commented 4 years ago

I'm also seeing a lot of logs from this line: https://github.com/iRayanKhan/homebridge-tuya-platform/blob/c41651007a6362faf99a77ed86e7525d9ce45ad3/lib/TuyaDiscovery.js#L102 perhaps this is also fixed in the rc branch? Would be nice to see here too

iRayanKhan commented 4 years ago

Should I just make it configurable to show these logs or just get rid of it? I can see if I can make it when homebridge runs in debug mode it will show the messages.