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.

1 Like

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.

1 Like

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.

1 Like

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

5 Likes

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

1 Like

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.

3 Likes

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

4 Likes

As far as I know, Dominion Energy does not.

3 Likes

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.

1 Like

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.

1 Like

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?

2 Likes

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-

3 Likes

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.

3 Likes

: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ā€¦
READING HOUSEHOLD WIRELESS UTILITY METERS WITH AN RTL-SDR

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

Hi,
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.
https://www.coned.com/en/accounts-billing/share-energy-usage-data/become-a-third-party

Does this help to get the data into Home Assistant?

4 Likes

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

8 Likes