[OBSOLETE] [Deprecated] New TP-Link/Kasa Plug, Switch, and Bulb Integration

Stefano,

Sadly, the integration is designed to require a Hub.

Dave

I have my Kasa Smart Wi-Fi Outdoor Plug | KP400 that i added to Smartthings with a kasa account and everything seems to be working. The only problem i’m having is that when i use ActionTiles to control the devices i get an error message. I brought it up with the ActionTiles developer and he recommended i bring the error to the attention of the custom handler. See error below. Nor sure what any of that means. Let me know if you need more info.

Error: device failed to execute command on, groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.HubMultiAction.add() is applicable for argument types: (groovy.json.internal.LazyMap) values: [[alias:Gazebo Lights, id:8006844AE631BFC3C73A2E1BAA42B4E11B64AC0700, …]] Possible solutions: add(java.lang.String), add(java.util.List), add(physicalgraph.device.HubAction), add(physicalgraph.device.HubMultiAction), any(), any(groovy.lang.Closure)

Hi Dave,
Just wanted to express my appreciation for your excellent work on TP-Link devices integration with SmartThings. These devices have just became available in Australia. I have been using SmartThings Classic App and Hub v.3 with various switches and sensors for a couple of years now, but adding a new switch (or a smart plug) was always a pain, because I had to deal with the American plugs and sockets. (WeMo Smart Plug has an Australian version, but it’s much bulkier than TP-Link’s.) Yesterday I’ve bought two TP-Link Smart Plugs, downloaded your latest software and manuals from GitHub, installed the TP-Link SmartThings Manager and the relevant DH, added the new devices and Bingo! - It worked immediately. The whole process took less than an hour. Once again, thanks for your great work!
Cheers,
Ben

2 Likes

"No signature of method: physicalgraph.device.HubMultiAction.add()"

Yoda16,
Two things.

  • First. An error message would typically also provide at least one additional line with the method being executed and the line number. Without that, I am searching through 1000 lines of code.
  • Second. In my code, I never use a method HubMultiAction.add(), so I am really curious where the error is actually originating. (PS. I also never use an “add()” command at all in the code.)

If you can get the line number, maybe I can find the reason for the error. Also.

  • Is the error occurring always or periodically. If periodical, what is the frequency and what is your refresh cycle?

Gutheinz,

Thanks for getting back to me. I copied that error directly from ActionTiles. Below is the error from smartthings log.

It happens every time I turn the device on or off through actiontiles. Not directly through smartthings. Thats why i originally sent a message to the actiontiles developer figuring it was on their side. He didn’t think so. Thanks for looking into this for me.

physicalgraph.app.exception.SmartAppException: device failed to execute command off, groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.HubMultiAction.add() is applicable for argument types: (groovy.json.internal.LazyMap) values: [[alias:Gazebo Lights, id:8006844AE631BFC3C73A2E1BAA42B4E11B64AC0700, …]]
Possible solutions: add(java.lang.String), add(java.util.List), add(physicalgraph.device.HubAction), add(physicalgraph.device.HubMultiAction), any(), any(groovy.lang.Closure) @line 467 (doCommand0)

Great. Line number. I will work today.

Dave

Something strange. I tested today on my devices without any error messages. I am confused since line 467 of the current (and previous) app does not have anything to do with the error command string. It is a section focused on Install options.

I need the following information
Versions: On the IDE, open the handler and app. Near the top, there is a line similar to:

  • driver: def devVer() { return “nnnnnnn” }
  • app: def appVersion() { return “nnnnnnn” }

What do these say for you?

Lines: How many lines in each file (left of page, line number with “//end-of-file”.)

Type of installation: Cloud or Hub???

Main Plug Name: What is the name of the main plug. Gazebo Lights is on switch on the device. Need the top-level name.

Dave

def devVer() { return “4.0.01” }
def appVersion() { return “4.0.04” }

Handler has 249 lines
App has 746 lines

Cloud install

As for the main plug name not sure what you need. The plug shows up as 2 separate devices. one is Gazebo Fan and one is Gazebo Lights. I have some other multi point devices that show up as one devices then i have to go into that to see the 2 child devices but my plug doesn’t show up that way.

Thanks again for the help i hope in didn’t botch the install and send you on a wild goose chase.

I have a significant delay after I click to turn it on or off. Goes to Waiting for a few seconds. No delay when controlling from Kasa app. Anyone else?

Both app and device handler have incorrect file sizes (for some reason).

Recopy from below into files on IDE, save, then try again. Will go further from there.

Device Handler: “https://github.com/DaveGut/TP-Link-SmartThings/blob/master/Device%20Handlers/TP-Link%20Multi-Plug.groovy

Service Manager: “https://github.com/DaveGut/TP-Link-SmartThings/blob/master/Service%20Manager/TP-Link%20SmartThings%20Manager.groovy

Delays are normal here. But remember, you have added several cloud layers in SmartThings integration vs Kasa App (which runs on you Local Wifi when at home).

Dave

1 Like

I copied again and was getting the same size so i googled the correct way to add devices from code and it suggested clicking RAW on GitHub first. I did that and now the sizes are below.

Handler has 255
App has 749

Same error though.

physicalgraph.app.exception.SmartAppException: device failed to execute command off, groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.HubMultiAction.add() is applicable for argument types: (groovy.json.internal.LazyMap) values: [[alias:Gazebo Lights, id:8006844AE631BFC3C73A2E1BAA42B4E11B64AC0700, …]]
Possible solutions: add(java.lang.String), add(java.util.List), add(physicalgraph.device.HubAction), add(physicalgraph.device.HubMultiAction), any(), any(groovy.lang.Closure) @line 467 (doCommand0)

Also one more problem. ST app keeps saying it’s offline? Any fix for that? KASA APP can control it fine
Strip: Interface Error. See SmartApp and Device error message

You have a comms error somewhere. To fix, I would need the log data for when the error occurs. That with the slowness may be a comms timeout. But I would need the error messages and or events to verify. Suggestion:
a. Reboot your Router. Wait for everything to come back up.
b. Reboot your SmartThings hub.

Update. What is the device you are having problems with? Driver Version??? There is definitely something wrong in the message path!!

It’s ok after reboot. Do I need to set the Device IP and hub IP manually in the device settings?
Would that make things better?

It would not really speed for the cloud-based integration. Those parameters are ignored there and the IP address obtained from the Service Manager and updated on Service Manager refresh cycles.

I tested today with the classic phone app. The devices responded immediately; however, the SmartThings interface did not update until I switched to the device’s detail page. That is indicative of SmartThings being very slow (I have seen it before). When reported to SmartThings (in the past), they said operation was nominal when this occurs.

Hope all goes well in the future.
Dave

HS 100 went offline again few hours ago. Went to TP-Link smartthings manager and updated installation data which fixed the issue but it seems to go offline every now and then. How to get driver version?

Go to the deviceHandler page on the IDE. Open the deviceHandler code. Somewhere around line 20 you will see:

======== DO NOT EDIT LINES BELOW ===========================*/
def devVer() { return “4.0.01” }

In the example above, the handler is 4.0.01.

Next time the HS100 goes off-line, open the IDE and LiveLogging. Do a quick refresh and collect any error data. Post here.

Dave, thank you for all you have done and are still doing. When I try to activate my TP-Link devices I get an error so looking at the log I see this:

Any thoughts?

Tomy51

The message says the SmartApp is calling out an old version of the device handler. This means that you are running an older version of the SmartApp than the Device Handler. Hopefully, you will not have to reinstall all TP-Link devices.