[DEPRECATED] Kasa Plug, Switch, and Bulb integration

Makes sense. Great catch!

Update Available to version 6.6.0.

Fixed null level issue. Updated app for clarity. Improved save preferences. Added link to help documentation on device's edit page. See: HubitatActive/Changes.pdf at master · DaveGut/HubitatActive · GitHub

Update instructions:
Update DRIVER and APP code
Run the App and select "Done" (this will update the driver version in the device as well as run Save Preferences).

Hello @djgutheinz. I tried updating via HPM and get an error on the driver upgrade. The version went to 6.6.0, but not the driver. I tried your added update instructions as well, then tried updating via HPM, but received the same error. Thanks.

Appears to be a HPM issue of some sort. I updated mine this AM without issue. That is a the final step in my testing - updating on my active hub.

image

Recommend manually installing the missing driver (plug-switch.groovy. Then finish upgrad instructions

Ok, I manually imported the updated driver code.
When you say "run the app", do you you mean basically just open the app and the click done?
If so, that's what I did.
But HPM still tells me it needs to upgrade. I tried using HPM to upgrade again, but still get that error. My app code and driver code indicate that I have 6.6.0 installed.

I know nothing about HPM other than my end. It is a different tool and since I can not duplicate, I can not troubleshoot. Open HPM and get the logs. They may be indicative of the issue. You could also try a repair in HPM.

Dave

Understood. Thanks for the help.
Edit: Repair did the trick and cleaned it up BTW. I forget about trying that, for sure. Thanks again.

1 Like

2 problems have arisen. First I have 46 Kasa devices, wall switched and plug outlets. 40 of the units have loaded and work fine 6 will no work. They appear in devices but will not work to control anything. I have tried local, and Kasa Cloud all to no avail. Also when trying to use the cloud version an error keeps popping up.
app:152022-06-19 03:55:15.878 am errorgroovy.lang.MissingMethodException: No signature of method: user_app_davegut_Kasa_Integration_107.paragaph() is applicable for argument types: (java.lang.String) values: [Cloud Integration won't work if two-factor authentication is enabled in the Kasa phone app.] on line 232 (method cloudAddDevicesPage)

app:152022-06-19 03:55:15.797 am info[KasaInt: 6.6.0]: cloudAddDevicesPage

app:152022-06-19 03:55:13.646 am info[KasaInt: 6.6.0]: starting Kasa Integration

app:152022-06-19 03:55:13.644 am info[KasaInt: 6.6.0]: getManifestData:

app:152022-06-19 03:54:52.330 am info[KasaInt: 6.6.0]: addDevStatus

app:152022-06-19 03:54:49.319 am warn[KasaInt: 6.6.0]: addDevice:
Failed to install device. Most likely could not find driver Kasa Plug Switch in the Hubitat Drivers Code page. Check that page.
Additional data: Device Data = 00319248B41C={rssi=-48, feature=TIM, port=9999, ip=192.168.7.206, alias=Bathroom 3, model=HS200, type=Kasa Plug Switch, deviceId=8006625F13DD96511D1EDB4E150B2B301E3A0A77, dni=00319248B41C}.

app:152022-06-19 03:54:49.253 am info[KasaInt: 6.6.0]: addDevices: [selectedDevices: [00319248B41C]]

app:152022-06-19 03:54:21.559 am info[KasaInt: 6.6.0]: findDevices: Searching for LAN deivces on IP Segment = 192.168.7, port = 9999

app:152022-06-19 03:54:21.540 am info[KasaInt: 6.6.0]: lanAddDevicesPage

app:152022-06-19 03:54:18.510 am info[KasaInt: 6.6.0]: starting Kasa Integration

app:152022-06-19 03:54:18.507 am info[KasaInt: 6.6.0]: getManifestData:

app:152022-06-19 03:30:46.143 am info[KasaInt: 6.6.0]: fixConnection: [pollEnabled: false]

app:152022-06-19 03:30:30.434 am info[KasaInt: 6.6.0]: fixConnection: [segmentArray:[192.168.7], hostArray:[1, 254], portArray:[9999], tokenUpdated:true]Checking and updating all device IPs.

app:152022-06-19 03:30:30.252 am info[KasaInt: 6.6.0]: getToken goddard1328@gmail.com

app:152022-06-19 03:30:17.725 am errorgroovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

Updated App for the folling:
Error on Cloud install page: fixed typo (paragaph vs paragraph).
Get token error (at bottom): could not duplicate.
Note: If you have enabled two-factor authentication in the Kasa phone app, you must DISABLE this or the functions will not work.

Updating code:

  • Run HPM Repair or manually update the app code.
  • On drivers, open each file and assure that line 9 (or about) contains "def driverVer() { return "6.6.0" }"
  • Open the app and exit (this will assure app and all devices are in sync).

Insufficient information is provided. I need for one of the failing devices:

  • device type and Kasa Model
  • Affirmation that driver code for device type is up to date.
  • LOG PAGE for device when the error occurs.

Dave

Hi Dave,

I recently got a KS200M switch with motion and I am willing to help out if needed.

Regards,

Joli

Thanks, I will consider it. There are some parameters that may be of value; however, most likely we can not use it as a motion detector for Hubitat (code is not there to detect the motion). I am buried with some other items as well as having COVID, so give me some time.

Dave

1 Like

Hope you feel better soon!

1 Like

@djgutheinz , also hope you feel better soon. Perhaps others can chime in (to give Dave a rest, LOL) to help out a noob with this app.

Most of my in-wall switches and dimmers are Tasmota at this time. Am wanting to add a few more switches and dimmers but many manufacturers are now using a non-Tasmotizable chip (they moved away from the ESP8266 variants). Because of this, since I have a very robust Wifi mesh network (and not much of a Zigbee nor Z-wave mesh), I was looking to integrate some Kasa in-wall switches and dimmers.

Is there a listing of specific TpLink Kasa in-wall switches and dimmers that have been proven to work with this app (model numbers etc)?

Also, when I first started with Hubitat about 2 years ago, I had some Kasa devices (plugs) that I had integrated with HE but transitioned away from them as they would “phone home”. Does the current version of this app provide for strict local only control or does the device still require registration with the Kasa app and cloud access? My original Kasa devices started out with the option of local control and access only but when the firmware as inadvertently updated, would only work if integrated with HE through the Kasa Cloud.

Sorry for the noob questions but since my very brief (and extremely limited) foray into the Kasa device world, I have absolutely no experience (and no knowledge) of how this updated app works and its specific features, advantages and disadvantages.

TIA for any help and info on this. It is much appreciated, as is @djgutheinz ’s work on all of this.

Feeling normal on COVID; however, still positive.

There is no list; however, all Kasa switches/dimmers encountered to-date work with this app. However, I have not implemented the Motion Sensor functions on some of the new switches. Finally, the TAPO brand is not supported.

The Kasa phone app is required to install the devices. AFTER THAT, my integration does not require use of the Kasa Credentials to install the device. After installation, you can deselect Kasa Cloud Binding in preferences. This unbinds the device from the Kasa Cloud. See preferences below:

1 Like

@djgutheinz , thank you for all your great work on this! Glad you are feeling better. Stay well.

1 Like

@djgutheinz , one more noob question (thanks for your quick response to my previous one BTW). Once I have unbound the device from the Kasa Cloud via your app and my device shows up in Hubitat as a device, can I expose it to Alexa (for voice control) via the HE Amazon Echo Skill without enabling the Kasa Cloud? IOW, I would like to keep the Kasa Cloud out of the mix as much as possible (I’m stuck with the Alexa Cloud for voice control and announcements but I’m trying to keep everything else connected to HE as local as possible). Thanks again for any help!

Yes. That is how mine are set up.

2 Likes

Again, @djgutheinz thanks for all your great work on this! Along with my Tasmota stuff, this may become my go to method for mains powered stuff so I don’t have to hassle with any Zigbee or Z-wave networking problems.

1 Like

@djgutheinz , once again, many thanks for your great work. I just got back from a trip and installed 6 Kasa Switches and Dimmers. Everything went without a hitch and your app is working great. I deselected [Kasa Cloud Binding] and deselected [Kasa Cloud for device control] in your app. Not directly concerning your app but thought you might have some insight into the Kasa App (on my iPad and iPhone). In the Kasa App, my switches (HS200) show that they are “local control only” (assuming this is because I deselected Kasa Cloud Binding in your app), but even though Cloud control is disabled in the Kasa app, there is no indicator that indicates that my dimmers (HS220) are “local control only”. Any thoughts on this? Oh, and glad to hear you are feeling better. Stay well my friend!

KAsa has some newrer devices that ddo not allow local control through the Kasa phone app.