[DEPRECATED] Kasa Plug, Switch, and Bulb integration

Just updated again. Do not use trace logging. I found the error from the last log.

Dave

Yep, that looks like you squashed it.
image

Thanks very much, Nic

FYI: Is it just me or is it weird that when the plug is ON the Current States shows no power but when it's OFF it shows Power ?
like...
image

image

Thanks, Dave. It is showing the energy now. @njanda my HS110 is showing the same.

Glad most are fixed. Run a Refresh and then go to the devices page. Select Events at upper right. I need the latest two events (including date/time) named

switch
power

First on and then off. I turned on and off two times each.

Just added a 3 second delay in the power request. It may be polling before the plug has stabilized to the new power setting.

Again, please. Thanks for the assistance.

1 Like

The current state is accurate now. :+1: :clap:

1 Like

Still seeing "get_monthstat" error on HS110.

[dev:218](http://10.0.6.4/logs#dev218)2019-03-27 08:39:16.455 pm [error](http://10.0.6.4/device/edit/218)java.lang.NullPointerException: Cannot get property 'get_monthstat' on null object on line 207 (energyThisMonthResponse)

Not enough information. Need then following:

  1. Open the device in the Hubitat device page. Select "events" and look through the events for an event: "commsError", "Device NAme too long".

  2. Complete the follwoing:

  • Open logging in Hubitat
  • Go to preferences and enable Trace Logging. Save.
  • Find the above error in the log. Copy that error and the previous (lower on page) 10 error log entries.
  • Paste here.
    {Note that this log message should be very close to the error you are reporting.)

Go back to preferences and turn off Trace Logging.

oddly, cannot get error to appear with trace on. Will see if maybe it goes away. Maybe there's some bug with TP-Link not populating certain things.

How long is your device name in TP-Link? There is an issue that (sometimes) TP-Link will fragment the return to two messages (which Hubitat can not pass through). Happens when the TP-Link name is greater than 17 characters (total message link causes the breakup). There are also other times that TP-Link breaks up the message into two parts - usually toward end of month when message is longest. It happens when the device has been busy for a while.

just called "Washer" in Kasa.

Then the second case. Nothing I can fix. The only workaround is to go to Kasa or Node account versions (3.6).

not sure I understand. but right now, it's working. =-)

Dave, Amazing, fantastic job, works perfect with the HS-105 plug
and I don't need their stupid app !

Thank You !!!

2 Likes

Dave, thank you for the excellent work, I have 2 HS-100 plugs in my bedroom, 1 to control a fan and 1 to control a space heater. I finally have a solution without having to upgrade them that I can use automation to turn on and off as needed.

4 Likes

thanks for this Dave, I was a bit confusing as the readme says to grab the driver for the device you have, but with your 4.2 update you just need the driver & app.
Followed the instructions and had this installer with my HS100 and working well. Thanks for your work!

Awesome integration. Just a heads up for those who get the HS300 multi power strip. Don't name the devices too long in the Kasa APP or else it will not be found. Not sure if that was mentioned earlier. Made that mistake and couldn't find one strip. Not sure the limit. If you rename later after installing, you may get COM errors saying this.

1 Like

The limitation is that the devices fragment the return message (sometimes) when the return message is too long. The name is part of the message. I thought this only applied to Energy Monitor Plugs; however..... Hubitat (and SmartThings) do not have ways to capture two messages from one sent get statement.

Experience has in the past shown that 16 characters or less seem to work.

Dave

I guess HS300 is an energy monitor plug strip so that helps. 16 character limit is a good start