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:


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:

  1. Click on the arrow next to the main node of the HEM unit (this is the one with the highest WATT and kWh readings)
  2. click on "Advanced"
  3. 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).
  4. Now click on "Scenes" located on the left
  5. Click on "Add Scene"
  6. 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.
  7. click on the arrow next to "Next Step"
  8. click on the arrow next to "Next Step" you should be on Step 3 now
  9. Click on the arrow next to "Execute the LUUP code" which is directly under "Also, execute the following Luup code:"
  10. Copy and paste the code above
  11. Edit 278 to be the same number that you found in (Step 3)
  12. Then click on "Save lua"
  13. 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.