core: Opower not working for PSE
The problem
Continually recieve internal server error when setting up Opower for PSE. Log message is Config entry 'Puget Sound Energy (PSE) (sethrait)' for opower integration not ready yet: 500, message='Internal Server Error', url=URL('https://pse.opower.com/ei/edge/apis/DataBrowser-v1/cws/cost/utilityAccount/<ACCOUNT_NUMBER>?aggregateType=day&startDate=2022-07-10T00:00:00-07:00&endDate=2023-07-08T00:00:00-07:00'); Retrying in background
What version of Home Assistant Core has the issue?
core-2023.8.4
What was the last working version of Home Assistant Core?
NA
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Opower
Link to integration documentation on our website
https://www.home-assistant.io/integrations/opower
Diagnostics information
Logs from running opower’s demo.py locally (with certain values redacted):
python : DEBUG:C:\Users\sethr\repos\opower\src\opower\opower.py:Fetching: https://pse.opower.com/ei/edge/apis/multi-account-v1/cws/pse/customers?offset=0&batchSize=100&addressFilter= At line:1 char:1
- python src/demo.py --utility pse --username sethrait --password 8wEiT …
-
+ CategoryInfo : NotSpecified: (DEBUG:C:\Users\...&addressFilter=:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError
DEBUG:C:\Users\sethr\repos\opower\src\opower\opower.py:Fetched: { “customers”: [ { “id”: REDACTED_ID, “uuid”: “REDACTED_UUID”, “legacyOpowerId”: “43-1-5ff8aa”, “accountNumber”: “REDACTED_ACCOUNT_NUMBER”, “accountName”: “REDACTED_ADDRESS”, “address”: { “uuid”: “", “streetNumber”: "”, “streetName”: “****”, “subpremise”: null, “postalCode”: “*****”, “city”: “SEATTLE”, “country”: “US”, “state”: “WA” }, “type”: “RESIDENTIAL”, “utilityAccounts”: [ { “id”: REDACTED_ID, “uuid”: “REDACTED_UUID”, “utilityAccountId”: " REDACTED_ID_2", “utilityAccountId2”: null, “servicePointId”: REDACTED_ID_3, “meterType”: “GAS”, “preferredUtilityAccountId”: " REDACTED_ID_2", “readResolution”: “QUARTER_HOUR” } ] } ], “offset”: 0, “batchSize”: 100, “total”: 1 } DEBUG:C:\Users\sethr\repos\opower\src\opower\opower.py:Fetching: https://pse.opower.com/ei/edge/apis/bill-forecast-cws-v1/cws/pse/customers/REDACTED_UUID/combined-forecast DEBUG:C:\Users\sethr\repos\opower\src\opower\opower.py:Fetched: { “isValidUser”: true, “totalForecast”: { “meterType”: “COMBINED”, “startDate”: “2023-09-02”, “endDate”: “2023-10-01”, “currentDate”: “2023-09-05”, “daysInPeriod”: 30, “currentDay”: 4, “daysLeftInBill”: 26, “forecastedUsage”: 114, “forecastedCost”: 0, “typicalUsage”: 169, “typicalCost”: 0, “budgetBilling”: false, “costToDate”: 0, “usageToDate”: 8, “currencySymbol”: “$” }, “totalMetadata”: [ “NO_FORECASTED_COST”, “ESTIMATED_PREVIOUS_BILL” ], “accountForecasts”: [ { “unitOfMeasure”: “THERM”, “meterType”: “GAS”, “startDate”: “2023-09-02”, “endDate”: “2023-10-01”, “currentDate”: “2023-09-05”, “daysInPeriod”: 30, “currentDay”: 4, “daysLeftInBill”: 26, “forecastedUsage”: 9, “typicalUsage”: 14, “budgetBilling”: false, “usageToDate”: 1, “currencySymbol”: “$”, “preferredUtilityAccountId”: “REDACTED_ID_2”, “accountUuids”: [ “REDACTED_UUID” ], “isSolar”: false } ] } DEBUG:C:\Users\sethr\repos\opower\src\opower\opower.py:Fetching: https://pse.opower.com/ei/edge/apis/DataBrowser-v1/cws/cost/utilityAccount/REDACTED_UUID?aggregateType=day&startDate=2023-08-29T00%3A00%3A00-07%3A00&endDate=2023-09-06T00%3A00%3A00-07%3A00 DEBUG:C:\Users\sethr\repos\opower\src\opower\opower.py:Fetched: { “servicePointId”: “6001816530”, “utilityAccountUuid”: “REDACTED_UUID”, “unit”: “THERM”, “siteTimeZoneId”: “America/Los_Angeles”, “reads”: [ { “startTime”: “2023-08-29T00:00:00.000-07:00”, “endTime”: “2023-08-30T00:00:00.000-07:00”, “value”: 0, “readType”: “ESTIMATED”, “providedCost”: 0, “readComponents”: [], “isPeakPeriod”: false, “rebateAmount”: 0, “milesDriven”: 0 }, { “startTime”: “2023-08-30T00:00:00.000-07:00”, “endTime”: “2023-08-31T00:00:00.000-07:00”, “value”: 0.22, “readType”: “ESTIMATED”, “providedCost”: 0, “readComponents”: [], “isPeakPeriod”: false, “rebateAmount”: 0, “milesDriven”: 2 }, { “startTime”: “2023-08-31T00:00:00.000-07:00”, “endTime”: “2023-09-01T00:00:00.000-07:00”, “value”: 0.34, “readType”: “ESTIMATED”, “providedCost”: 0, “readComponents”: [], “isPeakPeriod”: false, “rebateAmount”: 0, “milesDriven”: 4 }, { “startTime”: “2023-09-01T00:00:00.000-07:00”, “endTime”: “2023-09-02T00:00:00.000-07:00”, “value”: 0.48, “readType”: “ESTIMATED”, “providedCost”: 0, “readComponents”: [], “isPeakPeriod”: false, “rebateAmount”: 0, “milesDriven”: 6 }, { “startTime”: “2023-09-02T00:00:00.000-07:00”, “endTime”: “2023-09-03T00:00:00.000-07:00”, “value”: 0.64, “readType”: “ESTIMATED”, “providedCost”: 0, “readComponents”: [], “isPeakPeriod”: false, “rebateAmount”: 0, “milesDriven”: 8 }, { “startTime”: “2023-09-03T00:00:00.000-07:00”, “endTime”: “2023-09-04T00:00:00.000-07:00”, “value”: 0, “readType”: “ACTUAL”, “providedCost”: 0, “readComponents”: [], “isPeakPeriod”: false, “rebateAmount”: 0, “milesDriven”: 0 } ], “seriesComponents”: [], “ratePlans”: [] }
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: open
- Created 10 months ago
- Reactions: 2
- Comments: 38 (12 by maintainers)
I noticed I was running the linuxserver/version of the container so I switched to the official one today. Unfortunately, the same problem persists.
Core version is 2024.1.2
Are there any logging/debug options I can enable to get more information? Is there any way to verify the OPower version?
If I run the stand alone OPower (https://github.com/tronikos/opower) I get usage data:
NOTE: We don’t use gas very often anymore so the 0’s are normal for us.
If I copy demo.py from the OPower project for the Home Assistant container to use and run OPower directly from a bash terminal window, I get usage data. So I think this is a bug in the HA integration.
(I have no idea what’s with the exception at the end, it doesn’t occur in the HA container run.)
Gave it another try today! it’s working!
This is likely the same as https://github.com/tronikos/opower/issues/32 and we need to reduce the
max_request_days