Closed raylu closed 10 months ago
See https://github.com/tronikos/opower/blob/0a7066022a62c3d6abe4c1453c1adc24e1030fde/src/opower/opower.py#L52 and https://github.com/tronikos/opower/pull/29#issuecomment-1668930656
For me, PG&E reports hourly data even though it advertises it supports QUARTER_HOUR. When I download the data with the green button it seems they just divide my hourly usage by 4 and assign 1/4 to each quarter. When calling the API the library already uses with QUARTER_HOUR I get data only for the first quarter of each hour.
Do you get accurate data?
I've omitted it on purpose to avoid any issues to accounts like mine. The Home Assistant energy dashboard only supports hourly data anyway.
oof, I hadn't even considered the possibility that the data was bogus. although this is a different method (downloading the zip rather than requesting usage from /reads
) and I get correct times (every 15 minutes instead of only the first 15 minutes of each hour), the usage is indeed always the same 4 numbers in every hour (0.04, 0.04, 0.04, 0.04, 0.10, 0.10, 0.10, 0.10, 0.05, 0.05, 0.05, 0.05, 0.28, 0.28, 0.28, 0.28)
at the bottom right, PG&E has this button
which shows this interface
which lets you download a zip file of gas and electric data. the gas is still 24h granularity but the electric is the raw 15m data off the smart meter rather than 1h aggregations
I was able to pull the data with just the basic headers
if you wanna get fancier you can pull the data straight out using zipfile: https://github.com/raylu/power/blob/main/get_data.py it also seems to support at least 24 concurrent queries (my code pulls 2010-10 to now, one month at a time)