Kasa Integration Issue - Current Kasa Token stays as INVALID

Hi all,
I’ve been stumped for several days and hoping someone here might have insight.

I have around 26 Kasa smart plugs that I’ve been using with Hubitat for years without issue. They automate a lot around my home. But a few days ago, everything suddenly stopped working.

In the Kasa Integration app, it now shows that the Current Kasa Token is INVALID. I’ve tried everything I can think of to reauthorize it:

  • Verified my email and password (even reset them to be sure)
  • Confirmed that Third Party Services is enabled in the Kasa app
  • Made sure two-step verification is turned off
  • Tried deleting and re-entering my credentials
  • Rebooted the Hubitat hub
  • Checked the Tapo app (though I’m not sure how it fits in here) and verified credentials match and two-step auth is off

Still no luck—and I have no idea what changed or why the token can’t be renewed.

I'd really prefer not to delete the app and reconfigure everything from scratch, especially with so many devices tied in.

Any suggestions or troubleshooting steps I might have missed?
Thanks in advance!

I did find in my logs:
warn Kasa Integration : [method:getToken, source:kasaAuthenticationPage, updateFailed:[error_code:-20600, msg:Account not found]]

So strange as it states my account isn't found. My account hasn't changed and I log into the Kasa app just fine. I can also log into the web www.tplinkcloud.com with same credentials.

I'm wondering if something changed with the internal Kasa app? I'm assuming this is still the best place to be and shouldn't move to the Deprecated Community Kasa Integration** (by Dave Gutheinz)?

Very interesting. I am getting an error on my account also. It would be nice to confirm on yours. When confirmed, I will have to rewrite the code to delete the cloud. It will be a hassle for some users.

It looks like Kasa has moved the accounts to a different server. But they never share that information with users. They may have also implemented some security protocol; however, i have no way of knowing. The CLOUD is likely dead.

Worst case: uninstall and reinstall the integration not even attempting to use the cloud. However, try the below FIRST.

Since I am local only and my login does not work either, the below steps are best guesses.
The way forward is to convert to local integration only.

  • Zero Out userName and Password in the Hubitat Kasa Integration.
  • Do a scan for the Kasa Devices.
  • Go to each device. and check that the connection is LAN and if it now works. If not,
    • Go to preferences
    • Manually enter the IP address (from your router)
    • Deselect "Use Kasa Cloud for device control.
    • Save preferenes.
    • Test the device.

@gopher.ny - OUCH. This is a major glitch. I will begin working.

Update. Just confirmed. Kasa updated their apps and moved the Kasa data / accounts over to the Tapo cloud. Different address and different comms protocol.

The account has transitioned to a different server then removed from the current server.

Oh good, something to devrlop while waiting for doctors.

Thanks for confirming this so quickly! I've been going crazy the past few days as I just thought I was overlooking something. But also what a headache!

You do overlook something. The total lack of concern of TP-LInk/Kasa for their customers. They should have told us. I will start looking at a correction tomorrow. But there will be chaos. If you transition yours over, please provide some notes for other users (I do not have any cloud-controlled devices).

Dave

3 Likes

Thanks so much for the guidance. Just wanted to follow up with what worked for me.

First off, I had everything initially set up through the cloud. I didn’t really know what I was doing at the time (still figuring things out!), but after diving deeper, I totally agree there’s no real benefit to using the cloud. I’m now switching everything to run locally, like you suggested. It’s faster, more reliable, and just makes sense.

I’m also on a time crunch as I’ve got several things on precise timers, like my hydroponics setup so I needed to get things back online ASAP.

After clearing out my login credentials and running a device scan, nothing showed up. So I had to go into each device manually. Following your steps:

  • Opened the device’s Preferences
  • Manually entered the IP address from my router
    • (For anyone else reading: my router showed all the Kasa plugs by model name, so I used the Kasa app’s MAC address info to cross-reference and identify each device/IP)
  • Unchecked “Use Kasa Cloud for device control”
  • Clicked Save Preferences
  • Then went to the Commands tab and clicked Configure to switch it to LAN control
  • Finally, reserved the IP address in my router to lock it in

And boom, everything’s working locally now. Bit of a hassle to go through each one manually, but in the end, totally worth it. Learned something new today!

Really appreciate your help!

2 Likes

Yes, having the same issue. Have been working on it for a few days as well. In the chaos tried deleting all the devices and re scanning but no longer can even see any devices to change the IP addresses to static and local.

Hopefully this can be resolved or will have to throw out all my Kasa plugs.

Is there a way to add a Kasa plug device manually without the scan?

Cheers

Update is in latest Hub Firmware update.

Issues resolved:

  • Comms error. Attribute "commsError" not resetting.
    • Added method to capture failure and also recovery.
    • Added in function to automatically do a app find devices to update after Third failure.
  • Cloud control. Cloud control not working (Kasa has migrated server to Tapo server).
    • Removed cloud and altLan functions from code base.
    • Device data updates on FindDevices (including during Hub reboot).
  • User confusion on which integration (built-in, community) to use given new API in some devices.
    • Added find for non-supported Kasa devices and list on Add Devices page.

Unresolved: Devices not discovered by LAN discovery. User can try the manual IP/Port function.

1 Like

Did the update but honestly I know it must be user error on my part. But I am seeing this in the log, does this mean anything?

I have an IOT Network that I have all the Kasa plugs on. I check things so little as usually everything just works, but they all do have static IP's that I have set in the past.

app:8552025-08-02 09:01:17.405 AM

info

Kasa Integration : [method:findDevices, activity:sendLanCmd, segment:192.168.10, port:9999]

app:8552025-08-02 09:01:17.402 AM

debug

Kasa Integration : findDevices: Searching for LAN deivces on IP Segment = 192.168.10, port = 9999

app:8552025-08-02 09:01:17.400 AM

debug

Kasa Integration : [method:findDevices, hostArray:[1, 254], portArray:[9999], pollSegment:[192.168.10], timeout:10, findTapo:true]

app:8552025-08-02 09:01:17.398 AM

debug

Kasa Integration : addDevicesPage

app:8552025-08-02 09:01:15.513 AM

info

Kasa Integration : starting Kasa Integration

app:8552025-08-02 09:01:13.306 AM

info

Kasa Integration : starting Kasa Integration

app:8552025-08-02 09:01:05.282 AM

info

Kasa Integration : starting Kasa Integration

app:8552025-08-02 09:01:05.213 AM

debug

Kasa Integration : initInstance: Getting external data for the app.

app:8552025-08-02 08:57:39.960 AM

info

Kasa Integration : starting Kasa Integration

app:8552025-08-02 08:57:37.940 AM

info

Kasa Integration : addDevStatus

app:8552025-08-02 08:57:37.933 AM

info

Kasa Integration : addDevices: [selectedDevices: null]

app:8552025-08-02 08:57:30.265 AM

info

Kasa Integration : [method:updateChildren]

app:8552025-08-02 08:57:18.670 AM

error

groovy.json.JsonException: expecting current character to be '}' with an int value of 125

Cheers

Could not duplicate (does not make it unreal). Need more data. The error is probably looking at the application state "devices" and may have a bad record (for some reason).

I need the App devices data. I need it in text format (not a screenshot). Accessed from "i" in circle on the right of the Kasa Integration on the Hubitat App list page. The data is in the "application states". See screenshot below for example. Need the "devices"

Had the same issue.
All I needed to do was to go to Hubitat interface -> Devices -> Search "Kasa", then open up each device -> Preference Tab -> Disable Use Kasa Cloud for Device Control -> Save.
... and everything went back to normal.

1 Like