Why buy energy monitor devices -- Use data from Smartmeter!

I rewrote the greenbutton fetch code to use Oauth/bearer-tokens here: GitHub - PhracturedBlue/smartmeter_greenbutton: Python code to read smart-meter data from utility company. It requires a one-time manual configuration to retrieve the account-id and refresh-token, but is then much simpler and more reliable once those have been obtained.
I looked into using rtl-amr, but my meter uses the FlexNet protocol which (a) apparently transmits infrequently making it hard to decode, (b) is encrypted, and (c) likely only has 1kW/hr resolution regardless. Iā€™ve been using a homemade sensor to read instantateous usage using the IR LED (something like this: GitHub - foxharp/irmetermon: AVR-based monitoring of home electricity consumption). It works pretty well, but it was very finicky to get it to work in all lighting conditions.

Maybe someone will find the above useful.

3 Likes

Looks like PECO in Pennsylvania uses the same green button approach. It uses the <domain>.opower.com and Google identity API. I will do some digging to see how similar the access is. Is there a way to run your Python code in isolation outside of Home Assistant for testing?

The code in my repo actually has nothing to do with homeassistant. I use it to download the greenbutton data and import it directly into influx, but the downloader runs independently of the importer, so you can just run the download part and itā€™ll dump out the raw data.

Would love to use this too

1 Like

+999 from the massive pool of those in NYC

6 Likes

Looks like PECO in Pennsylvania uses the same green button approach.

Did you have any luck getting their data?

This has been an as time permits project. I have the data downloading from PECO, I am at the stage of playing around with long-term statistics to get the information presented correctly in the energy dashboard for both electricity and gas.

4 Likes

Posting here from Michigan where Consumers Energy offers GreenButton data. Seems like more providers around the US are picking this up.

PECO seems to have shuffled some things around on the back end and are using Azure for OAuth now, which I couldnā€™t figure outā€¦ but I did manage to cobble together a python script which uses selenium to grab a .zip with the last 30 daysā€™ energy usage in csv.

Donā€™t have much of an idea what Iā€™m doing with python OR selenium, so this is probably pretty messy but itā€™s working over here. Now, to try and do some things with the actual data it spits outā€¦

1 Like

I agree that trying to find a use for the data is the hard part. My power company nominally supports Green Button, but I have to log on and navigate to the data, and then itā€™s at least 24 hours old. I do that every so often. Iā€™ve got lots of data, going back years. I never even look at it.

Obviously the better solution would be to receive real-time data directly from the smart meter. I donā€™t think thereā€™s enough demand for my power company to invest in supporting that. They already have the conspiracy theorists making noise about the smart meters. They donā€™t need the security vulnerabilities that allowing customers to access them would bring. One of these days Iā€™ll set up some CT clamps and monitor it myself.

ConEd smart meter pushes data every 15 minutes, it has 3rd party developer API but no one seems interested to work on it.

5 Likes

Has anyone made any progress/gotten this to work yet? Just curious if there is a solution out there somewhere. I use ā€œcomedā€

5 Likes

Iā€™m interested in this as well. If anyone has something in-progress that they could share, Iā€™d like to help out.

@PhracturedBlue @flufftronix @hindseb @DanN Thank you for your contributions.

Iā€™m mainly posting here so that anyone with coding experience who uses https://www.butlerrural.coop can google and find this important thread. For those of us in Ohio (USA) in Rural areas (most of the state) we are part of a Touchstone energy cooperative. Smarthub is the name of the account management tool and Android application that allows browsing of energy consumption history. Downloading of it can be done with the download Green Button data option in that tool.
I do have some python coding experience and will look into the git repos of anyone that posts links here to see if I can help. I can certainly help with testing pieces of it. Perhaps helping with the documentation is a way I can also help. I can see there being several key tasks here that could be broken out for volunteers.

  • Integration into HA for getting credentials
  • getting the data from Green Button
  • processing the data
  • pushing the data back into the HA architecture
  • others?
1 Like

So, I live in Virginia and have DOMINION energy as well. We recently had a smart meter installed. After the system was fully switched over, I now have a detailed usage menu option in my account online. There I am provided with the ability to download my detailed usage up too the previous half hour mark. I can pull 30 minute usage history in txt, csv, xls, and xml formats. Iā€™m pretty sure that the link to download this data included a unique key to be able to bookmark the link and pull it up later and it show the current data. I do know that the usage history works with other third party ā€œgreen buttonā€ web applications. Would there be a way to pull this into home assistant to review historical energy usage data?

1 Like

Iā€™m in VA as well on the Dominion grid. It would be great if we could somehow pull the information from the dom website to collect consumption information.

2 Likes

Nova Scotia Power also adheres to the ā€œGreen Buttonā€ standard and many other Canadian provinces. Including the most populous one, Ontario.

In fact, the natural gas provider in Ontario ALSO supports access the Green Button data.

So adding support for this would be a HUGE win for Canadians.

1 Like

Since opower was mentioned earlier in this thread and more than 175 utilities use them, if the energy dashboard of your utility is hosted on opower.com, e.g. pge.opower.com, then take a look into adding support in my library:

Integration is being added in:

Documentation in:

1 Like

Since the above PRs havenā€™t been reviewed yet I created a custom integration. Itā€™s available at

Currently it supports the following utilities:

  • Pacific Gas & Electric (PG&E)
  • Puget Sound Energy (PSE)
  • Exelon subsidiaries
    • Atlantic City Electric
    • Baltimore Gas and Electric (BGE)
    • Commonwealth Edison (ComEd)
    • Delmarva Power
    • PECO Energy Company (PECO)
    • Potomac Electric Power Company (Pepco)

Interesting. My energy company is based in London, UK but we are in Massachusetts.
What specifically should I ask them?