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

Do you have to pay to get this data? Also, what would my meter ID be, if I’m looking at my meter?

Hey Mike,

Some PPL meters have zigbee radios in them, and you can collect the data locally. I have been collecting my usage for a few years now using a Rainforest EMU2 meter, which was provided by PPL as part of pilot program.

See Home Energy Monitor

The EMU2 is connected to the meter over Zigbee and connected to Home Assistant over USB. There is an integration already which supports the EMU2. There is also an Eagle meter, which I don’t have experience with, but I believe that uses both cloud and local features. I liked the EMU2 since it was 100% local.