corruptbear / my_sdge

compare SDGE plans using your own usage data
22 stars 4 forks source link

SDG&E migrated their app to myenergycenter.com with new output format #1

Open dlarue opened 2 months ago

dlarue commented 2 months ago

exported the data in xmlx file format, opened in LibreOffice then saved as CSV results in: "Name : Fname X Lname",,,, "Address: number STname type, San Diego, CA, zipcode",,,, "Account Number: accNum",,,, "Service Type: Electric",,,, "Rate: Standard - DR-Residential",,,, "Reading Start: 12/31/1969",,,, "Reading End: 12/31/1969",,,, "Total Usage: 5.495",,,, "UOM: kWh",,,, "Disclaimer: The information contained in this file is intended for the personal and confidential use of the recepients(s) name above. Any unauthorized use is prohibited.",,,, ,,,, "Meter Number","Date","Start Time","Duration","Consumed" "0000000","09/04/2024",12:00:00 AM,"Hour","0.34" "0000000","09/04/2024",01:00:00 AM,"Hour","0.35" "0000000","09/04/2024",02:00:00 AM,"Hour","0.35" "0000000","09/04/2024",03:00:00 AM,"Hour","0.34" "0000000","09/04/2024",04:00:00 AM,"Hour","0.31" "0000000","09/04/2024",05:00:00 AM,"Hour","0.35" "0000000","09/04/2024",06:00:00 AM,"Hour","0.35" "0000000","09/04/2024",07:00:00 AM,"Hour","0.25" "0000000","09/04/2024",08:00:00 AM,"Hour","-0.22100000000000" "0000000","09/04/2024",09:00:00 AM,"Hour","-0.57200000000000" "0000000","09/04/2024",10:00:00 AM,"Hour","-1.78300000000000" "0000000","09/04/2024",11:00:00 AM,"Hour","-2.15400000000000" "0000000","09/04/2024",12:00:00 PM,"Hour","-2.12500000000000" "0000000","09/04/2024",01:00:00 PM,"Hour","-2.10600000000000" "0000000","09/04/2024",02:00:00 PM,"Hour","-1.87700000000000" "0000000","09/04/2024",03:00:00 PM,"Hour","-1.39800000000000" "0000000","09/04/2024",04:00:00 PM,"Hour","-0.81900000000000" "0000000","09/04/2024",05:00:00 PM,"Hour","-0.10000000000000" "0000000","09/04/2024",06:00:00 PM,"Hour","0.414" "0000000","09/04/2024",07:00:00 PM,"Hour","0.513" "0000000","09/04/2024",08:00:00 PM,"Hour","0.482" "0000000","09/04/2024",09:00:00 PM,"Hour","0.481" "0000000","09/04/2024",10:00:00 PM,"Hour","0.390" "0000000","09/04/2024",11:00:00 PM,"Hour","0.37"

gets error dump ending in:

/python3.10/site-packages/pandas/io/parsers/base_parser.py", line 969, in _validate_usecols_names raise ValueError( ValueError: Usecols do not match columns, columns expected but not found: ['Consumption', 'Duration', 'Start Time', 'Net', 'Date']
corruptbear commented 2 months ago

Hi, can you export csv directly from https://myenergycenter.com/portal/Usage/Index ?

The csv that I got from there is still identical in format to the existing files before the myenergy migration.

dlarue commented 2 months ago

OMG I'm so sorry, when the instructions said 'green download button' I was literally looking for a green download button similar to the "Comment" button here on github. Yes, the CSV format from the green download button gives me data formatted which works with the tool. Thank you! We are currently on NEM1.0 but next year we get switched to NEM3.0 which is a whole new ball game. Interestingly we're using CCA and it states our rate for the day was $0.24822 but I don't see anything close on the output from the tool. We are still on DR Residential.

python sdge_hourly.py -f Electric_15_Minute_9-4-2024_9-4-2024_20240906.csv -z coastal --pcia_year 2023 -s NEM1.0 starting:2024-09-04 ending:2024-09-04 1 days, 1 summer days, 0 winter days solar setup: NEM1.0 total_usage:-7.7950 kWh CCA-EV-TOU-2 $-3.8886 $0.4989/kWh EV-TOU-2 $-3.7693 $0.4836/kWh CCA-EV-TOU-5 $-3.4297 $0.4400/kWh CCA-DR-SES $-3.3768 $0.4332/kWh EV-TOU-5 $-3.3105 $0.4247/kWh CCA-TOU-DR1 $-3.2653 $0.4189/kWh DR-SES $-3.2576 $0.4179/kWh TOU-DR1 $-3.0846 $0.3957/kWh CCA-TOU-DR2 $-2.4943 $0.3200/kWh TOU-DR2 $-2.4037 $0.3084/kWh