[RELEASE] TP-Link Plug, Switch, and Bulb integration


#165

Sorry for late reply. I didn't realise you posted.
So I get this:


#166

What I do not see are

a.  Current State (upper right of device page):  
      1.  energy
      2.  power
b.  State Variables:
     1.  powerScale
     2,  energyScale
     3.  energyThisMonth

I think there is an error in the code. I have updated the file on GitHub; however, even easier is to insert a line after line 233 in the driver. Change to be:

233 def cmdResponse = parseInput(response)
234 getPower()
235 def onOff


#167

Done


#168

50


#169

I just checked energy and power readings on HS110 and they match the readings from the driver.


#170

Great. Not saying I can implement; but, any other features in these you would like? How about bulbs?

Dave


#171

I can see power end energy are available in RM. I haven't done anything with it yet but I can see some usage.
I don't have any bulbs. I'll get some I think. I have these plugs as I wanted them in a separate app from ST app as I was afraid to accidentally turn them off . HE doesn't need to be looked at all the time and we only get what we want on the mobile dashboard.
Thanks a lot for your ingenious work.


#172

Bulb Buttons. I have created an application that will install a bulb-buttons device on for each selected bulb. It provides

a. individual buttons for 12 colors and 8 color temperatures (pre-programmed),
b. a button that allows scrolling through the colors,
c. another that allows scrolling through the color temperatures,
d. (for TP-Link devices) a SetCircadian button to start the Circadian mode.

It works with TP-Link and any other bulb with capability.colorControl and capability.colorTemperature.

How it works.

  1. User runs the app and selects the Color and Color Temperature bulbs from the two drop-down lists. For color, you should select both the Color and Color Temperature lists.
  2. The app installs a virtual device with the original bulb's name plus "Buttons".
  3. User can use these buttons in the Hubitat Dashboard. Button definitions are on the GitHub page.

Source Location: GitHub - DaveGut/Hubitat-Blub-Buttons: Buttons for Hubitat Dashboard use to control bulb color and color temperature selection

Example Dashboards (code is at the source location above):

Color;

Color Temperature:


#173

I have 2 HS-110s for my washer and dryer. I can confirm 4.0.04 works great. I am reading power values every minute and use that to drive a webcore piston that reminds me when the washer or dryer cycles are complete (power < 30W for > 2 minutes). Thanks so much for this and all of the TP-Link driver writing, Dave!


#174

Hi folks, I am fairly new to Hubitat. In fact, received my hub yesterday and started with apps and devices. I have both a HS100 and a HS105. I tried to use the instructions on GitHub to install the app and the driver and everything went well. However, when i launch the app, it says zero devices found. Both of my Kasa plugs are on the same network as my hub. Appreciate if someone can help me with what I might be doing wrong (since it is working for everyone else, I am sure I am missing something being a newbie).
Thanks


#175

I need a little more information. Some notes for you:

a. The hub ip address and bulb addresses must indicate the same segment. For example, if a hub is 192.168.0.XXX, the devices must be 192.168.0.YYY. That is used for discovery.
b. The devices must be installed through the Kasa Account to attain their IP addresses. This application does not attempt that.

What I need:

a. Driver version (in the driver code, just after the initial comment section).
b. Application code (same location in app code.
c. The logs for the application during an unsuccessful installation attempt.
d. Hub IP and device IP.

Other option. You could do a manual install (without application). You apparently already have the driver uploaded and saved. The next steps are:

a. Create a virtual device using the driver as the device type in the drop-down menu.
b. Open the device and enter the IP address for the devices in preferences and then save.

Good luck.


#176

Thanks Dave.

I was able to add HS105 using the virtual device method you mentioned but using the same method for my HS100 is still not working. No errors are reported but in the current states, it only lists commsError: none but no switch state.

Anything I need to do differently for HS100.

Hub ip is 192.168.1.91. HS100 ip is 192.168.1.93 and HS105 ip is 192.168.1.107.

Driver version is 4.0.05.

Thanks,

Nitesh


#177

My guess is the ip is incorrect (you may have entered a comma for one of the periods). Check and then:

Turn on logging

Run the HS100 device's page and set preferences to "display Trace Messages" to true (blue). Select Save preferences.

Paste theHS100 log page below.

Dave


#178

HS110 Incorporated into Baseline. The HS110 Energy Monitor Plug has been incorporated into the baseline on GitHub. This includes a fix to the energy today and energy this month feature. The filename is "TP-Link Multi-Plug (Hubitat).groovy",

Known Issue: I do not have a plug, so I need confirmation that this handler works. I have verified it works with a HS105 and HS200 as a switch only and attained expected errors.


#179

Hi Dave, Thanks. Just unplugging the device and plugging it back in did the trick. Thanks for all the help.


#180

So I noticed my token had expired tonight - is that something that's every X days?


#181

Yes. However, you can avoid it by installing the new version which does not require a token at all. It passes the commands directly from Hubitat to the device.


#182

Works incredibly well too btw!


#183

I copy pasted the driver and apps code again (v4) and restarted the hub but ti doesn't find my devices. It doesn't look to be searching for them once it loads the page after clicking 'install kasa devices'


#184

I didn't realise i needed to uninstall/reinstall the app. Working now.