Page 4 of 4

Re: TP-Link Plugin v 0.9.3

PostPosted: Sun Jun 05, 2022 3:32 pm
by sumocomputers
FYI - finally got a chance to run the plug-in against 2 of my TP-Link devices that monitor our washer and dryer and do a bunch of complicated logic on precise watt draw numbers.

Ran a few loads and everything worked like a charm, as soon as I converted the very long decimal to whole numbers.

Thank you very much jtburgess for fixing this so quickly!

Chris

Re: TP-Link Plugin v 0.9.3

PostPosted: Mon Dec 19, 2022 11:27 pm
by KevinHRea
Hi,

Any reason this plugin won't support the tp-link EP-40 smart plug?

Thanks,

Kevin

Re: TP-Link Plugin v 0.9.3

PostPosted: Wed Dec 21, 2022 1:44 pm
by jtburgess
If it works with the Kasa app, it should work here .
But they keep coming up with new devices, and I can’t keep up. :(

Start with the readme https://www.indigodomo.com/pluginstore/188/.
This should help figure out with subtype you device is.
Then you can go to the plug-in itself and add your device to the list of known devices

In the finder, go to /Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins
And then right click on TP-Link-Device and select show package contents. Then go to the subdirectory Contents/Server Plugin.
[ Or in rerminal go directly to /Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/Contents/Server Plugin. ]

You’ll see a bunch of python source files. Of interest are the three tplink_*_plugin.py files.
Edit the one that corresponds to your device type, and add the new device to the *Models list.

Reload the plug-in and now see if you can add it.
If it complains, try the other device types.

Let me know which subType you added it to, so I can update the base code.

Good luck, and Happy Holidays,
John

Re: TP-Link Plugin v 0.9.3

PostPosted: Thu Nov 09, 2023 7:50 am
by joeaug
After giving up on the TP Link plugin some time ago (because of the communication disabling behavior as noted before by others) I was thrilled to see an updated versions of the Plugin posted. I deleted all of my old devices, installed the new plugin and things were working again - but then I noticed a problem...

When I experimented with unplugging an HS 103 plug, after a while communication with the plug would be deactivated. When I inspected the logs I would see a series of messages that said: "5 consecutive polling errors..." then "10 consecutive polling errors...", then Finally "15 consecutive polling errors...polling stopped for (device)". and after that communication with the device was deactivated by the plugin.

This is really strange because I specifically disabled polling at both the device and the plugin level. What is doing the polling now?

I'm running Indigo 2023.1 (the latest system) and the most recent TP Link plugin (1.0) on MacOS High Sierra.

Again, what's causing the polling and would this behavior be made better if I enabled polling and set the timeout to be some ridiculously high value of missed events? Is it maybe something specific with the HS-103?

I'm sure that, in my case previously, what would happen was that a power outage would cause these plugs to be down and then the plugin would deactivate communication with them. Couldn't this deactivation "feature" be optionally eliminated altogether?

Thanks for any help!

Re: TP-Link Plugin v 0.9.3

PostPosted: Thu Nov 09, 2023 7:56 am
by jtburgess
you're right. If you disabled polling, you shouldn't see that behavior.
I'll check it out. Stay tuned.

-- John

Re: TP-Link Plugin v 0.9.3

PostPosted: Mon Nov 13, 2023 10:55 am
by joeaug
Your changes to polling seem to have really done the trick! Your updated code has been running fine for days now with zero errors, even when I unplug a TP Link device for some time and then plug it back in. Thanks!

Re: TP-Link Plugin v 0.9.3

PostPosted: Mon Nov 13, 2023 1:24 pm
by jtburgess
Thanks. I’ll make an indigo install package,
FYI. It will be 1.0.1 because indigo doesn’t allow 4 numbers. Just know it is exactly what you have except for the extra “.1”.

Thanks for testing!

— John