Reset "energy usage"

Posted on
Fri Jan 14, 2022 7:46 am
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Reset "energy usage"

Hello,

is there anyone having a Python script to


  1. reset the energy usage of each Virtual Group Energy Meter,
  2. reset the energy usage of each Virtual Device Energy Meter,
  3. reset the energy usage of each other device logging the energy usage?

Thanks in advance for supporting me!

Best regards

Bildhauer

Posted on
Fri Jan 14, 2022 12:45 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Reset "energy usage"

I believe this will work on all of them:

Code: Select all
indigo.device.resetEnergyAccumTotal(devInstanceHere)

Image

Posted on
Mon Jan 24, 2022 12:25 pm
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Reset "energy usage"

Thx.

But this only work for one device of this kind. I'm having approx. 30. Is there an "Loop" one can build to do by indentiying this calls of devices?

Best regards!

Stephan O. Merckens

Posted on
Mon Jan 24, 2022 4:43 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Reset "energy usage"

Yes, try:

Code: Select all
for dev in indigo.devices.iter("props.SupportsEnergyMeterReset"):
  indigo.device.resetEnergyAccumTotal(dev)

Image

Posted on
Sat May 21, 2022 11:40 am
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Reset "energy usage"

Thanks a lot!

Before trying it one question: after this kind of reset the "energy usage" is set to 0?

Thanks in advance

Bildhauer

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest

cron