Utility Company API

My utility company (PPL Electric) offers usage data on their website down to the 15 minute mark. When searching around it looks like there may be an API to pull this data.

Does anyone else smarter than me know if something like this can be easily incorporated in HA to automatically pull down my electric usage?

https://utilityapi.com/docs/utilities/ppl

It’s really going to depend on your definition of easy. Reading briefly through the docs at your link, it looks like there is a way for you to generate a URL you can use to make an API call to get your utility information. With that URL you could create a Home Assistant RESTful sensor to get the data.

1 Like

Thank you!

Although I do have a technical background, I don’t have much experience with API calls - but I will definitely look into this and see if I can get it to work!

@Magnetic Any suscess?

I too would like to know how this is possible – being in Los Angeles, having both LADWP and SoCalGas added in as utility meters via UtilityAPI would make me pull the trigger on paying for the service.

I have PPL as well, I REALLY hope you get this working.

It looks like UtilityAPI.COM also supports my utility: PSEGLI.

At first glance, I can’t tell whether the type of authentication we’d need as individual users of a utility needing to auth against UtilityAPI.com is really supported.

Anyone dig into this yet?

Interesting. I see my utility company as well. The website doesn’t read like it’s meant for an end user to do their own monitoring though.

Would like to see if anyone can make something of this. My skills are limited but I would try to help or test if wanted.

I am in the same boat. My electricity company Consumers Energy has authorized me to access the data via Utility API.
Have you been successful in implementing it yet?

Looking into this…

The intervals API does provide kWh data for electricity meters:

https://utilityapi.com/api/v2/intervals?meters=<uniquemeterid>

"start": "2023-12-08T00:00:00.000000-05:00", "end": "2023-12-08T01:00:00.000000-05:00", "kwh": 6.426

The issue is gas meters. There’s no interval data - instead, you have to query the bills API and you’re limited to monthly usage:

https://utilityapi.com/api/v2/bills?meters=<uniquemeterid>

"bill_end_date": "2023-12-19T00:00:00.000000-05:00",
"bill_start_date": "2023-11-18T00:00:00.000000-05:00",
"bill_total_cost": 23.64,
"bill_total_kwh": null,
"bill_total_unit": "mcf",
"bill_total_volume": 1.1,

Still working on this

Just checking to see if anyone got this workling

2 Likes