Reset power meter Telldus Mini

I want to reset the powermeter on my Telldus Mini plugin switch. I got a lua script from Telldus that works on their Telldus controller:

Now I wonder if it is possible to modify that script and use with my Vera Plus?

/Mats

You should not need to. There is a ResetKWH command in the vera. Did you try it?

Didn´t know about that command, could you please show me?

It isn’t straightforward from the UI7 menu and I can’t quite remember if I ever did it that way.
I used a scene to do it. See below. It is fairly straightforward from ALTUI which exposes the device commands though.

local meterID =266
local kwh = luup.variable_get(“urn:micasaverde-com:serviceId:EnergyMetering1”, “KWH”, meterID)

luup.call_action(“urn:micasaverde-com:serviceId:EnergyMetering1”, “ResetKWH”, {}, meterID)

Is this correct or should I replace all “meterID” with 266 which is the ID of my plug?

This alone should resets your plug’s meter

local meterID=266
luup.call_action("urn:micasaverde-com:serviceId:EnergyMetering1", "ResetKWH", {}, meterID)

Edit. Changed the quotes… hate these copy paste modifications…

1 Like

Mission accomplished!

Just a minor problem with the script first, just got errors due to the ”!! Had to change them to ", didn´t notice the difference first.

Didn´t create a scene, worked fine to use Develop apps, Test Luup code.

Started to create a scen in AltUI and the advantage was that when the script were wrong you got a hint which part of the script that was wrong.

Many thanks for your help!