Python script to perform 'Update' of Energy Usage

Posted on
Sat Dec 03, 2022 10:25 am
rbdubz3 offline
User avatar
Posts: 224
Joined: Sep 18, 2016
Location: San Diego, CA

Python script to perform 'Update' of Energy Usage

Does anyone know the python call to forcibly update the energy usage for Z-wave devices? I've found the 'indigo.device.resetEnergyAccumTotal(devId) ' call but not the update command.

Thanks in advance!
Attachments
zwave-device-update.png
zwave-device-update.png (70.55 KiB) Viewed 460 times

I automate because I am lazy :D - My Plugins: https://forums.indigodomo.com/viewforum.php?f=309

Posted on
Sat Dec 03, 2022 12:20 pm
pnm offline
Posts: 56
Joined: Dec 03, 2014
Location: Yorkshire, UK

Re: Python script to perform 'Update' of Energy Usage

Not sure if this helps but the code to do a Status Request is indigo.device.statusRequest(<devid>) which may trigger an Update.

Posted on
Sat Dec 03, 2022 3:20 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Python script to perform 'Update' of Energy Usage

I was just looking into this myself. There isn't a direct call to update energy usage like the reset command. The best bet is to send the status request command which will trigger an update to that value as @pnm suggested.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Dec 03, 2022 7:01 pm
rbdubz3 offline
User avatar
Posts: 224
Joined: Sep 18, 2016
Location: San Diego, CA

Re: Python script to perform 'Update' of Energy Usage

thanks for the inputs.. I did try the status request call but noticed that the call is asynchronous. So I'll need to do some wait/sleep/loops in order to capture the updated energy usage values. A bit more work but doable

I automate because I am lazy :D - My Plugins: https://forums.indigodomo.com/viewforum.php?f=309

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests