Pulling power info from Southern Company?

@tfc87 @surge919 @enzo2 @TheLinuxTrucker

I successfully got it in a HACS integration:

You can add this: GitHub - Lash-L/southern-company-hacs: Testing of southern company integration

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.

Yep - I learned how to do the direct injection from tibber. You want to use southern_company_hacs:energy_usage and energy_cost, I have that in the official HA documentation, but obviously is not included here.

sensor.monthly_consumption is the data from two days ago, so you could use it, but HA would think that data from two days ago actually happened today and everything would be misaligned. This sensor is used for anything you may need this data for other than the energy panel.

By using the statistic that is directly injected, you will have a blank last ~48 hours (sometimes more sometimes less depending on Southern Company). And it will automatically fill the last 1 year worth of data.

1 Like

Great work! Looks like it’s up and running on my end. I’ll try to dig into the data tonight and see if it all passes the sniff test, although there’s no reason to think it wouldn’t.

How about an Atlanta Gas Light integration now?! Just kidding

Okay one bug I have found that I’ll try to fix and let you guys know when I do, sometimes the api call fails. I’m not sure if it is authentication expiring or what.

EDIT: Pushed a potential fix. Letting it run on my machine, and I will check in a few hours to see if it worked. It’s public if you want to update and try as well

I must have monkeyed something up on the update. When I log in on the configuration the integration bounces between " Initializing " and " Retrying setup: ‘<=’ not supported between instances of ‘float’ and ‘datetime.datetime’ "

Oh that’s annoying.

Basically in the dev branch of home assistant - there’s a change with statistics that isn’t on the current live version. Try again with version 0.0.4. I’m on my phone right now so I can’t test it, but I think that should fix it

Updated to 0.0.4 and now back up and running. Thank you!

Sorry to make you update once more!

One bug introduces another introduces another. By fixing the jwt expiration, I ran into a few issues. Then pypi was down for about an hour.

But, I think now they are all actually solved. Try downloading 0.0.5.

Thank you for helping me test this! Keep an eye on your logs and see if any kind of issues pop up!

On 0.0.5 and so far so good. The most recent data showing is for Feb 11th still but not sure if that’s normal. I see the GA Power site does show the 12th as well.

I’ll keep an eye on the logs

Ga power should only show the 12th for daily information.
Daily information is 24 hours delayed, whereas hourly information is 48 hours delayed @tfc87

I don’t show anything for daily which is why I thought it was odd. Same for weekly but that’s probably a function of it not pulling the 12th yet since it’s the beginning of the week. Maybe it needs a little time to update…I’ll check back.

In Ha energy, if you go select weekly and go back to Feb 5 – Feb 11, you should have data. Let me know if you don’t. Mine shows data for hourly, daily, weekly, monthly, and year.

Correct…to clarify the only thing that looked odd was that there was nothing for the 12th. That is if it was supposed to be just 24 hours delayed. Everything else is populated.

So the sensor data should only be 24 hours delayed (as it uses the monthly data to get the current monthly cost/ projection/etc. , but the hourly data that the actual Energy tab uses is 48 hours delayed.

Oh my bad! You did mention that several times and it didn’t click before for some reason. So far so good then…again, nice work!

There are some errors logged that I can send you. What is the best way to do so?

pm me on this site.

Looking at my logs, if you have the same problem as me, more of the tokens expired than I thought would. I think I’ll just make a change so that every token gets refreshed every 4 hours instead of right now I was just doing the primary one that is used for authentication.

For anyone else following along who wants to test - it looks like the issues are resolved now if you would like to try!

Here is a comparison of my daily power data from the GP site versus my Energy dashboard (this integration). As you can see, they’re roughly proportional… but off by a factor of about 15x. Both in kWh.
image
image