TP-Link Plugin - How To (v0.1.2)

Posted on
Sat Oct 12, 2019 8:30 pm
arthurdaire offline
Posts: 5
Joined: Dec 07, 2016

TP-Link Plugin - How To (v0.8.1)

I have been using this plugin for a while to control a water feature in the hallway (on and off with movement in the hallway). It suddenly stopped working yesterday . the plug has a static IP address. I have reloaded it multiple times and restarted the server, but no luck.

Here is the log:

13 Oct 2019 at 10:27:40 am
Z-Wave received "motion sensor -Kitchen " status update is on
Trigger Start variable timer
Z-Wave received "Motion Sensor-Main entrance hallway " status update is on
Trigger Water feature on and off
Trigger motion in main hallway between 7 am and 6 pm
TP-Link Device (plugin.py:actionControlDimmerRelay:247): called with: actionValue : 0
configured : True
delayAmount : 900
description : turn on device
deviceAction : TurnOn
deviceId : 1382865271
replaceExisting : True
textToSpeak : for water feature plug.
TP-Link Device Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 250, in actionControlDimmerRelay
KeyError: key multiPlug not found in dict

Sent Hue Lights "Hallway lights" on to 100 at ramp rate 5.0 sec.
Sent Hue Lights "Hallway lights" on to 100 at ramp rate 5.0 sec.

13 Oct 2019 at 10:28:12 am
Z-Wave received "Motion Sensor-Bedroom lounge" status update is on

13 Oct 2019 at 10:28:30 am
TP-Link Device (plugin.py:actionControlDimmerRelay:247): called with: actionValue : 0
configured : True
delayAmount : 900
description : turn on device
deviceAction : TurnOn
deviceId : 1382865271
replaceExisting : True
textToSpeak : for water feature plug.
TP-Link Device Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 250, in actionControlDimmerRelay
KeyError: key multiPlug not found in dict

TP-Link Device (plugin.py:actionControlUniversal:333): Action: actionValue : 0
configured : True
delayAmount : 900
description : status request device
deviceAction : RequestStatus
deviceId : 1382865271
replaceExisting : True
textToSpeak : for device: water feature plug.
TP-Link Device (plugin.py:getInfo:316): Called for: water feature plug.
TP-Link Device Error (plugin.py:getInfo:323): water feature plug: Device not reachable and states could not be updated. u'192.168.86.170'
Z-Wave received "Pantry door sensor 1" status update is on
Trigger Pantry door-on
Z-Wave received "swimming pool Tamper Switch" status update is off
Error ElementNotFoundError -- could not find action group with element ID 1421157122
Sent Hue Lights "Pantry hue" on to 100 at ramp rate 2.0 sec.
Z-Wave received "Motion Sensor-Main entrance hallway " status update is off
Trigger motion in main hallway between 7 am and 6pm -off
Sent Hue Lights "Hallway lights" off at ramp rate 5.0 sec.



Your help will be appreciated.

Arthur

Posted on
Sun Oct 13, 2019 4:52 pm
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Re: TP-Link Plugin - How To (v0.8.1)

arthurdaire wrote:
I have been using this plugin for a while to control a water feature in the hallway (on and off with movement in the hallway). It suddenly stopped working yesterday . the plug has a static IP address. I have reloaded it multiple times and restarted the server, but no luck.


Try deleting and re-adding the TP-Link device. I was having a similar problem and that worked for me.

Posted on
Sun Oct 20, 2019 9:15 pm
arthurdaire offline
Posts: 5
Joined: Dec 07, 2016

Re: TP-Link Plugin - How To (v0.1.2)

Thank you ! That worked. :D !

Appreciated

Arthur

Posted on
Thu Nov 14, 2019 1:06 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: TP-Link Plugin - How To (v0.1.2)

Which the status of the plugin regarding this wall plug?

https://www.amazon.de/gp/product/B06W58 ... 1195&psc=1

Posted on
Thu Nov 14, 2019 7:43 am
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: TP-Link Plugin - How To (v0.1.2)

I don’t know about that particular device, but if it works with the “kasa” app, it should work here.
Let us know how it goes.

Posted on
Tue Feb 04, 2020 9:28 am
jacobsen offline
Posts: 2
Joined: Feb 03, 2020

Re: TP-Link Plugin - How To (v0.1.2)

I'm adding my first TP-Link devices to a working Indigo 7.4 setup. I installed version 0,8.1 of the plugin,

An HS300 power strip (6 outlets) seems to be working fine. It has hardware version 1.0 and firmware version 1..0.10

But the two HS110 plugs don't seem to work. They both report hardware version 1.0 and firmware version 1.2. 5 When I define the HS110 plugs with polling enabled, the log shows:

TP-Link Device Polling started for Kitchen Fridge@192.168.42.103.
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: [Errno 57] Socket is not connected. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:118): Kitchen Fridge connection failed with ([Errno 57] Socket is not connected)
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: [Errno 57] Socket is not connected. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:353): Error attempting to update Kitchen Fridge: 'power_mw'. Will try again in 10 seconds
TP-Link Device Error (tpl_polling.py:run:348): Unable to update Kitchen Fridge: after 10 attempts. Polling for this device will now shut down. ('power_mw')
TP-Link Device Polling stopped for Kitchen Fridge@192.168.42.103.

These lines come very fast; despite what the log says, it is definitely not waiting 10 seconds to retry.

If instead, I define it will polling disabled, it seems to start OK, although the messages are a bit confusing:

TP-Link Device Polling thread not started for device Kitchen Fridge, 192.168.42.103. It has polling disabled
TP-Link Device Polling started for Kitchen Fridge@192.168.42.103.

and I can turn the device off OK. But when I then try to turn the device back on the Indigo log reports an error:

TP-Link Device Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 284, in actionControlDimmerRelay
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/TP-Link-Device.indigoPlugin/Contents/Server Plugin/protocol.py", line 124, in send
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
error: [Errno 57] Socket is not connected

Any suggestions on what I can do to debug this further?

Thanks in advance!

Bob

Posted on
Mon Feb 24, 2020 12:05 am
jacobsen offline
Posts: 2
Joined: Feb 03, 2020

Re: TP-Link Plugin - How To (v0.1.2)

The problem above with the single-outlet Kasa plug seems to be because it's reporting

states : States : (dict)
accumEnergyTimeDelta : 0 (integer)
accumEnergyTotal : 0 (integer)
alias : Fridge 1 (string)
curAmps : 0 (integer)
curEnergyLevel : 0 (integer)
curVolts : 0 (integer)
curWatts : 0 (integer)
onOffState : on (on/off bool)
rssi : -69 (integer)
totWattHrs : 0 (integer)

(I've attached the debug log) when the plugin is looking for

# totAccuUsage = float(dev.pluginProps['totAccuUsage'])
curWatts = data['emeter']['get_realtime']['power_mw']/1000
curVolts = data['emeter']['get_realtime']['voltage_mv']/1000
curAmps = data['emeter']['get_realtime']['current_ma']/1000
totWattHrs = round(float(data['emeter']['get_realtime']['total_wh'])/100, 1)
# totWattHrs = round( float( (data['emeter']['get_realtime']['total_wh'])/100) - totAccuUsage, 1)

Note "power_mw", which is what threw the exception, vs curEnergyLevel or curWatts; see also voltage_mv and current_ma

It's not clear to me whether this is how all HS110 devices behave, or just ones with the more recent firmware. Does anybody have a HS110 working? If so, what version is it?
Attachments
KasaDebug.txt
Debug log file section
(4.07 KiB) Downloaded 148 times

Posted on
Thu Mar 05, 2020 2:25 pm
stanleykrasnow offline
Posts: 28
Joined: Dec 10, 2018

The TP-Link Plugin is working with HS200 in-the-wall switch

I just installed an in-the-wall Kasa Smart Light Switch by TP-Link (item number HS200) and it is working well with the Indigo TP-Link plug-in. Thank you to all who worked on the plug-in.

Posted on
Wed Sep 23, 2020 10:35 am
godzuki offline
Posts: 1
Joined: Jan 03, 2017

Re: TP-Link Plugin - How To (v0.1.2)

hi all, just bought some kasa/tp-link smart plugs (the single socket ones) and they become disabled in the console every few days. the checkbox for "enable indigo communications" becomes unchecked for some reason.

anyone had this happen before... know how to fix?

tia

Posted on
Wed Sep 23, 2020 5:49 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: TP-Link Plugin - How To (v0.1.2)

It needs a static IP address. I notice when the IP address of my device changes I lose communication with it.
Go into your DHCP server and assign it an address so it doesn’t change..

Posted on
Mon Nov 23, 2020 12:33 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link Plugin - How To (v0.1.2)

Anyone know if the KP400 dual outdoor plug works with the plugin?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 23, 2020 12:41 pm
jtburgess offline
User avatar
Posts: 77
Joined: Jan 17, 2018
Location: NJ

Re: TP-Link Plugin - How To (v0.1.2)

Jay:
No clue. But if you use the Kasa app to control it, it probably will work.
Search prior posts for how to deal with multiple outlet devices.

-- John

Posted on
Tue Nov 24, 2020 3:00 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link Plugin - How To (v0.1.2)

jay (support) wrote:
Anyone know if the KP400 dual outdoor plug works with the plugin?


Answer - yes. I've confirmed the following work with the plugin:

KP400 (outdoor plug-in)
HS105 (single outlet plug-in)
HS107 (dual outlet plug-in)

If you are using anything else from TP-Link (Kasa), please post the model number here along with what it is. I'm going to add these to the Compatible Devices database for easier discovery.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Nov 24, 2020 3:18 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: TP-Link Plugin - How To (v0.1.2)

HS100 plug
HS107 dual plug
HS200 light switch

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Nov 24, 2020 6:16 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link Plugin - How To (v0.1.2)

Thanks, I've added all of these. Anyone else try any of the others?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 5 guests