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.)
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.
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.
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.
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?
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.
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.
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.