-
Notifications
You must be signed in to change notification settings - Fork 174
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
Outlet turns on then off #31
Comments
This has happened to me as well a few times, although I can't reproduce it with any consistency. If you're able to reproduce it, please provide the logs around the time it happens (start Homebridge in debug mode with I think it's probably a bug in TuyAPI, but not sure how to best track it down. Any suggestions are welcome. |
So I just ran into this issue and the only thing I can find in the log that relates to anything Tuya is
|
@AdmiralMichael it almost looks like Homebridge is asking for it to be switched on and off... What's the context of those log lines? Anything above or below? |
I just recently finished setting these up on my Homebridge and have discovered this same issue as well. I'm using 2 different variations of Tuya rebrands I got off Amazon ages ago. EDIT: Here's what the debug view spits out when I finish launching Homebridge and attempt to toggle one of the outlets EventedHTTPServer [::ffff:192.168.1.251] HTTP request: /characteristics +20s |
I am going to have to recheck my log. The one I found isn’t that detailed. Where did u find that logfile? What’s the file name? |
@AdmiralMichael you can get a detailed debug log with @skullthug looks like it's having trouble communicating with your device; is anything else trying to access it in the background (other scripts, devices, etc)? I've found that the app itself usually needs to be force-quit. |
I thought I did that. I will have to check and report back. |
@codetheweb I think you might be right. I had disabled the tuya plugin after my post due to the issue, but decided to try it again one more time last night, and found it was more reliable. I'm assuming because Smart Life was probably not fully loaded on my phone, like it was during the previous time, and maybe not competing for control? ¯_(ツ)_/¯ |
I just implemented this and I am getting the same issue sometimes. I've turned on logging and hopefully I can help. It only seems to happen after not using the device after awhile. Here is a log where 10.0.1.13 and 10.0.1.14 are both outlets told to turn off. 10.0.1.14 turned off as it should but 10.0.1.13 turned off and immediately turned back on. EventedHTTPServer [::ffff:10.0.1.3] HTTP request: /characteristics +5s |
Testing with the cli I can confirm that this is more than likely a tuya-api issue. I am going to debug when I can and see if I can't find it. |
Another observation I've noticed that might be helpful is that the wifi connection to the device will get reset when this bug happens. I also noticed that opening the Home app seems to cause devices to lose their wifi connection where the Smart Life app doesn't seem to. Another note, the Smart Life app seems to block homebridge if opened. |
I've noticed some devices losing the wifi connection as well. Unfortunately I use these outlets for Christmas decorations so I don't really use them right now, other then just sitting plugged in (so I dont have to remove from home bridge or see no response error) its harder for me to see the bug. I do have them part of a leave home scene and noticed some of the status LEDs turn off (no network connection) after its triggered. But I can't confirm it's doing the on/off bug. Just want to update on what I've noticed. |
I have a lot of similar issues with Homebridge and TuyaAPI. I am using the Tuya Powerstrips and they often reset when I turn ON/OFF things too quickly or sometimes just randomly. Found this closed issue, which looks related - codetheweb/tuyapi#84 For now I have just given up on Homekit support and will try to dig deeper, when I get the chance. |
My Koogek Smart Plug randomly turns off and then back on again (about three times a day). Sometimes when I leave it off it can turn on by random. Looks like a similar issue. |
I've been refactoring and slimming down TuyAPI in a branch here; hopefully this cleaner code will solve strange issues like this one. |
I've actually made a lot of head way as far as this issue goes by enabling persistent connections. I'm sure it's a bit hacky since I had to make a small change to the TuyaAPI code in the connect function changing this: Since doing that I've been running for days and haven't had any of the glitches show up on any device. |
(I'm copy/pasting this into every open issue and PR.) This plugin is now deprecated, as I don't have enough time to maintain it along with other TuyAPI related projects. Please use AMoo-Miki's homebridge-tuya-lan plugin instead. (Or, you can continue to use this plugin, but I will not be giving support or adding any new devices.) I'm sorry about this, but this plugin is taking a disproportionate amount of my time that I believe is better spent making TuyAPI more stable and adding more tools to the ecosystem. |
Problem is you have updated your repo more recently than AMoo has his. Looks like we're out of luck for Tuya devices. |
@9SL9 I recently updated the README with a link to a different project that's supposed to work well. You may want to try that instead. |
Closing; inactive thread. If you need support please re-open this issue. |
I just recently purchase some CE Smart outlets from Costco and learned they are just Tuya rebrands. They work well with this plugin except for one intermittent quirk.
Sometimes when triggered the outlet with turn on the immediately turn off. So far this happens when activated with the Home app or Siri.
I currently run Homebridge in a docker container on an Ubuntu host. The plugs are in a separate vlan but my friend has the same intermittent issue and he doesn't use vlan, same outlets though. He runs homebridge in a docker container on Raspbian. I have them setup with DHCP reservations and have entered the IP in the config.json file.
Not sure where to go from here.
The text was updated successfully, but these errors were encountered: