[DEPRECATED] Kasa Plug, Switch, and Bulb integration

No. I check the manifest and it still shows 6.1.0.

I apologize if this has already been asked.

I'm using this integration with 3 switches via cloud. Can I switch to local only by changing settings in the app or would I need to reset the switches, remove and re-add them?

They're working fine via cloud now but all of my switches have ip reservations in my router so I know where they are.

The 6.x version of the driver (including cloud driver) will allow updating to local or cloud as desired. How did you install the original version?

Dave

I installed via HPM, then added my Kasa login and token stuff.

I think I may have installed 6.x from the beginning. I only installed it a few weeks ago. I just let HPM update to 6.1 today.

What would be the correct steps to convert my devices to local? (I have one that is inside a nema enclosure outside, so that would be a pain to have to actually access :slight_smile: )

Since I don't know if you followed the instructions, do the following:

  • Open the instructions and follow the steps in the section "Upgrade Instructions".
  • On the device's page, look in preferences. If you see a parameter "Use Kasa Cloud
    • Assure it is set to false (white, not selected)
    • Save preferences

You should now be in local processing. You can double verify this by looking at the state variable "currentCloud". I should be false.

Below is a picture of my Fan, bound to the cloud, using local control.

You should now be under

The update is now complete. Assuming the

I know this was a while ago. Does 6.1.1 still have the error handling? That's what I'm on, but I was having the exact same problem. A couple of my HS210's were not updating after turning them on or off until there was a device refresh, so I did some testing.

I was able to get them to refresh by breaking up the set_relay_state and get_sysinfo commands like this with a delay.

sendCmd("""{"system":{"set_relay_state":{"state":1}}}""")
pauseExecution(250)
sendCmd("""{"system":{"get_sysinfo":{}}}""")

I noticed the problem starts to happen when the delay is around or under 100ms. The off state still receives the update at 100ms, but the on state is randomly hit or miss at that time, so I bumped it up on both to 250 to be safe.

Got it! I had to re-do the get access token.

I didn't realize the devices are bound to the cloud, but still could be controlled directly locally. That's how mine were already set. Bound to cloud, but not using kasa cloud for device control.

Thank you!

I did a hot fix that should address your problem. Do a repair in HPM or use the import function to update in the driver code editor.

Changes:

  • Changed rawSocketTimeout processing from 2 to 3 seconds
  • Added logic to handle the system.set_relay_state when a system.get_sysinfo is not returned from the on/off commands.

The second change effects what you recommended by sending a get_sysinfo if the on/off response does not include the update data.

Test and respond. But I need logs if there are problems.

Dave

I have a couple devices that are listing "socketTimeout: 35000"

I'm running bound to cloud with local control and everthing is updated.

Is this anything to be concerned about?

Steve. I have updated the driver on GitHub (again). Would love a similar set of logs (you can delete the previous post if you like.)

Slight difference. I use runInMillis. Otherwise, the state.lastConnect is not updated and a unnecessary connect command is sent (extends the total function (press on to indicate on) to greater than 1 sec). The on version is below.

Thanks for the assist.
Dave

def on() {
	logDebug("on")
	if (emFunction) {
		sendCmd("""{"system":{"set_relay_state":{"state":1},""" +
				""""get_sysinfo":{}},""" +
				""""emeter":{"get_realtime":{}}}""")
	} else {
		sendCmd("""{"system":{"set_relay_state":{"state":1},""" +
				""""get_sysinfo":{}}}""")
		if (getDataValue("model") == "HS210") {
			runInMillis(350, refresh)
		}
	}
}

I have two HS103 plugs on Firmware 1.1.2; App release 5.3.1.1, and Kasa Plug Driver 5.3.1. The devices work locally with HE, and remotely with the Android Kasa app.

The Kasa plugs are used as part of my HE UPS setup. I've been hesitant to update and break this with all the changes, but don't want an unexpected failure at an inopportune moment.

@djgutheinz Should I update the HE Kasa App, HE Kasa Device, and any firmware?

No. If it isn't broken or you do not need a feature, do not update. The 6.x releases are appropriate if TP-Link updates your firmware to disable local control (they have done that to some models already). If that occurs, then update. No need before then.

2 Likes

Thanks, that one worked. Here's a log of an on , off, then refresh in case you need it.

dev:1132021-02-24 05:57:09.686 pm debug[Plug Switch/6.1.1.2] Stairway lights setSysInfo: status = [dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-48, latitude_i:######, err_code:0, longitude_i:-######, deviceId:80064AB907AF2286266F1A0758A517EF1A14B9AC, mac:AC:84:C6:74:4B:49, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:0, next_action:[type:-1], alias:Stairway lights, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.8 Build 191118 Rel.135937]
dev:1132021-02-24 05:57:09.658 pm debug[Plug Switch/6.1.1.2] Stairway lights prepResponse: response length = 1270
dev:1132021-02-24 05:57:09.250 pm debug[Plug Switch/6.1.1.2] Stairway lights sendLanCmd: Attempting to connect.....
dev:1132021-02-24 05:57:09.236 pm debug[Plug Switch/6.1.1.2] Stairway lights sendLanCmd: {"system":{"get_sysinfo":{}}}
dev:1132021-02-24 05:57:09.234 pm debug[Plug Switch/6.1.1.2] Stairway lights refresh

dev:1132021-02-24 05:51:01.800 pm info[Plug Switch/6.1.1.2] Stairway lights setSysInfo: switch: off
dev:1132021-02-24 05:51:01.795 pm debug[Plug Switch/6.1.1.2] Stairway lights setSysInfo: status = [dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-48, latitude_i:######, err_code:0, longitude_i:-######, deviceId:80064AB907AF2286266F1A0758A517EF1A14B9AC, mac:AC:84:C6:74:4B:49, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:0, next_action:[type:-1], alias:Stairway lights, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.8 Build 191118 Rel.135937]
dev:1132021-02-24 05:51:01.745 pm debug[Plug Switch/6.1.1.2] Stairway lights prepResponse: response length = 1270
dev:1132021-02-24 05:51:01.377 pm debug[Plug Switch/6.1.1.2] Stairway lights sendLanCmd: {"system":{"get_sysinfo":{}}}
dev:1132021-02-24 05:51:01.375 pm debug[Plug Switch/6.1.1.2] Stairway lights refresh
dev:1132021-02-24 05:51:01.167 pm debug[Plug Switch/6.1.1.2] Stairway lights setSysInfo: status = [dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-49, latitude_i:######, err_code:0, longitude_i:-######, deviceId:80064AB907AF2286266F1A0758A517EF1A14B9AC, mac:AC:84:C6:74:4B:49, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:6, feature:TIM, relay_state:1, next_action:[type:-1], alias:Stairway lights, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.8 Build 191118 Rel.135937]
dev:1132021-02-24 05:51:01.135 pm debug[Plug Switch/6.1.1.2] Stairway lights prepResponse: response length = 1336
dev:1132021-02-24 05:51:00.989 pm debug[Plug Switch/6.1.1.2] Stairway lights sendLanCmd: {"system":{"set_relay_state":{"state":0},"get_sysinfo":{}}}
dev:1132021-02-24 05:51:00.983 pm debug[Plug Switch/6.1.1.2] Stairway lights off

dev:1132021-02-24 05:50:54.979 pm info[Plug Switch/6.1.1.2] Stairway lights setSysInfo: switch: on
dev:1132021-02-24 05:50:54.974 pm debug[Plug Switch/6.1.1.2] Stairway lights setSysInfo: status = [dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-49, latitude_i:######, err_code:0, longitude_i:-######, deviceId:80064AB907AF2286266F1A0758A517EF1A14B9AC, mac:AC:84:C6:74:4B:49, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:1, next_action:[type:-1], alias:Stairway lights, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.8 Build 191118 Rel.135937]
dev:1132021-02-24 05:50:54.942 pm debug[Plug Switch/6.1.1.2] Stairway lights prepResponse: response length = 1270
dev:1132021-02-24 05:50:54.872 pm debug[Plug Switch/6.1.1.2] Stairway lights sendLanCmd: {"system":{"get_sysinfo":{}}}
dev:1132021-02-24 05:50:54.870 pm debug[Plug Switch/6.1.1.2] Stairway lights refresh
dev:1132021-02-24 05:50:54.670 pm debug[Plug Switch/6.1.1.2] Stairway lights setSysInfo: status = [dev_name:Smart Wi-Fi 3-Way Light Switch, hw_ver:1.0, rssi:-48, latitude_i:######, err_code:0, longitude_i:-######, deviceId:80064AB907AF2286266F1A0758A517EF1A14B9AC, mac:AC:84:C6:74:4B:49, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM, relay_state:0, next_action:[type:-1], alias:Stairway lights, oemId:FA7CCD3DD290792FF84DC5EADF9B86A9, model:HS210(US), abnormal_detect:0, hwId:71C89564A7C0200DD8D25466DEA4E851, fwId:00000000000000000000000000000000, mic_type:IOT.SMARTPLUGSWITCH, sw_ver:1.5.8 Build 191118 Rel.135937]
dev:1132021-02-24 05:50:54.639 pm debug[Plug Switch/6.1.1.2] Stairway lights prepResponse: response length = 1336
dev:1132021-02-24 05:50:54.485 pm debug[Plug Switch/6.1.1.2] Stairway lights sendLanCmd: {"system":{"set_relay_state":{"state":1},"get_sysinfo":{}}}
dev:1132021-02-24 05:50:54.482 pm debug[Plug Switch/6.1.1.2] Stairway lights on
1 Like

I was in HPM today and it said there was an update for the Kasa app. I updated it. I wasn't aware there were further instructions. I found them, and have verified my devices. I show a token on the page (previously said null). My devices all show local processing.

My problem (that started today) is that spontaneously, all my plugged in devices power cycle. I haven't figured out the pattern yet. It's an HS300 and it's driving my entertainment center. It's mostly an annoyance to be watching something and have it wink out. I'm wondering if this behavior is typical for someone that hasn't followed the update instructions. If it is, this is probably already resolved by my completing the update directions. If it's not, I've turned on debugging (wish there was a way to specify how long (like a minutes field with a max (my problem seems to be occurring hourly or some where around there so I'm not sure that 30 minutes is enough)). If this is expected behavior, would like to suggest putting "follow the update instructions located at after this update completes" in the release notes area that I read in HPM before executing the update.

You likely have some rule that is accessing the on/off command. Several origins are possible:

  • Hubitat Rule Machine
  • Some Schedule you have in the Kasa App
  • Some rule you have in google or alexa that accesses the Kasa App
  • A ghost of a past SmartThings Installation.

This is what i thought too, except it's not just going off like i have something scheduled wrong, it's going off then immediately back on. I'm going to keep monitoring. Thank you for your input!

OK, so it did it again and I got logs this time. It's preceded by a poll warning.

app:402021-02-28 09:03:03.940 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:03:00.864 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:57.788 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:54.716 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:51.644 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:48.591 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:45.476 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:42.435 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:39.359 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:36.284 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:33.222 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:30.144 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:27.073 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:23.992 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:20.931 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:02:17.859 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:01:59.509 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:01:29.478 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:01:11.072 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:01:04.933 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:00:34.736 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:00:31.665 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:00:28.565 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:00:25.477 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:00:22.446 pm warn[KasaInt/6.1.1]: pollForIps: a poll was run within the 15 min. Poll not run. Try running manually through the application.

app:402021-02-28 09:00:19.363 pm info[KasaInt/6.1.1]: pollForIps: Diabling poll capability for one hour

app:402021-02-28 07:45:30.476 pm info[KasaInt/6.1.1]: pollEnable: polling capability enabled.

app:402021-02-28 07:30:30.383 pm info[KasaInt/6.1.1]: pollForIps: Diabling poll capability for one hour

app:402021-02-28 05:33:56.340 pm info[KasaInt/6.1.1]: initialize

app:402021-02-28 05:33:54.994 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:33:53.361 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:33:50.631 pm info[KasaInt/6.1.1]: initialize

app:402021-02-28 05:33:49.560 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:33:47.587 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:21:09.592 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:19:47.071 pm info[KasaInt/6.1.1]: initialize

app:402021-02-28 05:19:42.792 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:15:31.015 pm info[KasaInt/6.1.1]: pollEnable: polling capability enabled.

app:402021-02-28 05:14:20.806 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:14:16.503 pm debug[KasaInt/6.1.1]: updateChildDeviceData

app:402021-02-28 05:14:11.527 pm debug[KasaInt/6.1.1]: removeDevicesPage: newDevices = null

app:402021-02-28 05:14:11.462 pm info[KasaInt/6.1.1]: cloudGetDevices: kasaCloudUrl uptdated to https://use1-wap.tplinkcloud.com

app:402021-02-28 05:14:11.460 pm debug[KasaInt/6.1.1]: updateDevices: Roku Ultra added to array. Data = [dni:6032B123BF6705, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Roku Ultra, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:05, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D05]

app:402021-02-28 05:14:11.458 pm info[KasaInt/6.1.1]: updateDevices: added Roku Ultra to devices array.

app:402021-02-28 05:14:11.434 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6705

app:402021-02-28 05:14:11.432 pm debug[KasaInt/6.1.1]: updateDevices: Steam PC added to array. Data = [dni:6032B123BF6704, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Steam PC, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:04, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D04]

app:402021-02-28 05:14:11.430 pm info[KasaInt/6.1.1]: updateDevices: added Steam PC to devices array.

app:402021-02-28 05:14:11.404 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6704

app:402021-02-28 05:14:11.402 pm debug[KasaInt/6.1.1]: updateDevices: Home Max added to array. Data = [dni:6032B123BF6703, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Home Max, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:03, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D03]

app:402021-02-28 05:14:11.401 pm info[KasaInt/6.1.1]: updateDevices: added Home Max to devices array.

app:402021-02-28 05:14:11.375 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6703

app:402021-02-28 05:14:11.373 pm debug[KasaInt/6.1.1]: updateDevices: TV Power added to array. Data = [dni:6032B123BF6702, type:Kasa EM Multi Plug, feature:energyMonitor, alias:TV Power, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:02, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D02]

app:402021-02-28 05:14:11.372 pm info[KasaInt/6.1.1]: updateDevices: added TV Power to devices array.

app:402021-02-28 05:14:11.348 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6702

app:402021-02-28 05:14:11.345 pm debug[KasaInt/6.1.1]: updateDevices: Yamaha Receiver added to array. Data = [dni:6032B123BF6701, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Yamaha Receiver, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:01, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D01]

app:402021-02-28 05:14:11.344 pm info[KasaInt/6.1.1]: updateDevices: added Yamaha Receiver to devices array.

app:402021-02-28 05:14:11.318 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6701

app:402021-02-28 05:14:11.315 pm debug[KasaInt/6.1.1]: updateDevices: Xbox Power added to array. Data = [dni:6032B123BF6700, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Xbox Power, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:00, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D00]

app:402021-02-28 05:14:11.314 pm info[KasaInt/6.1.1]: updateDevices: added Xbox Power to devices array.

app:402021-02-28 05:14:11.264 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6700

app:402021-02-28 05:14:11.233 pm debug[KasaInt/6.1.1]: parseDeviceData: [sw_ver:1.0.19 Build 200224 Rel.090814, hw_ver:1.0, model:HS300(US), deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, oemId:5C9E6254BEBAED63B2B6102966D24C17, hwId:34C41AA028022D0CCEA5E678E8547C54, rssi:-56, longitude_i:-729627, latitude_i:415479, alias:TP-LINK_Power Strip_BF67, status:new, mic_type:IOT.SMARTPLUGSWITCH, feature:TIM:ENE, mac:60:32:B1:23:BF:67, updating:0, led_off:0, children:[[id:800674CFECB45411ECCA16961B8F85A01D869F8D00, state:1, alias:Xbox Power, on_time:582, next_action:[type:-1]], [id:800674CFECB45411ECCA16961B8F85A01D869F8D01, state:1, alias:Yamaha Receiver, on_time:582, next_action:[type:-1]], [id:800674CFECB45411ECCA16961B8F85A01D869F8D02, state:1, alias:TV Power, on_time:582, next_action:[type:-1]], [id:800674CFECB45411ECCA16961B8F85A01D869F8D03, state:1, alias:Home Max, on_time:582, next_action:[type:-1]], [id:800674CFECB45411ECCA16961B8F85A01D869F8D04, state:0, alias:Steam PC, on_time:0, next_action:[type:-1]], [id:800674CFECB45411ECCA16961B8F85A01D869F8D05, state:1, alias:Roku Ultra, on_time:582, next_action:[type:-1]]], child_num:6, err_code:0] // null

app:402021-02-28 05:14:10.786 pm info[KasaInt/6.1.1]: cloudGetDevices 9910fec3-ATy5ayhLpsWkqC8RGkPhbzU

app:402021-02-28 05:14:05.312 pm debug[KasaInt/6.1.1]: updateDevices: Roku Ultra added to array. Data = [dni:6032B123BF6705, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Roku Ultra, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:05, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D05]

app:402021-02-28 05:14:05.311 pm info[KasaInt/6.1.1]: updateDevices: added Roku Ultra to devices array.

app:402021-02-28 05:14:05.286 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6705

app:402021-02-28 05:14:05.284 pm debug[KasaInt/6.1.1]: updateDevices: Steam PC added to array. Data = [dni:6032B123BF6704, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Steam PC, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:04, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D04]

app:402021-02-28 05:14:05.282 pm info[KasaInt/6.1.1]: updateDevices: added Steam PC to devices array.

app:402021-02-28 05:14:05.258 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6704

app:402021-02-28 05:14:05.256 pm debug[KasaInt/6.1.1]: updateDevices: Home Max added to array. Data = [dni:6032B123BF6703, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Home Max, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:03, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D03]

app:402021-02-28 05:14:05.254 pm info[KasaInt/6.1.1]: updateDevices: added Home Max to devices array.

app:402021-02-28 05:14:05.228 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6703

app:402021-02-28 05:14:05.226 pm debug[KasaInt/6.1.1]: updateDevices: TV Power added to array. Data = [dni:6032B123BF6702, type:Kasa EM Multi Plug, feature:energyMonitor, alias:TV Power, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:02, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D02]

app:402021-02-28 05:14:05.225 pm info[KasaInt/6.1.1]: updateDevices: added TV Power to devices array.

app:402021-02-28 05:14:05.198 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6702

app:402021-02-28 05:14:05.196 pm debug[KasaInt/6.1.1]: updateDevices: Yamaha Receiver added to array. Data = [dni:6032B123BF6701, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Yamaha Receiver, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:01, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D01]

app:402021-02-28 05:14:05.195 pm info[KasaInt/6.1.1]: updateDevices: added Yamaha Receiver to devices array.

app:402021-02-28 05:14:05.167 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6701

app:402021-02-28 05:14:05.165 pm debug[KasaInt/6.1.1]: updateDevices: Xbox Power added to array. Data = [dni:6032B123BF6700, type:Kasa EM Multi Plug, feature:energyMonitor, alias:Xbox Power, model:HS300, deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, ip:192.168.86.43, plugNo:00, plugId:800674CFECB45411ECCA16961B8F85A01D869F8D00]

app:402021-02-28 05:14:05.163 pm info[KasaInt/6.1.1]: updateDevices: added Xbox Power to devices array.

app:402021-02-28 05:14:05.142 pm debug[KasaInt/6.1.1]: updateDevices: dni = 6032B123BF6700

app:402021-02-28 05:14:05.134 pm debug[KasaInt/6.1.1]: parseDeviceData: [sw_ver:1.0.19 Build 200224 Rel.090814, hw_ver:1.0, model:HS300(US), deviceId:800674CFECB45411ECCA16961B8F85A01D869F8D, oemId:5C9E6254BEBAED63B2B6102966D24C17, hwId:34C41AA028022D0CCEA5E678E8547C54, rssi:-56, longitude_i:-729627, latitude_i:415479, alias:TP-LINK_Power Strip_BF67, status:new, mic_type:IOT.SMARTPLUGSWITCH, feature:TIM:ENE, mac:60:32:B1:23:BF:67, updating:0, led_off:0, children:[[id:00, state:1, alias:Xbox Power, on_time:575, next_action:[type:-1]], [id:01, state:1, alias:Yamaha Receiver, on_time:575, next_action:[type:-1]], [id:02, state:1, alias:TV Power, on_time:575, next_action:[type:-1]], [id:03, state:1, alias:Home Max, on_time:575, next_action:[type:-1]], [id:04, state:0, alias:Steam PC, on_time:0, next_action:[type:-1]], [id:05, state:1, alias:Roku Ultra, on_time:575, next_action:[type:-1]]], child_num:6, err_code:0] // 192.168.86.43

app:402021-02-28 05:14:03.988 pm info[KasaInt/6.1.1]: findDevices: Searching for LAN deivces on IP Segment = 192.168.86

app:402021-02-28 05:14:03.983 pm debug[KasaInt/6.1.1]: removeDevicesPage

app:402021-02-28 05:14:00.701 pm info[KasaInt/6.1.1]: starting Kasa Integration, Version 6.1.1

app:402021-02-28 05:13:59.974 pm debug[KasaInt/6.1.1]: updateChildDeviceData

any idea what is up with that? Should I actually having polling per device set to something like 5 minutes?

Also, what causes these 2 things?:

dev:812021-02-28 05:14:56.723 pm warn[EM Multi Plug/6.1.1] Roku Ultra rawSocketTimeout: Retry on error limit exceeded. Error count = 3. Run Application to update IP.

dev:802021-02-28 05:14:22.978 pm warn[EM Multi Plug/6.1.1] Steam PC Check: Device Name must be first 5 characters of Model (i.e., HS200).

Lastly, 2 small (grammatical) things:

app:402021-02-28 07:30:30.383 pm info[KasaInt/6.1.1]: pollForIps: Diabling poll capability for one hour

"Disabling" is misspelled.

dev:812021-02-28 05:02:29.886 pm warn[EM Multi Plug/6.1.1] Roku Ultra SendCmd: IP address update attempted within last hour./nCheck your device. Disable if not longer in use

"Disable if NO longer in use"

The errors I see are application errors due to a hard communications failure. The commands are not getting a response from the HS300. You are doing a lot of quick polling. Not a good idea (see warning displayed while running). Finally, the off - on you are seeing is due to the HS-300 giving up and rebooting on itself.

Recommended actions:

  • Unplug the HS300 for 30 seconds then plug back in.
  • On each (and every device):
    • Run command "Set Poll Interval" with the value off.
      • After refreshing your browser, the state.pollInterval should be off.
  • Preferences:
    • Set Refresh Interval to 5 or 1 minute.
    • Set "Enable Energy Monitor" to off for as many devices as possible.
    • Set "Kasa Cloud Binding" to "Unbound from Cloud"
      • The Kasa App polls the device as well as Hubitat. Unless you use the Kasa App, this is not necessary. To rebind, you can use either the Kasa App or this integration.
    • Save Preferences
  • Run the system for a day or two and see if you have problems.
  • Adding back
    • If you need quick polling on some (but not all) of the outlets, go ahead and enable. Make sure you have a strong reason for the quickPolling (i.e., there is a follow-on rule machine action.)
    • The same is true for the EM Functions.

My testing. I will complete some testing on an instrumented driver today. I will run the system with quick polling/em function on at 5 seconds (THIS IS NOT A RECOMMENDED OP) as well as bound to the Kasa Cloud with the Kasa App active on my phone. (I have done this before.) I will also collect error stats so I can see how much.

Possible future changes (for multiplugs only) will be to use the app to send refresh/polling commands. This will take some detailed design - it is not as simple as you may think.

Hey, thank you for your detailed reply, but I don't need quick polling at all, I don't know why you think I have it enabled - every one of my devices shows polling set to off without any modification and refresh interval set to 30 minutes. Those warning you see are a bulk dump right when the device rebooted.

I occasionally use the Kasa app when I need to verify the states according to what Kasa thinks (the plug I have assigned to my Roku regularly does not go off correctly) - hubitat will think it's off, but Kasa says it's on.

Here's something interesting I found (not sure if it's relevant). The app says it's 6.1.1:
Inked2021-03-01 11_04_31-jonathan_LI

But the device says it's 6.1: