[RELEASE] TP-LINK TAPO Plug, Switch, Bulb, Hub and Robovac Integration

I will do further investigation today and update on next version.

the fix from @estahl worked for me.
change this line
asyncSend([method: "get_device_info"], "minRefresh", "parseUpdates")
to
asyncSend(createMultiCmd([[method: "get_device_info"]]), "minRefresh", "parseUpdates")

Will be updated in next release. (PS - I have been out-of-it for several months due to health reasons. Starting back slowly.)

Dave

best wishes! many people including myself use your code extensively. thank you so much for the contribution.

2 Likes

I’ve come across an issue with a few of my p110 plugs. A couple of them had to be replaced due to hardware failures, I then noticed the power usage seemed to be lagging. On investigation, I found they were set to 30 min refreshes. However, my original existing plugs had the refresh option unset, but the scheduled task runs every minute. But, you can not set the refresh to 1 min you can go 30 secs or 5 mins - I;ve gone for 30 secs for now.
A few thoughts…
Is 30 secs too frequent?
Can 1 min be added as an option?
Has the default for new devices been changed over various releases?

1 minute is available in the current code. Just checked.

There is nothing in the wifi polling that exercises the plug mechanics. Essentially, it grabs the current state in plug memory and returns it to the device. (There are a lot of reasons plugs these plugs can fail including power surges and exceeding the amperage on the plug (generates heat).

Thanks, I’m on 2.3.9a installed via HPM, which says it’s up to date?

Are you saying the reading of power data is done locally? If so, I’m more comfortable with 30secs, I thought it maybe calling out to tplink.

I think these plugs fail with faulty capacitors. Both mine were clicking on/off constantly with to wifi access. Both only used for quote low power devices. For the price of them though, they're very good. It’s just a bit of a pain having to update all your code when one is replaced!

The integration is totally local. It never contacts the TP-LInk (Tapo) cloud.

I will look into (NO PROMISE) to replace like for like (plug for plug, emPlug for emPlug). Feasible but may be difficult to provide davegut proof implementation.

Thats excellent, I assumed it went out to tapo as it needs the credentials.
A facility to replace would a failed device would be great, I have quite a few WC pistons using these, and node red flows using the nodered hubitat integration.

Can you confirm the latest release version, as I’m not sure HPM is updating the code correctly?

Latest release is 2.3.9a.

Dave

Thanks, that’s what it says I’m on, but I’m not getting the 1min refresh option?
I’m happy to go with the 30 sec, now I know its local.

I cannot get this to detect anything for the life of me. Installed via HPM, selected drivers, then set up app within Hubitat. Set Static IPs via my router's DHCP.

What else should I be looking into? I'm looking at the log and it looks like it finds both of the bulbs I'm looking to add with the right IP addresses, but it shows 0 within the search screen. I get I'm an idiot and in over my head but I'm trying.

Thanks to anyone who can help

1 Like

Logs. Need logs. Also, the Tapo Device Model would be helpful.

Gotcha - Tapo Bulb L530.

I have long used a Kasa integration without issue separate from this. The Kasa devices are linked to my Tapo account/app, if that matters.

Logs:

Blockquote

No logs.

Logs:

Column 1
app:1192024-12-15 02:12:53.437 PMinfoTapo Integration-2.3.9a: [method:updateTpLinkDevices] app:1192024-12-15 02:12:53.436 PMdebugTapo Integration-2.3.9a: [method:updateTpLinkDevices] app:1192024-12-15 02:12:48.405 PMdebugTapo Integration-2.3.9a: [method:getTpLinkLanData, response:2] app:1192024-12-15 02:12:48.375 PMdebugTapo Integration-2.3.9a: [method:getAllTpLinkDeviceData, discData:0] app:1192024-12-15 02:12:48.374 PMinfoTapo Integration-2.3.9a: [method:getDiscData] app:1192024-12-15 02:12:48.371 PMdebugTapo Integration-2.3.9a: [method:getTpLinkLanData, response:2] app:1192024-12-15 02:12:48.316 PMdebugTapo Integration-2.3.9a: findTpLinkDevices: [startFinding:[segment: 192.168.1.122]] app:1192024-12-15 02:12:48.308 PMinfoTapo Integration-2.3.9a: findDevices: Finding TP-Link LAN Devices app:1192024-12-15 02:12:48.303 PMdebugTapo Integration-2.3.9a: addDevicesPage app:1192024-12-15 02:12:34.778 PMinfoTapo Integration-2.3.9a: [method:updateLegacyDevices, appVer:2.3.9a, version:2.3.9a] app:1192024-12-15 02:12:34.775 PMinfoTapo Integration-2.3.9a: [method:findDevices, intType:Tapo Integration, findTpLinkDevices:[method:findTpLinkDevices, action:getTpLinkLanData, timeOut:8, hostArray:[2, 254], pollSegment:192.168.1.175]] app:1192024-12-15 02:12:34.770 PMdebugTapo Integration-2.3.9a: findTpLinkDevices: [segment: 192.168.1.175, finding: complete] app:1192024-12-15 02:12:33.848 PMinfoTapo Integration-2.3.9a: [method:updateTpLinkDevices] app:1192024-12-15 02:12:33.846 PMdebugTapo Integration-2.3.9a: [method:updateTpLinkDevices] app:1192024-12-15 02:12:28.818 PMdebugTapo Integration-2.3.9a: [method:getTpLinkLanData, response:2] app:1192024-12-15 02:12:28.785 PMdebugTapo Integration-2.3.9a: [method:getAllTpLinkDeviceData, discData:0] app:1192024-12-15 02:12:28.783 PMinfoTapo Integration-2.3.9a: [method:getDiscData] app:1192024-12-15 02:12:28.780 PMdebugTapo Integration-2.3.9a: [method:getTpLinkLanData, response:2] app:1192024-12-15 02:12:28.748 PMdebugTapo Integration-2.3.9a: findTpLinkDevices: [startFinding:[segment: 192.168.1.175]] app:1192024-12-15 02:12:28.741 PMdebugTapo Integration-2.3.9a: findTpLinkDevices: [segment: 192.168.1.122, finding: complete] app:1192024-12-15 02:12:27.863 PMinfoTapo Integration-2.3.9a: [method:updateTpLinkDevices] app:1192024-12-15 02:12:27.861 PMdebugTapo Integration-2.3.9a: [method:updateTpLinkDevices] app:1192024-12-15 02:12:22.835 PMdebugTapo Integration-2.3.9a: [method:getTpLinkLanData, response:2] app:1192024-12-15 02:12:22.795 PMdebugTapo Integration-2.3.9a: [method:getAllTpLinkDeviceData, discData:0] app:1192024-12-15 02:12:22.793 PMinfoTapo Integration-2.3.9a: [method:getDiscData] app:1192024-12-15 02:12:22.789 PMdebugTapo Integration-2.3.9a: [method:getTpLinkLanData, response:2] app:1192024-12-15 02:12:22.711 PMdebugTapo Integration-2.3.9a: findTpLinkDevices: [startFinding:[segment: 192.168.1.122]] app:1192024-12-15 02:12:22.703 PMinfoTapo Integration-2.3.9a: findDevices: Finding TP-Link LAN Devices app:1192024-12-15 02:12:22.695 PMdebugTapo Integration-2.3.9a: addDevicesPage app:1192024-12-15 02:12:19.477 PMinfoTapo Integration-2.3.9a: [method:startPage, status:Starting Tapo Integration Setup] app:1192024-12-15 02:11:51.895 PMinfoTapo Integration-2.3.9a: [method:startPage, status:Starting Tapo Integration Setup] app:1192024-12-15 02:10:47.679 PMinfoTapo Integration-2.3.9a: [method:startPage, status:Starting Tapo Integration Setup] app:1192024-12-15 02:08:10.790 PMinfoTapo Integration-2.3.9a: [method:startPage, status:Starting Tapo Integration Setup] app:1192024-12-15 02:07:14.168 PMinfoTapo Integration-2.3.9a: [method:updateLegacyDevices, appVer:2.3.9a, version:2.3.9a]

Sorry I'm new to the messageboard. Was not allowing me to post the logs because it read as links. I don't see any way to edit. Literally I'm showcasing how inept I am with everything. I appreciate you incredibly fast response to this. Genuinely respect the effort and follow up.

Found the issue. It is in your segment definition (see below):

The segment you entered is incorrect. It should be 192.168.1

  • app:1192024-12-15 02:12:34.775 PMinfoTapo Integration-2.3.9a: [method:findDevices, intType:Tapo Integration, findTpLinkDevices:[method:findTpLinkDevices, action:getTpLinkLanData, timeOut:8, hostArray:[2, 254], pollSegment:192.168.1.175]]

This is entered at the very top of the app.

Thank you! I wasn't finding them as it was so I tried putting in their specific IPs.

I adjusted as you said and still no luck.