[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I have 3 HS103 Devices setup. They are using the old non-Cloud app (app version 1.0.0.1 and driver version 1.0.0). Recently have been having issues with the Tokens expiring. In the past, I could go to the app and refresh them, but that does not seem to be working. I confirmed that even though the Kasa app updated recently, I do not have 2 Factor Auth enabled.

I'm wondering, since I only have 3 would it be worthwhile to just remove these devices and readd them with the native integration? If so, is that as simple as deleting the app and removing the devices and then following the new install instructions?

If someone has a better solution please let me know as well. Thanks in advance for the help.

There is another issue solved with a later app version. I would strongly recommend restarting (way too far a leap to upgrade). Dave

1 Like

By restarting you just mean deleting the app and devices, installing the latest, and then adding the devices again?

Yes. Or when re-installing, use the new Built-In integration.

Dave

1 Like

Got it. Thanks. I reinstalled with the built in integration after removing everything. Had to remap a few rules and update my dashboard, but pretty painless overall.

2 Likes

Test Driver for Kasa Cameras with Motion Detection
(with thanks to Tony Fleisher)

I have created a test driver. It requires manual installation and if you want to set the camera settings, you will have to log into the Kasa Cloud through the driver. It is NOT part of the integration at this time (will transition after more testing).

Installation:

  • Make sure you Camera is set up, on, and motion detecting enabled through the Kasa Phone App.
  • Install driver code and save
  • Create virtual device, selecting Kasa Camera as the type.
  • Once the device opens
    • Preferences: enter IP address. Save Preferences.
    • Command: setPollInterval to your desired setting. (note, to see a change in the state, you will have to refresh your browser)

If you want to control camera preferences:

  • Preferences: Select Enable CAM Setting Functions, Save preferences.
  • Preferences: Change settings as desired. Save Preferences.
  • To disable cloud polling: simply deselect Enable CAM Setting functions.
  • On and Off: Only work when "Enable CAM Setting Functions" is true.

Link: https://raw.githubusercontent.com/DaveGut/Test-Code/master/Kasa_Camera.groovy

2 Likes

It appears you've removed the version number from the code?

Can you please include it in the comments section at the top so that users can easily identify the version they are running and compare it to the most recently available?

Thx

HI @djgutheinz -

I just uninstalled the old community integration and removed all devices and drivers. Installed the new Built-In app (6.7.1) but have one switch that refuses to be added.

My HS103 with Hardware Versoin 2.1 and firmware 1.1.4 is throwing an error when trying to add it.
"The following devices were not installed:
[label:Basement Kasa Plug Subwoofer, driver:Kasa Plug Switch, ip:192.168.0.68]
Most common failure cause: Driver not installed."

I have updated all of the firmware across my Kasa devices, but can't get it to add. My other 6 switches and bulbs added with no problems. Any suggestions?

Likely cause. The DEVICE is still installed from the old integration (but now orphaned).

Go to the devices page and look for the device there. If there, open the device, go to the bottom of the page, and select "Remove Device". Then try installing again with the built-in app.

Definite cause. Problem solved. Thanks!
"The following devices were installed:
[label:Basement Kasa Plug Subwoofer, ip:192.168.0.68]"

Maybe I missed it in all the posts, but what are the instructions for moving from the old community version to the built-in app? I know I can totally remove the old one and install the new one, but I was hoping that I would not have to redo the installation from scratch and have to re-set up the automations and whatnot.

So is there a non-destructive way to upgrade? And if not, should I still bite the bullet and do it?

Do not upgrade on the current version. It will eventually orphan the moved-over devices and that will cause issues in the future.

1 Like

I have an unexpected behavior that I'm wondering about.

Our router is acting up recently (periods of no WAN but still have full LAN connection) during these times lights don't work as I would expect.

What should I be looking for?

  • Make sure you are on Version 6.7.2.
  • Look at the attribute "connection" and make sure it is LAN. If CLOUD, change it to LAN in preferences.
  • Look in the events for a problem device and see if the attribute commsError is being set to true then false about 2 minutes later. This may be indicative that the IP addresses are changing.
  • Look in Past Logs for Log Warning or Log Error messages. These indicate issues within the driver (which can be caused by LAN problems).

With the WAN problems, I would resolve the reason (external or internal). If internal, who knows what other issues are being inserted into your LAN comms.

1 Like

Oh I'm definitely on top of getting things fixed. It was just one of the moments where I initially thought "come on Hubitat, this your time to shine! Show me why I went with local control" :rofl:

Need some input and figured this might be the best place to ask.

I've been slowly moving some of my IOT devices to a different network. I'm assuming my tplink devices will work in a different subnet from my hub as long as I allow it via my router and tell the integration about the new lan segment.

That said, what's the best way move my kasa devices over? From the Kasa app, it looks like I would have to remove the device, then re-add it to the new network. But what to do on the hubitat side? And anyway to get around re-doing all my "used by" apps for each device?

I have never used a different subnet; however, others have reported success. This process may work. If not, reinstall will be required.
Open the app, then

  • Select Modify LAN configuration
  • Enter the LAN Segment for the subnet
  • Scan LAN for Kasa Devices
    • No need to add any.
  • Back out of the app by pressing Next two times
  • At this point, you can see if the devices were re-allocated to new subnet on the "list Kasa Devices from Add Devices"
  • press Next then Done
  • Open a device and check the deviceIP in the data section and if the device works.

Tell me if it works.

1 Like

That works!

I added the device in the existing network, let the integration find it and save it. Removed from the kasa app and readded it to the new network with the same name. Scanning for new devices in the integration updated it's IP!

On a side note, I haven't added any new devices since moving the integration to the built in version and getting rid of the user/HPM version. When I scanned for new devices, it showed me a bunch of existing devices I could add. I left them all unchecked for fear of breaking something or duplicating devices. :slight_smile:

The community app drops the migrated children when the system reboots (or updates) - leaving the device orphaned. This will not impact normal performance of the device; however, it will impact you if your IP address changes. I believe @gopher knows about this.

Trying to add one of these orphans will not work. A device with the same DNI already exists.

Devices added through the Built-In app are not orphaned.

Bottom line: I recommend NOT converting to the Built-In until this issue is resolved.

Gotcha. Too late, I migrated to the built-in version a few weeks back. :smiley:

1 Like