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

Rather then having to buy any energy monitoring devices, It would be great to have better integration with the smart meter the electric company already has in place.
My electric provider releases data daily in .xml format, or through the Green Button initiative.

GBD Alliance has a large number of utility members and I think it would be a great feature/integration.
(Even if the data is 24 hours old, it would still be valuable to me.)

HA 2021.8 is about energy management, and its a great time to revisit past suggestions

Perhaps this isn’t a feature, and its a community integration? (I’m still somewhat green with HA.)

Thanks for reading!

To answer your question, at least in the US, electrical providers have monopolies on their service areas and will not provide services like this alliance that do not benefit them financially.

My question was referencing this post, and if placed in correct thread. I wasn’t sure if this was a feature request, or something a community member would create.

Wish I could help but it’s above my skills.

I do wish there was some service like this in the US but I do not expect it anytime soon.

It seems that priority on excellent customer care and service is a rare commodity these days.

I would love to be able to add information from green button into home assistant


In the UK changing supplier would break this. I’d suggest it’s best to have whole home power use under your control. I use a shelly and clamp on the incoming to the dis board. Is live data and local

Here’s the API documentation for Green Button. I’m also not a dev, so I’m not sure I can be much help, but I was hoping the HA devs might take notice. There’s a significant number of companies that participate with varying levels of integration. EDIT: the expansion of energy aggregation as well as renewable options has pushed the connect my data feature, which may be an avenue that Home Assistant could pursue as an authorized 3rd party.

1 Like

Strange. My large, US electrical provider does let me pull data directly from my smart meter.

1 Like

As far as I know, Dominion Energy does not.

Did a quick google search and came up with this, not sure if this is the Dominion Energy you are referring to but it appears you’re able to download your usage. It is most likely a xml or other database file.

"…also help customers manage their energy use by providing daily energy information through Manage Account.

It is, thanks. I was not aware of that.

All I see in my account is total for the statement & average daily usage. It appears they just do periodic readings wirelessly here. We are rural.

EDIT: I found a map and we are not even in their future plans.

I live in CO, USA. Our energy profider, xcel energy says they do support the “green button”. So add me to another US customer that could use this info.

I just got me smart meter about a week ago, and I am still trying to find the best way to read it. This would be a useful solution. Anyone interested in spelunking it with me? My expertise is not in web, but in C++/Python/Linux. So things like Oath2 take me a long time to get through. And I don’t know HA integrations/Add-ons.

My first question is, how far has anyone taken this already? Has anyone stumbled upon someone who has tried something like this?

My second question is, there is language on the green button site that says, "These APIs allow application developers full access, in Green Button Format, to Energy Usage Information for the purpose of developing new Green Button Applications. ". Um. What about open source, DIY nerds?

There is a user post here GreenButton Smartmeter integration
with a link to this github repository. https://github.com/PhracturedBlue/smartmeter_greenbutton
but it looks like the user/repository is no longer active.

There are a few others on git (https://github.com/search?l=Python&q=greenbutton&type=Repositories)

This one looked like it might be worth quick skim https://github.com/asciiphil/greenbutton-python/tree/master/doc

Hope this helps-

1 Like

I had never seen the GreenButton API documentation, that is interesting. The big problem I had with GreenButton was that my provider made it difficult to get access to without screen-scraping which was very unreliable. If OAuth2 can be used to bypass the provider’s website, it would greatly improve the robustness of my project.

I guess it is time for a revisit.

1 Like

:tada: An ally! Not only that, you’ve already done a lot already.

I want to help. I don’t want to step on your toes. I will have time in the next few days to take a closer look. I have been trying to get the SDR/rtlasm thing working and I am running out of threads to pull on that front.

I’ll take a look at the repo you have that scrapes the data. And some of the other ones in github look like they have useful bits too. If you want me to do something specific, let me know.

Will each of us have to get our own “third party developer” key/approval? Or is there some way to make a single “third party developer” for everyone that uses HA?

I poked about a bit on my provider. At 1st glance, it appears that they do use OAuth2 for login, and an API of sorts to retrieve green-button data. At least for my provider, the API itself seems to be a mess, but assuming the OAuth process can be navigated, I am able to retrieve the GreenButton data from the API using only a Bearer token.

Our provider seems to use <subdomain>.opower.com to access account/usage info. I found this: https://github.com/bvlaicu/coned for ConEdison (not my provider) that also seems to use similar looking APIs at opower.com, so it may also be possible to generalize fetching the data to some extent. However, looking over that project, they weren’t able to manage the login without selenium (or in their case pyppeteer).

As for the Authentication, I didn’t play with it too much yet, but it looks like it uses:
https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword followed by a couple of direct queries to generate the bearer token. I have limited history with OAuth2, but past experience has been that once you have the base and refresh tokens, you can request updated tokens at will. I’ll need to do some experimentation to see how that goes. My experience with OAuth has been that it is often easiest to snoop these tokens from a browser-based login the 1st time, since there is often MFA or Javascript shenanigans going on with the initial login.

The summary is that login still seems to be the the challenging bit, and it is likely to be provider specific (even if your provider uses the opower.com api), meaning a general-purpose solution doesn’t look reasonable coming at it this way, but at least for my power company, I have hope I can do away with the screen-scraping stuff.

I don’t think providing GreenButton data means that providers necessarily have a standard API for access, though I’d love to be proven wrong.

I should also note that the API that my browser uses to download GreenButton data looks nothing like the API shown at http://greenbuttonalliance.github.io/. I did find this link though (Green Button - Connect My Data (CMD)) that shows that there is a ‘GreenButton Download My Data’ and ‘GreenButton Connect My Data’. The GB API seems to be for the latter, and my provider only provides the former. I’d be curious if other users with GreenButton access have ‘Download My Data’ or ‘Connect My Data’ access

@jeffeb3 - I just moved to northern CO and I’ve got Xcel as well. I was able to find the green button connect but the activation flow appears to be horribly broken for me. I’m hoping to go digging into the API in the next couple weeks and see if I can find anything interesting out.

Many utilities use “smart” meters that send out radio frequncy usage data constantly.
I used this (and this) to read mine…

HA Addon Receive wireless sensor data via an SDR dongle and rtl_433

I support the initiative to use the data directly from the electricity provider instead of buying additional devices.
My electricity provider in New York, Consolidated Edison (ConEd), offers to share the data with 3rd parties. To do so, I have to log in to the customer portal and authorize the 3rd party.

ConEd published the following guide to becoming a 3rd party provider to receive data.

Does this help to get the data into Home Assistant?

1 Like

I am also a ConEd customer. Looking to itegrate it to my HA. If you find one pls let me know.

1 Like