You need to add the driver "Kasa Dimming Switch" to Hubitat.
duh.. im an idiot.. thanks!
@markbellkosel84, were you using a beta 2.2.6? After updating my hub today to 2.2.6 I am getting these errors as well.
@djgutheinz Seems like something that possibly changed in the groovy back end and caused a bug in the driver. Line 599 of the "Kasa Plug Switch" driver originally is this:
if (response.length() == null) {
I am not sure when or why the length would be null but I guess this was working before? Now the length on these invalid responses seems to be 0, so I changed that line to be this:
if (response.length() == null || response.length() == 0) {
This has made the error messages go away, and if debugging is enabled it is logging the "null return rejected" message which you can see right below that line in the code.
Yes I was. I was in touch with @djgutheinz and he walked me through doing exactly what you did. Been working like a charm!
It will be in the next release. Yes, something changed - somewhere. I will pull up the release of the next update.
After upgrading 2.2.6.129 im getting these errors and level set is not working: [error] java.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 323 (setLevel)
Try setting preference "Default Transition Time" to 1 second (or greater). I am already working on a permanent fix.
Tell me if it works.
Dave
I will try that, however, I uninstalled the devices and installed several times and same error. But, when I reattached them as cloud devices it seems to work, with transition set to zero. Of course I prefer not to have cloud attached. So, Ill try that and see if it works as well. thanks
Hi
I just got the Kasa Integration app and drivers (as identified in the install instructions) into place. For some reason the multiple smart outlet Kasa HS300 power strips are not detected (installed driver is EM-Multi-Plug.groovy: HS300) while the single smart plug Kasa HA110 outlets are (installed driver EM-Plug.groovy: HS110, KP115). In the Kasa Integration app I can pick the HA110s but HS300s are not detected.
How do I resolve this? I seem to have followed the developer's guidance.
Thanks,
Welcome.
I need the installation logs for the HS300 to see what is happening. I also need confirmation that on the Drivers Code page you have a driver with the name "Kasa EM Multi Plug".
Dave
HI thanks for the quick reply. Yes the driver is Kasa EM Multi Plug. How do I get you the installation logs? None of the HS300s show up in the app.
Have you installed the HS300's using the Kasa Application? Are they on the same segment as the other TP-Link devices? (Typically, if not showing up in the app, these are the top two causes.)
If you mean the Kasa mobile app yes they are. They still work fine with the Kasa mobile app and send data into Sense as well. Everything is on the same 192.168.86.x network.
If you mean the Kasa Integration app then no it only sees the 110s not the 300s.
i am still running older kasa integration just local and no reason to upgrade.. as mentioned.. with firmware release 2.2.6 was getting this error everytime a refresh was done on em switches.
turned on debugging and it was because the length was 0, it was checking for a null and returning but not 0.. change the code and added a check for 0 with a return
ie
// ===== distribute responses =====
def distResp(response) {
logDebug "response = $response"
logDebug("distResp: response length = ${response.length()}")
if (response.length() == null) {
logDebug("distResp: null return rejected.")
return
}
if (response.length() == 0)
return
...
didn't add it in the existing if as didn't think it was an error and justified a message.
this was in version 5.3.3 of the em driver and other drivers.
I've been seeing this in the logs as well, might give it a go as well. Thanks.
Again, I am aware. The error (in this case) is a nuisance and does not cause any performance nor status errors.
What is happening: When executing the connect or close command, a null/empty response is returned from the device. This used to be returned as null. Somewhere it was converted to zero length.
The next update will correct this - and earlier in the accessed methods.
Dave
Thanks Dave, I didn't realize it was a known issue, thanks for following up on it. I'll leave it for now and let it come through when you release it.
Simon
It was originally for the early Hubitat 2.2.6 users. 2.2.6 uncovered an error in my code that was masked in earlier versions. The initial fix is below (for one driver only). It impacts all my drivers. Out this week with some other fixes.
I also installed 2.2.6 early, but probably ignored it or didn't notice it . I still have issues with my devices dropping off my router when it restarts (nothing to do with your driver's), socal number of them probably weren't connected when I upgraded.
Transition to 1 works as well.