[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I could use a log. Turn on debug logging, Open Logs, set pollFrequency to 30. Copy logs in a reply. (I tested the code on a dummy switch and the set poll frequency appears to work; however, that is not an absolute.)

Thanks for the steps. Sorry if there is a better way to post the logs.

dev:4892020-03-14 12:16:08.996 pm infoDryer L5.0.1 setEngrToday: [energy: 0]

dev:4892020-03-14 12:16:08.986 pm debugDryer L5.0.1 setEngrToday: [emeter:[get_monthstat:[month_list:[[month:3, year:2020, energy_wh:18718], [month:1, year:2020, energy_wh:16323], [month:2, year:2020, energy_wh:36476]], err_code:0]]]

dev:4892020-03-14 12:16:08.929 pm debugDryer L5.0.1 sendCmd: command = {"emeter":{"get_monthstat":{"year": 2020}}} // device IP = 192.168.178.67, action = setEngrToday

dev:4892020-03-14 12:16:08.928 pm infoDryer L5.0.1 powerResponse: [power: 653]

dev:4892020-03-14 12:16:08.921 pm debugDryer L5.0.1 powerResponse: cmdResponse = [emeter:[get_realtime:[voltage_mv:242164, power_mw:653083, err_code:0, total_wh:2066, current_ma:3257]]]

dev:4892020-03-14 12:16:08.842 pm debugDryer L5.0.1 sendCmd: command = {"emeter":{"get_realtime":{}}} // device IP = 192.168.178.67, action = powerResponse

dev:4892020-03-14 12:16:08.840 pm infoDryer L5.0.1 statusResponse: switch: on

dev:4892020-03-14 12:16:08.832 pm debugDryer L5.0.1 statusResponse: status = [dev_name:Smart Wi-Fi Plug With Energy Monitoring, hw_ver:2.0, rssi:-46, latitude_i:-273784, err_code:0, type:IOT.SMARTPLUGSWITCH, longitude_i:1529830, deviceId:8006FA1BEDDF796B3AC1CF684969AFCC1982D073, mac:B0:4E:26:5F:45:74, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:106215, feature:TIM:ENE, relay_state:1, next_action:[type:-1], alias:Dryer, oemId:6480C2101948463DC65D7009CAECDECC, model:HS110(AU), hwId:A28C8BB92AFCB6CAFB83A8C00145F7E2, fwId:00000000000000000000000000000000, sw_ver:1.5.7 Build 191125 Rel.104256]

dev:4892020-03-14 12:16:08.777 pm debugDryer L5.0.1 sendCmd: command = {"system" :{"get_sysinfo" :{}}} // device IP = 192.168.178.67, action = statusResponse

dev:4892020-03-14 12:16:08.771 pm debugDryer L5.0.1 refresh

dev:4892020-03-14 12:16:05.997 pm infoDryer L5.0.1 Last month's energy stats set to 36.48 // 1.26

dev:4892020-03-14 12:16:05.996 pm debugDryer L5.0.1 setLastMonth: cmdResponse = [emeter:[get_monthstat:[month_list:[[month:3, year:2020, energy_wh:18717], [month:1, year:2020, energy_wh:16323], [month:2, year:2020, energy_wh:36476]], err_code:0]]]

dev:4892020-03-14 12:16:05.888 pm debugDryer L5.0.1 sendCmd: command = {"emeter":{"get_monthstat":{"year": 2020}}} // device IP = 192.168.178.67, action = setLastMonth

dev:4892020-03-14 12:16:05.886 pm infoDryer L5.0.1 This month's energy stats set to 18.72 // 1.44

dev:4892020-03-14 12:16:05.881 pm debugDryer L5.0.1 setThisMonth: cmdResponse = [emeter:[get_monthstat:[month_list:[[month:3, year:2020, energy_wh:18717], [month:1, year:2020, energy_wh:16323], [month:2, year:2020, energy_wh:36476]], err_code:0]]]

dev:4892020-03-14 12:16:05.824 pm debugDryer L5.0.1 sendCmd: command = {"emeter":{"get_monthstat":{"year": 2020}}} // device IP = 192.168.178.67, action = setThisMonth

dev:4892020-03-14 12:16:05.821 pm infoDryer L5.0.1 checkDateResponse: currDate = [2020, 3, 14]

dev:4892020-03-14 12:16:04.816 pm debugDryer L5.0.1 checkDateResponse: [time:[get_time:[sec:8, min:16, month:3, hour:12, year:2020, err_code:0, mday:14]]]

dev:4892020-03-14 12:16:04.752 pm debugDryer L5.0.1 sendCmd: command = {"time":{"get_time":null}} // device IP = 192.168.178.67, action = checkDateResponse

dev:4892020-03-14 12:16:04.748 pm debugDryer L5.0.1 updateStats

dev:4892020-03-14 12:16:03.742 pm infoDryer L5.0.1 updated: Scheduled nightly energy statistics update.

dev:4892020-03-14 12:16:03.727 pm infoDryer L5.0.1 updated: Description text logging is true.

dev:4892020-03-14 12:16:03.725 pm infoDryer L5.0.1 updated: Debug logging is: true for 30 minutes.

dev:4892020-03-14 12:16:03.718 pm infoDryer L5.0.1 updated: Refresh set for every 10 minute(s).

dev:4892020-03-14 12:16:03.682 pm infoUpdating ..

--- Live Log Started, waiting for events ---

@saxnix, I've just checked my HS110 and the PollFreq. is reflected correctly in the state variables section.

@njanda, what version of the driver are you using? I am using v5.0.

I've got no issues with my HS110 plugs either. Shows up as it should in state variables. Version L5.0.1

I'm using driverVersion: L5.0.1

Just checked, I am using L5.0.1 too. I wonder what I have done to get a different result to the rest of you??

I will personal message you. Dave

Well, here's an update. I am an IDIOT ! I didn't realise that you needed to Press the Set Poll Frequency tile. I had just been entering the value, and then selecting Save Preferences . Thanks for your help with this @djgutheinz. Proves the rule that you never know all the ways a user will interact in unexpected ways. :blush:

After entering the value and hitting Set Poll Frequency, it saved the value. Again, I am an idiot!

2 Likes

No, you are just a novice. You will learn. Welcome to the quagmire of home automation!

1 Like

Ha ha, thanks @djgutheinz.

Hi folks! I'm trying to get my Kasa HS200 light switches onto Hubitat, but they're not showing up. I've assigned them a static IP (I think), but still no joy. I have all my IOT devices on a separate Guest network, though the Hubitat is hard-wired into the router. Do you think that's the problem?

Would love some advice if anyone has it!

That

From Dave’s instructions:
Before proceeding :
Before proceeding, answer the following questions:

  • Are all the Kasa Devices installed and working through the Kasa Application?
  • Has static IP addresses been created in your router for all the Kasa Devices?
  • Are the Kasa IP address on the same segment as your Hubitat Hub (I.e., 192.168.50)?
2 Likes

Yep, once I hit "Allow local network access" it worked well. Didn't know that it was on a different segment!

2 Likes

Now my question is: how do I get the Hubitat to turn on/off the Kasa when I hit an Inovelli switch a few times? I'm super new to this whole "smart home" thing!

I don’t use those switches as most of my stuff is zigbee, but would assume you would use rule machine or simple lighting. In rule machine select the trigger button device’

I’m assuming the inovelli switches have double and/or triple taps that show up as buttons to use for automations. For any other questions you should create a new thread so as not to distract from the purpose of this one :wink:
BTW, welcome to Hubitat!

2 Likes

Thanks for the help! Excited to play around, and already super impressed with this community!

1 Like

@djgutheinz, your work is amazing!

I started using your TP-Link/Kasa apps and drivers in Feb '19, and I'm absolutely blown away by how many improvements you've made over the year.

I don't know how to thank you enough. If there's anything I can do in return for the amazing service you've provided me and the HE community, don't hesitate to ask.

Thank you!

2 Likes

I think I know your answer, mine working for months without obvious issues, any value in upgrading?

My answer is usually - If it ain't broke, don't fix it.