PhracturedBlue / smartmeter_greenbutton

Python code to read smart-meter data from utility company
GNU General Public License v3.0
33 stars 12 forks source link

How to add more providers? #1

Open ikrowni opened 3 years ago

ikrowni commented 3 years ago

Hello i would like to add mid-carolina electric coop as a provider to use in the new home assistant energy monitoring dashboard. Could you provide some assistance in doing so?

PhracturedBlue commented 3 years ago

Do you know how to download the greenbutton data from your provider? The portland code uses selenium to log into the web page and click the relevant buttons to trigger a download. you will need to determine the process to download your data, and then work on scripting selenium to do it for you. If you get lucky, you won't need to deal with javascript and can find a direct link (probably with some authorization or cookie) and won't need selenium at all.

d4wud commented 2 years ago

@PhracturedBlue I'd be interested in adding support for conEdison. Any tips on how to get started recreating your dev environment?

PhracturedBlue commented 2 years ago

There isn't really much to my development environment. just pip install -r requirements.txt (I typically use a virtual environment)

The code was rewritten to use OAuth (no screen scraping anymore), however, you still need to manually figure out the right URLs and keys. Look at utilities/portland_general_electric.py for some ideas of what you need. Specifically I spend time in Chrome using the network tab in the Inspecter to identify useful calls. you are looking for URLs that pass json data back, and likely contain strings like token or refresh_token

If you can capture the network transactions of you logging in, I can probably help you identify the useful URLs (but make sure to remove any identifying information 1st)

gbdavidx commented 2 years ago

how long does it take for your gas meter to get published and then downloaded?

PhracturedBlue commented 2 years ago

I only have an electric meter. it uploads about data nightly. Sometimes there is additional lag.

Wyrez1 commented 5 months ago

Synergy North in Ontario says it supports it, I can do the legwork if you can point me in the direction of what to ask for.....