TP-Link WiFi Switches

Forum rules

Questions about hardware that can be controlled by Indigo (but not through the interfaces and plugins listed). If Indigo doesn't support some bit of hardware you're interested in, and you don't find a 3rd Party Plugin for it, add it to this forum. Be sure to include links to as much information as you can find about it.

Note: adding it here does not mean we're going to add it - in fact it's possible one of our 3rd party developers may decide to write a plugin for it. We add hardware/features based on a lot of different factors beyond just having a request for it.

Posted on
Wed Aug 28, 2019 12:58 am
ChopOMatic offline
Posts: 110
Joined: Sep 12, 2014

Re: TP-Link WiFi Switches

I have one of the TP-Links bulbs set up. Hope to play with it tomorrow with the scripts.

Posted on
Tue Sep 17, 2019 4:15 pm
jtburgess offline
User avatar
Posts: 78
Joined: Jan 17, 2018
Location: NJ

Re: TP-Link WiFi Switches

Berkinet and Ramias have made MANY changes to support multi-plug devices and devices that report energy usage, but nothing specific for light bulbs. Thanks, guys!

The GitHub master has just been merged with all of those changes, but I haven't yet made this into a "release".

JAY - if you have time please check it out and remind me what I need to do to release it. I am rereading the indigo_7.3_documentation:plugin_guide, so just mistakes I might make that aren't documented.

ChopOMatic wrote:
I have one of the TP-Links bulbs set up. Hope to play with it tomorrow with the scripts.

You too. download the GitHub master and see it it does everything you need. If not ... how's your python :)
or maybe its already working for you !

Posted on
Tue Sep 17, 2019 4:27 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link WiFi Switches

On Github, just create a release, zip up the plugin and attach it to the release, then in your Indigo Account just edit the plugin and save it - it should automatically pick up the new one.

Looking forward to this as Amazon has the dual-outlet one on sale today and I just picked one up... ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Sep 18, 2019 1:49 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link WiFi Switches

Well, the upgrade didn't go well. Did a status request on an existing device and got:

Code: Select all
   TP-Link Device Error            Error in plugin execution CalcDeviceFunc:

Traceback (most recent call last):
  File "plugin.py", line 372, in getDeviceStateList
AttributeError: 'NoneType' object has no attribute 'append'

   TP-Link Device Error            Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 7.3/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1179, in deviceUpdated
  File "plugin.py", line 146, in deviceStartComm
KeyError: key multiPlug not found in dict

   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


Then, did another, and:

Code: Select all
   TP-Link Device Error            Error in plugin execution ExecuteAction:

Traceback (most recent call last):
  File "plugin.py", line 333, in actionControlUniversal
TypeError: not enough arguments for format string


So, something broke my existing smart plug... :( :roll:

I'll revert back until these issues are worked out.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Sep 18, 2019 3:47 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: TP-Link WiFi Switches

jay (support) wrote:
Well, the upgrade didn't go well.... ...So, something broke my existing smart plug... :( :roll:
I'll revert back until these issues are worked out.

Devices from previous versions of this plugin are not compatible with the new version. You will need to delete the old devices and then recreate them.

Posted on
Wed Sep 18, 2019 4:02 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link WiFi Switches

berkinet wrote:
Devices from previous versions of this plugin are not compatible with the new version. You will need to delete the old devices and then recreate them.


What??? That really sucks...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Sep 18, 2019 4:13 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: TP-Link WiFi Switches

jay (support) wrote:
What??? That really sucks...

Or not. There is now only one device type for all TP-Link WiFi plugs. The plugin does a discovery process for all compatible devices on the local network. The Indigo device is then automatically configured, though you can change a few options. Give it a try.

Posted on
Wed Sep 18, 2019 6:54 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link WiFi Switches

berkinet wrote:
jay (support) wrote:
What??? That really sucks...

Or not. There is now only one device type for all TP-Link WiFi plugs. The plugin does a discovery process for all compatible devices on the local network. The Indigo device is then automatically configured, though you can change a few options. Give it a try.


That's great for people adding new devices.

It sucks for us that have existing devices that we have to go recreate since deleting devices means I have to go manually change all the places they've been linked. This is not a good user experience...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Sep 18, 2019 7:47 pm
FlyingDiver offline
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: TP-Link WiFi Switches

berkinet wrote:
jay (support) wrote:
What??? That really sucks...

Or not. There is now only one device type for all TP-Link WiFi plugs. The plugin does a discovery process for all compatible devices on the local network. The Indigo device is then automatically configured, though you can change a few options. Give it a try.


You do know it's possible to change the devices when the new version of the plugin starts?

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

Posted on
Thu Sep 19, 2019 12:15 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: TP-Link WiFi Switches

FlyingDiver wrote:
...You do know it's possible to change the devices when the new version of the plugin starts?

Yes I do, and I felt that given the significant functional and design differences between the new and old releases and the likely small number of devices anyone might have, it was better to have a fresh start.

Posted on
Thu Sep 19, 2019 5:50 am
FlyingDiver offline
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: TP-Link WiFi Switches

jay (support) wrote:
It sucks for us that have existing devices that we have to go recreate since deleting devices means I have to go manually change all the places they've been linked. This is not a good user experience...


I had a similar problem with a different plugin I was working on. I found that I could "salvage" the old devices by changing them to a different type with a manual address (like X-10) then change them back to the correct plugin with the new device type.

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

Posted on
Thu Sep 19, 2019 5:53 am
FlyingDiver offline
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: TP-Link WiFi Switches

berkinet wrote:
Yes I do, and I felt that given the significant functional and design differences between the new and old releases and the likely small number of devices anyone might have, it was better to have a fresh start.


Then it would have been better to use a different plugin ID, which is what I ended up doing with the Ecobee plugin. I couldn't make them backward compatible, so the users were going to have to change the devices anyway.

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

Posted on
Thu Sep 19, 2019 8:22 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: TP-Link WiFi Switches

FlyingDiver wrote:
I had a similar problem with a different plugin I was working on. I found that I could "salvage" the old devices by changing them to a different type with a manual address (like X-10) then change them back to the correct plugin with the new device type.


Yeah, I'll give that a try. It often won't work for custom devices (since state information that could be used in actions might break), but since these are standard relay and dimmer devices, it might work.

FlyingDiver wrote:
Then it would have been better to use a different plugin ID, which is what I ended up doing with the Ecobee plugin. I couldn't make them backward compatible, so the users were going to have to change the devices anyway.


If there is some holdup to migrating devices (which should always be the first choice if possible), then another option, and one we took with the WeatherSnoop plugin, would be to leave legacy devices in place and add a new device type. This would not "break" anything, but would allow users to use the new device type when adding devices. In the case of WeatherSnoop, WS v2 had a fixed set of states regardless of the type of weather station that it was talking to. But with WS3, each agent presented all the data available for the specific hardware (or service) it was talking to. So it didn't make any sense to attempt to migrate those devices (since the data sets were so different) but we also didn't want to break any existing users.

berkinet wrote:
Yes I do, and I felt that given the significant functional and design differences between the new and old releases and the likely small number of devices anyone might have, it was better to have a fresh start.


I understand the sentiment even if I don't agree. But at the very least, you should catch when an older device attempts to start up, log an error with what to do to deal with the issue, and then disable the device. Still not a great solution, but much better than allowing random stack traces to show up in the Event Log. Better UX with likely a minimum amount of work.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Sep 19, 2019 9:55 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: TP-Link WiFi Switches

FlyingDiver wrote:
...Then it would have been better to use a different plugin ID, which is what I ended up doing with the Ecobee plugin. I couldn't make them backward compatible, so the users were going to have to change the devices anyway.
And then you’d be right where you are today, having to recreate all your devices.

Quite simply, if you don’t like the new version, don’t use it. Enough said,

Posted on
Sun Sep 22, 2019 9:38 am
CliveS offline
Posts: 771
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: TP-Link WiFi Switches

Due to the Alexa Hue being neutered (thanks Amazon!!) I decided to buy an HS110 and it works well but when I Send Status Request or Update I get the following error

Code: Select all
 TP-Link Device Error            Error in plugin execution ExecuteAction:

Traceback (most recent call last):
  File "plugin.py", line 333, in actionControlUniversal
TypeError: not enough arguments for format string

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Page 6 of 8 1 ... 3, 4, 5, 6, 7, 8

Who is online

Users browsing this forum: No registered users and 6 guests