Reset kWh in Vera UI7
To reset kWh, you'll need to create a scene to do so, you can set it to reset every month or based on how you want to do this:
This is the LUUP code that you need to reset kWh to 0:
LUUP Code
local meterID = 278
local kwh = luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "KWH", meterID)
luup.call_action("urn:micasaverde-com:serviceId:EnergyMetering1", "ResetKWH", {}, meterID)
The number 278 needs to be changed to reflect the same device # as your total reading node.
Follow the steps below to add this:
- Click on the arrow next to the main node of the HEM unit (this is the one with the highest WATT and kWh readings)
- click on "Advanced"
- Look at the top for "device #XXX" in the luup code above this is shown as "device #278", mark down the 3 digit number (it should be located at the top of the advanced tab screen).
- Now click on "Scenes" located on the left
- Click on "Add Scene"
- Assuming that you want this to reset on a monthly basis, click on "Schedule" then select Monthly and the day of the month that you want this scene to reset your kWh readings.
- click on the arrow next to "Next Step"
- click on the arrow next to "Next Step" you should be on Step 3 now
- Click on the arrow next to "Execute the LUUP code" which is directly under "Also, execute the following Luup code:"
- Copy and paste the code above
- Edit 278 to be the same number that you found in (Step 3)
- Then click on "Save lua"
- Name your Scene (located at the bottom) then click on Finish.
You should test your scene to determine if it resets your kWh readings to 0.