[Deprecated] New TP-Link/Kasa Plug, Switch, and Bulb Integration

I might have missed this, but how should we handle WebCore, tplink smart app, and device handler when converting to the official integration?

I see the steps are:

  • Start the new app and add the devices.
  • You will now be able to access the devices in either new or classic app.
  1. At what step should I remove the tplink beta smart app and device handler?
  2. Do I have to remove all the tplink devices/pistons from WebCore first, then re-add them later or is it a seamless transition?

I can’t answer this.

Do you guys know how can I fix this problem?
On old SmartThings Classic app the power consumption shows right (1700 Wh) but if I switch to new Connect app it shows 1.7MWh which it’s wrong, the scale it’s wrong.It should have been 1.7KWh.

Thanks ,
Vlad

It should also be noted that the Energy Meter capability defines its units as Wh, kWh or mWh. Unfortunately the app UI has a habit of folding the first character to uppercase which makes a mess of SI units, in this case making a difference of nine orders of magnitude.

I believe the default units are supposed to be kWh which would appear to be correct.

It seems like the unit has been set to mWh (or MWh) somewhere on the assumption the value would get magically scaled.

I would contact SmartThings and Support. I believe they wrote the official integration.

@Gutheinz : already done that for the official integration, but no response, no support.It not even works properly, because the official one does not even measure the power, it only has an ON/OFF switch.

@orangebucket yes, it should have been kWh…I don’t have code skills, so i cannot modify myself the DTH…

Oh hang on, this is Dave’s handler isn’t it? It looks like it is pumping out energy usage in Wh without a unit. The new app would probably see that as kWh and perhaps I did it a disservice and it can scale the units automatically and is displaying MWh.

You could try editing line 224 to say

sendEvent( name: "energy", value: wattHrToday, unit: "Wh")

That might perhaps do something.

1 Like

changed.
it’s working!
thank you

Glad you got it fixed. Remember, it is deprecated and will not carry over to when the classic app and IDE die away! I will maintain the current state for errors, so I will update the code when I have a break from my Hubitat and life requirements.

Thanks to everyone for using my Integration. It was a pleasure and I am sorry to see it come to an end!

1 Like

Additionally, since I do not have the skills, etc. if anyone wants to carry this to the future, the GitHub repository is mine and OPEN SOURCE. You have permission to use as you see fit. I also have a lot of node.js tools (old node version) that I can share; including the old manual install that used a stand-alone server. Those can be made available (not all are on GitHub. I have node.js tools like a UPNP discovery tool that allows you to see the UPNP devices on your LAN, a tool to rapidly list Kasa devices, and tools to test the commands I discovered during the investigation process.