I’m not with Southern Companies, but I’ve been watching for a similar solution.
There’s no way to get my smart meter data from my power company’s web site without credentials. Even with them, it’s pretty primitive.
I see the folks over in the UK and Europe seem to have standard interfaces they can use to access their meter data, but I’ve never heard of anyone being able to do that in the US.
I got as far as installing this add-on and it’s running, but I’m not getting anywhere for Nicor Gas, a Southern Company entity.
I had to add init: false to the yaml and json and re-install. It’s now running on HA on port 8000, but I don’t see a way to interact with it.
Logs suggest a failure:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started [email protected] start
node index.js
Starting listener on port 8000.
/node_modules/southern-company-api/dist/main.js:133
throw new Error(Could not find ScWebToken in response);
^
Error: Could not find ScWebToken in response
at SouthernCompanyAPI. (/node_modules/southern-company-api/dist/main.js:133:23)
at Generator.next ()
at fulfilled (/node_modules/southern-company-api/dist/main.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
I don’t have the patience to continue from here, but if anyone else has a clue, I’m all ears.
In all honestly I don’t remember how far I got, but I remembered being very confused about the order of operations of those calls and the library relying on really specific casing on certain variables. Seems that PR died on the vine
My uneducated guess would be that Nicor Gas either implemented different APIs or there is something else that has changed. We would likely have to extend the original library to support a Nicor specific API or flow.
If you have any interest - I am currently developing a integration for Southern Company in core.
I’m building the api in python using information from the original southern-company-api in ts.
If you’re still interested, I would love having someone else who is able to test/ help develop. I use Georgia power, so it would be good to have another test case from a different southern company company.
I am also a Georgia Power Customer and would love to help in any way that I can. My python skills are not great, but I can fumble through. If nothing else, I would be willing to help test anything you need. Feel free to PM me or reply. I’m also on the Discord, but not super active.
Awesome!
I got it all functional, but my code is dirty, I have very limited error checking, and it could definitely use a bit more data as right now it only has statistics and no sensors. it also doesn’t have much testing at all. basically, it will not get passed the PR review cycle in its current state.
@enzo2@surge919 Wont be today. I tried getting it as a custom hacs integration, but when I run it it has a config flow error that does not happen when it is not a hacs integration. Not sure what to do and don’t have the time to debug it right now.
And it should work! Let me know any issues you have here, and if after a few days everything works as expected, you should comment on the pull request: https://github.com/home-assistant/core/pull/87748 stating that it works for you. Would probably help HA maintainers when they do their next review.
Thanks, got it working! For the current energy usage, e.g. Energy dashboard, should we be using the ‘statistic’ value (southern_company_hacs:energy_usage_xxx…) or the sensor.monthly_consumption ?
The integration seems to directly inject the ‘statistic’ into HA without a corresponding sensor – the source is listed as the integration itself.