Dominion Power (Virginia and North Carolina) use Opower. What is needed to add Dominion Power to the Opower integration?
Would love to see this, too. ChatGPT basically says, āGo there, add the Dominion information.ā Ummmm ⦠No?
Dominion may use opower, but itās not supported by the integration.
Obviously, Dominion Power isnāt currently supported by the integration. Thatās why I asked what is needed to add it. I can login to Dominion Power and see my usage through Opower.
The Opower integration for Home Assistant is powered by the tronikos/opower library under the hood. Its README has instructions for adding a new integration:
To add support for a new utility that uses opower JSON API (you can tell if the energy dashboard of your utility makes network requests to
opower.com, e.g.pge.opower.comin the network tab of your browserās developer tools) add a file similar to pge.py or pse.py or bge.py etc.
When I open up myaccount.dominionenergy.com for my account in Virginia, though, I only see API requests going to prodsvc-dominioncip.smartcmobile.com, not opower.com. @gebjeff are you sure Dominion uses Opower? If thereās a way to confirm this, it might just be a matter of adding the auth + parsing support to the opower library
Did you ever have any luck getting data from your Dominion meter?
Sorry for the delay in getting back to you, I wish that Iād get alerts when someone responds to my posts.
I did some further research and confirmed that Dominion Power VA uses prodsvc-dominioncip.smartcmobile.com and not opower.com. I did find the following suggestion:
- Fork the tronikos/opower this library and add support for Dominion by:
- Reverse-engineering the API calls from Dominionās portal (using browser dev tools).
- Creating a new utility module (e.g.,
dominion.py) similar to existing ones likepge.py. - Implementing authentication and data parsing logic tailored to Dominionās system.
Unfortunately, Iām not much of a coder and I think this is beyond my skills.
Iām happy to report that I created a library and integration for Dominion Energy. I have only used it with Dominion Energy Virginia, so if you are in any of their other areas, itās worth testing. The Readme files should help you set it up. You just need to add the ha-dominion-energy repo as a Custom Repository in HACS and then download the resulting Integration and set it up. This works with your Dominion username and password! It also supports the 2FA flow. Right now it seems like only the SMS 2FA flow is working, just FYI, the email flow wonāt complete.
You can add your energy usage to the HA Energy Dashboard using the consumption statistic (donāt use the sensor statistics).
This was super fun to make. The library, dompower, can also be used as a CLI tool.
Please enjoy. Please create Github issues if anyone finds any bugs.
Im a Dominion customer living in VA and have been waiting for some sort of āOfficialā support. Happy to see someone smarter than me has created something to bridge that gap.
Iāll give this a whirl this weekend and let you know if I find any problems!
Thanks!
How did it go? Iāve been searching for an integration like this for years, but am wary that it will actually work.
Works well. A few bugs prior to 1.1.9 but its great!
thank you! this is working for Dominion Energy in North Carolina.
your github give me an entity without state called āDominion_energy:####_energy_consumptionā. is that normal? what do you use for Grid consumption usage and cost? Iām still getting into HA.
Screenshot
Has anyone in SC been able to get this to work? I have entered my Dominion credentials, which I have tested and allow me to sign into the Dominion Portal, but do not work for the HA integration. Have tried username and email address.
Thank you so much for this integration!
Same issue trying to get Dominion SC to work.
I see requests going to Register My Account | Register⦠; perhaps SC uses a different API? Just started looking into the differences to understand what the integration code is doing vs. what SC website does.
Anyone else try to get this integration working for non-VA Dominion customers?
Just installed v1.3.3 today on my Dominion Energy Virginia account ā working great, including the 60-day historical backfill. @YeomansIII thank you for building this, it fills a real gap since Dominion VA doesnāt use Opower.
Heads up for other VA users: the amount field from the Dominion API (which feeds last_bill_charges, effective_rate, and cost sensors) doesnāt match your actual bill total. I verified against my last 12 statements and found the API consistently excludes three line items from āTaxes, Fees & Other Chargesā:
- County Utility Tax ā flat monthly amount (varies by county)
- State/Local Consumption Tax ā ~$0.00156/kWh
- Deferred Fuel Cost Charge ā ~$0.0029/kWh
Formula:
API amount = Bill PDF total ā County Utility Tax ā State Consumption Tax ā Deferred Fuel Charge
Matched to the penny on all my past 12 bills. The net effect is the effective_rate sensor understates the true all-in rate by ~$0.006/kWh (~4%). Not a bug ā just how Dominionās API reports charges. Worth knowing if youāre comparing against actual statements.
For anyone using this alongside solar/battery integrations: Iād recommend keeping your own rate sensor (derived from actual bills) for Energy Dashboard cost tracking, and using the Dominion sensors for trends and validation.
Great work on this integration ![]()
If you are interested, I did some reverse engineering how the dominionenergysc.com site pulls data. Appears to use bidgely API. I started a project to integrate Dominion SC in a custom integration. You can checkout the Github at GitHub - kilo323/dominion-sc: Dominion client code for energy use + Home Assistant custom component for integration. Ā· GitHub
There are ceratinly bugs that I am in the process of working out. But it does appear to at least authenticate, initiate a 2FA code request, and login once you enter the 2FA. Subsequent runs will use the stored 2FA token when logging in to avoid user interaction.
Iām having good luck with the HACS/yoemansIII repo - at least for a few metrics - like yesterday and last hour usage, and consolidating those into tracking metrics.
However, it seems that every time I reload HACS and/or HA (upgrade/power loss/etc) - the integration fails the re-auth flow using tokens - assuming they are deleted per the threads I have seen.
There does not appear to be any āre-loginā or āre-authenticateā option to āfixā the HACS integration. I have tried the steps to just re-add without changing the integration details a few times, and that fails as well.
I CAN add another device under a different name/metric - which will work with the new auth -however, upload reload/restart - it still fails.
So - I have a few questionsā¦
-
it seems that this is normal behavior? is that accurate? is it based upon time to reboot (e.g. if the reload/reboot takes longer than a few min - I loose the refresh/access token - that doesnāt seem to be likely based upon what I understand about authn/authz in general with similar programs).
-
are the authn/authz tokens/etc stored somewhere locally on the HA device that is getting wiped/deleted that they shouldnāt be?
-
if the above is true - could I set an automation upon āreloadā/ārestartā or even execute every 15m or so - to copy over the tokens to longer term storage - and then copy them back - so the tokens last for longer?
-
has anyone had any luck using any of the other options to access Dominion Energy (VA) in this case - in a longer term fashion - such as using an adjunct machine running docker - such as an Optiplex 5800 - that I could somewhat run as a sidecar - and integrate via MQTT/similar - currently looking to use that adjunct box as a āsidecarā for Frigate NVR that maintains state when the HA reloads regardless.
-
This all said - any overall thoughts, ideas, help/pointers? Iām happy to write code to fix - if it is fixable - or script a workaround and share with the community/repo/etcā¦
Thank you all!
Best,
-Edwin
