Closed mikecreates86 closed 3 years ago
Ok after taking a video, it's happening at almost exactly 1 minute intervals. Not sure if that helps.
Thanks! Glad you like it.
In my experience, that's just what these devices do if you send them the payload. They turn on (or off) and then disconnect you.
I could rewrite the module so that it only opens a TCP connection long enough to send the payload, and then disconnect (or allow a disconnect). If you have a development environment, I can send you something to test on, or, you can wait until it's updated in the core at some point.
@mikecreates86 PR #2 should solve this issue for you. Test it out and let me know what you think.
So to be clear, if I update companion to the lates build I'll be able to test this for you? And with the new code, will it still be a 1 minute delay every time before the plugs will take another command? Not really an issue I guess but just curious.
No, it is not in the latest build, but you can set up a development environment for yourself and test it out. If it works, I'll merge it into the master branch of this module and then we can look into getting it included into the latest beta builds.
Yeah unfortunately I'm not really familiar with all of this as much as I think I need to be to do that.
I'm currently running everything on Companion Pi.
cd
to the Companion folder.cd lib
cd module
rm -r tplink-kasasmartplug
git clone -b tcp-rewrite --single-branch https://github.com/bitfocus/companion-module-tplink-kasasmartplug.git
mv companion-module-tplink-kasasmartplug tplink-kasasmartplug
Ok let me try
Ok currently stuck trying to cd to the Companion folder...sorry I don't know much about how Companion Pi is setup
Any luck?
Never figured out how to install it on Companion Pi remotely.
———— Mike Moore
Sent from my iPhone
On Oct 4, 2020, at 8:15 PM, Joseph Adams notifications@github.com wrote:
Any luck?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
I just tested and can confirm that PR #2 fixes the disconnect issue for me. 👍
What is PR #2?
On Oct 19, 2020, at 4:21 PM, Michael Allen notifications@github.com wrote:
I just tested and can confirm that PR #2 https://github.com/bitfocus/companion-module-tplink-kasasmartplug/pull/2 fixes the disconnect issue for me. 👍
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitfocus/companion-module-tplink-kasasmartplug/issues/1#issuecomment-712419523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPE4HMLKENJ7MLZIZO2VYLSLSNUJANCNFSM4R5AAD2Q.
@mikecreates86 That was the fix Joseph mentioned testing above. Now that it has been tested, the next step is for it to be merged so it can be included in a build. After that happens, you would be able to download a new version of Companion with the fix included.
I'll merge it now that you've tested it. :)
It's in the latest beta builds now.
This is awesome. Thank you so much for updating us!
On Oct 20, 2020, at 11:04 AM, Joseph Adams notifications@github.com wrote:
It's in the latest beta builds now.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitfocus/companion-module-tplink-kasasmartplug/issues/1#issuecomment-712919184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPE4HPYEOWPSIWA7BGGLPTSLWRHTANCNFSM4R5AAD2Q.
First of all, this is a lifesaver plugin because I was controlling my plugs via IFTTT until I just saw they are charging for that service now. Plus that traveled over the web and this is all local network so it's great overall.
However, on the latest build I'm finding that the instances disconnect frequently. I have six separate instances controlling six plugs and they all do it. Seems that especially after an on or off is triggered they go dead for a few seconds. Problem this causes is that that my Stream Deck ON and OFF buttons that control all 6 of these end up being sporadic. Sometimes they turn on all six. Other times just 2 or 3 because the remaining 2 or 3 are disconnected at the moment. Seems to just cycle disconnects as I watch my instances.
Any help or ideas here?