How to (remotely) access energy usage information?

Posted on
Thu May 14, 2020 1:51 pm
dcjackson offline
Posts: 6
Joined: May 29, 2016

How to (remotely) access energy usage information?

I've purchaed/installed/configured a number of Z-Wave on/off devices that have integrated energy usage monitoring.

I can see the resulting energy data reported on the Home -> Devices -> some-device, and then on Device Details
I see information like:

    Current Load
    Total Usage
    Last Reset
    Reset Date
    Last Update

I would like to write some sort of script or program that queries Indigo to retrieve this data

From the REST API, I see typeSupportsEnergyMeter, but AFAICT this is not maintained, and doesn't provide the info I need.

Is there a way to get this from the API?

If not, what other methods might I use to retrieve this data, must I write a Python script using IOM?

Looks like this data is available from a connected Postgres database (I use the SQL Logger),
any reason I can't get the data there? (I have extensive experience writing programs that interact with Postgres databases....)

Posted on
Thu May 14, 2020 8:27 pm
matt (support) offline
Site Admin
User avatar
Posts: 19960
Joined: Jan 27, 2003
Location: Texas

Re: How to (remotely) access energy usage information?

The current RESTful API is pretty limited but we are hoping to improve it (pretty high priority actually). You don't currently have access to the energy states through it. However, you can mirror those state values into Indigo variable values then you can access the Indigo variable values via the RESTful API.

There is an action that makes mirroring Device states into Variable values pretty easy: Variable Actions -> Insert Device State into Variable. You can create a Trigger for whenever the Device state changes and just run that action on it to mirror it into a variable value. You'll need 1 Trigger (and unique Indigo variable) per state you want to mirror.


Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests