TP-Link Plugin v 0.9.9 / v1.0

Posted on
Tue Dec 27, 2022 12:40 pm
aaaha offline
Posts: 8
Joined: Jun 20, 2011

TP-Link KL110 not working

I am using TP-Link Plugin v0.9.9 with Indigo 2022.1.2. I just added a KL110 Smart Dimmable Bulb to my collection of TP-Link Smart Plugs.

The Smart Plugs work with this software configuration, but the Smart Dimmable Bulb does not. The bulb does work with the iOS Kasa App.

Any idea what I might be doing wrong?

Code: Select all
   TP-Link Devices                 (plugin.py:actionControlUniversal:473): Action: RequestStatus for device: Master Bedroom Left Bed Lamp.
   TP-Link Devices                 Device Info for: Master Bedroom Left Bed Lamp
   TP-Link Devices                     TPlink device type: tplinkSmartBulb
   TP-Link Devices                     TP Link model: KL110(US)
   TP-Link Devices                     IP address: 192.168.3.175
   TP-Link Devices                     MAC address: 54AF973C5500
   TP-Link Devices                     Device ID: 8012ECDD5F92607F74C28410601DA4931FA34C7A
   TP-Link Devices                     alias :
   TP-Link Devices                     description:
   TP-Link Devices                 (plugin.py:devOrPluginParm:209): for attribute devPoll, using [False, 'dev']
   TP-Link Devices                     Polling enabled: [False, 'dev']
   TP-Link Devices                 (plugin.py:devOrPluginParm:209): for attribute onPoll, using ['60', 'plugin']
   TP-Link Devices                       On state polling freq: ['60', 'plugin']
   TP-Link Devices                 (plugin.py:devOrPluginParm:209): for attribute offPoll, using ['60', 'plugin']
   TP-Link Devices                       Off state polling freq: ['60', 'plugin']
   TP-Link Devices                 (plugin.py:devOrPluginParm:209): for attribute WarnInterval, using [5, 'default']
   TP-Link Devices                       Poll Warning interval: [5, 'default']
   TP-Link Devices                 (plugin.py:devOrPluginParm:209): for attribute SlowDown, using [1, 'default']
   TP-Link Devices                       SlowDown [1, 'default'] seconds at each warning
   TP-Link Devices                 (plugin.py:devOrPluginParm:209): for attribute StopPoll, using [20, 'default']
   TP-Link Devices                       Shutdown after [20, 'default'] errors
   TP-Link Devices                 (tpl_polling.py:interupt:33): called for Master Bedroom Left Bed Lamp with action=status, state=None
   TP-Link Devices                     Device polling and states updated.
   TP-Link Devices                     current state: brightness=0
   TP-Link Devices                     Supports Color: False

Posted on
Tue Dec 27, 2022 12:50 pm
sumocomputers offline
Posts: 262
Joined: Jun 23, 2008

Re: TP-Link Plugin v 0.9.9 / v1.0

For those having issues or questions, I would recommend creating a GitHub Issue here:

https://github.com/jtburgess/indigo-TP-LInk/issues

My guess is the author has gotten busy with life and maybe he will take a look on GitHub...

Chris

Posted on
Wed Jan 11, 2023 12:28 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: TP-Link Plugin v 0.9.9 / v1.0

I am wondering if I should update the firmware on my KP125. I am on version 1.0.3.

I have several of these and they randomly disconnect from the network.

I don't think the device firmware matters.
There were problems with devices randomly not responding to polls, which would cause communications to be disabled.
This has now been solved with customizable polling parameters so that you can set how many failures before a disconnect
(or eliminate disconnects for all practical purposes with a very large number of failures required.

You can get the latest code from the head on GitHub, ... or ... I'll be creating a new release (1.0) Real Soon Now

-- John

Posted on
Sun Jan 15, 2023 11:47 am
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

announcingTP-Link Plugin v1.0.0

I just published v1.0.0 fixing all known bugs, and incorporating several new Devices.
(Thanks to everyone who tested and told me about those new devices).

Happy New Year to all!

Posted on
Sat Feb 04, 2023 2:44 pm
sumocomputers offline
Posts: 262
Joined: Jun 23, 2008

Problem with devices not updating (HS-110) on 1.0.0

I recently upgraded from the 0.9.9 plugin to the 1.0.0 plugin. Please see screen recording here demonstrating the problem:

https://www.icloud.com/sharedalbum/#B17G1CvrSvicEH

What I have noticed is that event though the devices haven't been disabled from within Indigo due to losing WiFi momentarily (I set the timeout very high), the device usage stats at some point become frozen, and no longer update. I know the devices have not become disabled due to WiFi or other issues because I have a check that runs every few seconds and alerts me right away.

Anyway, a simple disable/enable Indigo communication does the trick, but I am not sure how long it lasts before the problem comes back.

I do know that my washer and dryer that use the TP-Link HS-110s will work on Saturday when I do the disable/enable trick, but by the next Saturday, they are frozen again.

Posted on
Sun Feb 05, 2023 9:23 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: TP-Link Plugin v 0.9.9 / v1.0

Thanks for the report.
I won’t be able to check this out for a week or so.

Posted on
Mon Feb 06, 2023 4:25 pm
sumocomputers offline
Posts: 262
Joined: Jun 23, 2008

Re: TP-Link Plugin v 0.9.9 / v1.0

jtburgess wrote:
Thanks for the report.
I won’t be able to check this out for a week or so.


No worries. Not sure if there is a pattern, but in the meantime, I have a way with Grafana to tell how long the devices work before they stop updating.

Posted on
Sat May 06, 2023 8:57 am
pgershon offline
Posts: 499
Joined: Jul 10, 2004

Re: TP-Link Plugin v 0.9.9 / v1.0

I started getting frequent KeyError('system') errors yesterday. I'm not sure what happened. My log is cluttered with this for certain devices. Any ideas what might be going on. Some kind of WiFi issue perhaps?

Code: Select all
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #2 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #1 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #2 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #1 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #2 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #1 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #2 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #1 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #2 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #1 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #2 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #1 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices                 2 timeouts - Normal polling resuming for device guest Hall
   TP-Link Devices                 2 timeouts - Normal polling resuming for device TV Room Lights
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #2 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices                 7 timeouts - Normal polling resuming for device Kitchen Overhead #2 - S2 on/off
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Kitchen Overhead #1 - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices                 7 timeouts - Normal polling resuming for device Kitchen Overhead #1 - S2 on/off
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices                 3 timeouts - Normal polling resuming for device guest bedroom back
   TP-Link Devices Error           (tpl_relay_poll.py:run:339): Error attempting to update Living Room Hall - S2 on/off: KeyError('system'). Will try again in 1 seconds
   TP-Link Devices                 3 timeouts - Normal polling resuming for device guest bedroom front
   TP-Link Devices                 9 timeouts - Normal polling resuming for device Living Room Hall - S2 on/off
   Received INSTEON                "Thermostat-Boys Room" temperature changed to 68.0

Posted on
Mon May 22, 2023 12:10 pm
stanleykrasnow offline
Posts: 28
Joined: Dec 10, 2018

TP-Link Plugin v1.0.0

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message:
May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised
TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised
TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown)
TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.
TP-Link Devices Polling started for new device@192.168.4.54.

I tried modifying tplink_dimmer_plugin.py to add the devices, and reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

PS: running Indigo 2022.2 and v 1.0.0 of the TP Link plugin

Posted on
Wed Nov 15, 2023 3:53 pm
joeaug offline
Posts: 28
Joined: Apr 13, 2019

Re: TP-Link Plugin v 1.0.1.1

Hi John. I am running your updated plugin and am very appreciative of your efforts. I've had no problems with the new version and polling is really disabled! After running the plugin for several days, I did just get an odd problem thought. On only one of my TP link wall plugs (model HS103 V2) I just started getting an error:

Nov 15, 2023 at 4:45:51 PM
TP-Link Devices Error (plugin.py:actionControlDevice:413): send "Patio String Lights" "on"" failed with result "{"error": "TP-Link connection timeout"}"

This plug continues to work fine with the Kasa app and with Alexa, but Indigo has lost it. The Plug's IP address has not changed to my knowledge. Any idea what's going on here? Thanks!

Posted on
Wed Nov 15, 2023 3:57 pm
joeaug offline
Posts: 28
Joined: Apr 13, 2019

Re: TP-Link Plugin v 0.9.9 / v1.0

Let me update John, now another of my TP link Plugs are giving the same error :-(. It's the same model of plug the HS103

Posted on
Wed Nov 15, 2023 4:09 pm
joeaug offline
Posts: 28
Joined: Apr 13, 2019

Re: TP-Link Plugin v 1.0.1.1

Well, the two plugs changed their IP address and that explains it! So no problem with the plugin! I'll assign static IP addresses but it's obviously a TP link thing.

Posted on
Wed Jan 24, 2024 11:37 am
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Re: TP-Link Plugin v 0.9.9 / v1.0

jtburgess wrote:
Thanks for the report.
I won’t be able to check this out for a week or so.


I have this ongoing problem with my KASA/TP-LINK plug-in smart outlets, and hoped you would have ideas re: how I might address it. It seems like these devices end up in Indigo as *comm disabled*, possibly following a lapse in power or wifi availability. Its easy enough for me to go into the Indigo app and re-enable comm when I am at home, and this resolves the problem. Not so easy for me too manage when I'm out of town, and others in my home are stuck with devices that won't turn on.

I thought I might be able to run a script that iterates through the TP-LINK devices and re-enables comm for those devices. Any idea where I would begin on something like that?

Posted on
Wed Jan 24, 2024 12:39 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: TP-Link Plugin v 0.9.9 / v1.0

A better way to deal with devices getting disabled is to adjust the polling.
It becomes disabled after polling fails a certain number of times,
So you can increase the time between polls, or the number of polls, (or both),
Or even disable polling entirely— if it is always controlled by indigo.
That is, Alexa or Tether or some other app can’t turn it on/off without Indigo knowing about it.

Posted on
Wed Jan 24, 2024 12:53 pm
sumocomputers offline
Posts: 262
Joined: Jun 23, 2008

Re: TP-Link Plugin v 0.9.9 / v1.0

SearchCz wrote:
jtburgess wrote:
Thanks for the report.
I won’t be able to check this out for a week or so.


I have this ongoing problem with my KASA/TP-LINK plug-in smart outlets, and hoped you would have ideas re: how I might address it. It seems like these devices end up in Indigo as *comm disabled*, possibly following a lapse in power or wifi availability. Its easy enough for me to go into the Indigo app and re-enable comm when I am at home, and this resolves the problem. Not so easy for me too manage when I'm out of town, and others in my home are stuck with devices that won't turn on.

I thought I might be able to run a script that iterates through the TP-LINK devices and re-enables comm for those devices. Any idea where I would begin on something like that?


I was having issues with the plugin awhile back, so I had a Schedule to check say every 1 or 5 minutes to see if the device was disabled and update a variable from True to False, and if the variable became False, a Trigger to send me a message as well as re-enable the device, and a second Trigger to send me a message it was successfully re-enabled. It was also a good tool to see if the changes the author of the plugin made were working or tweaks to the settings I made were working (i.e. I never got any disabled messages for a couple weeks, I was good to go).

It was something like below:

Schedule to run Python Script

Code: Select all
tplink_device_1_enabled = indigo.devices[123456789].enabled
indigo.variable.updateValue(987654321, str(tplink_device_1_enabled))


Triggers & Actions using the UI-based dropdowns

Trigger 1
If variable above becomes False

Action(s)
Send me a message that it is disabled (Email, Pushover, etc.)
Re-enable device (the TP-Link plugin provides a special feature in the dropdown for this)

Trigger 2
If variable above becomes True

Action(s)
Send me a message that it was successfully re-enabled (Email, Pushover, etc.)

Chris

Who is online

Users browsing this forum: No registered users and 3 guests