home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.9k stars 30.12k forks source link

No Longer Receiving ComEd Data #110775

Open jonathanbmorley opened 7 months ago

jonathanbmorley commented 7 months ago

The problem

The Opower integration no longer pulls ComEd data.

What version of Home Assistant Core has the issue?

core-2024.1.2

What was the last working version of Home Assistant Core?

No response

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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-02-16 13:10:44.591 ERROR (MainThread) [homeassistant.components.opower.coordinator] Unexpected error fetching Opower data: 400, message='Bad Request', url=URL('https://secure.comed.com/api/Services/OpowerService.svc/GetOpowerToken')
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/opower/opower.py", line 193, in async_login
    self.access_token = await self.utility.async_login(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/opower/utilities/exelon.py", line 209, in async_login
    async with session.post(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1187, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 689, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1059, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://secure.comed.com/api/Services/OpowerService.svc/GetOpowerToken')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/opower/coordinator.py", line 80, in _async_update_data
    await self.api.async_login()
  File "/usr/local/lib/python3.11/site-packages/opower/opower.py", line 201, in async_login
    raise CannotConnect(err)
opower.exceptions.CannotConnect: 400, message='Bad Request', url=URL('https://secure.comed.com/api/Services/OpowerService.svc/GetOpowerToken')
2024-02-16 18:06:36.576 ERROR (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Error fetching openweathermap data: API call timeouted
2024-02-16 18:17:03.151 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 350, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
  Pause on PRI/Upgrade:

    b''
      ^

Additional information

Likely related to ComEd account number changes; just wanted to document

jonathanbmorley commented 7 months ago

Hi folks -- apologies, but I'm not able to add a label for the Opower integration.

home-assistant[bot] commented 7 months ago

Hey there @tronikos, mind taking a look at this issue as it has been labeled with an integration (opower) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `opower` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign opower` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


opower documentation opower source (message by IssueLinks)

Treygec commented 7 months ago

Just chiming in, having the same issue.

Tecnico1931 commented 7 months ago

+1

connor-dobbins commented 7 months ago

I wonder if this issue is related to the Billing Updates they recently made. https://www.comed.com/Pages/BillingUpdate.aspx?utm_source=BillingUpdate&utm_medium=VanityURL&utm_campaign=BillingUpdateVanity

They are issuing new account numbers along with either updating or completely changing their Billing Portal.

ajkerley commented 7 months ago

Same here. Updated/Added opower with new acct#, no new data since 2/13/24, all old data does show under new acct# opower integration...

mdisabato commented 7 months ago

I am having the same problem. However, after deleting and re-entering, it no longer asks for the account number.
No entities are created. No log entries.

tggman commented 7 months ago

Same here. Updated/Added opower with new acct#, no new data since 2/13/24, all old data does show under new acct# opower integration...

@ajkerley do you know of a way to update the account number without removing / re-adding the opower integration ? I'm trying to avoid going down a rabbit hole that could potentially make it harder to fix down the road.

ajkerley commented 7 months ago

@tggman No. At first I just added the new account as a new integration without removing the old account. That's when I discovered that consumption and costs were being duplicated. Removed the old account from the integration, HA still maintains the statistics even after removing the old account from the integration, that is when I had to remove the Energy Electricity grid. The new account does show consumption on Feb 13 where the old account does not, but after that nothing.

tggman commented 7 months ago

Thanks for the added detail @ajkerley. Let's keep our fingers crossed and hope your more recent data starts to show up. The docs say new data may be delayed up to 48 hours but it's not clear if that explains why it hasn't pulled in your data since February 13th. Assuming it hasn't already been 48 hours, Time will tell 🙂

tggman commented 7 months ago

@tggman No. At first I just added the new account as a new integration without removing the old account. That's when I discovered that consumption and costs were being duplicated. Removed the old account from the integration, HA still maintains the statistics even after removing the old account from the integration, that is when I had to remove the Energy Electricity grid. The new account does show consumption on Feb 13 where the old account does not, but after that nothing.

@ajkerley its been 48 plus hours so I was wondering if you've started receiving any data since the account number change -- since Feb 13 ?

murcoil commented 7 months ago

I am having the same issue, but got nothing back from ComEd upon deleting and re-adding the integration. My credentials use my email so there was nothing to update once the new acct numbers were established, and the config flow wouldn't let me add a duplicate.

Mine was stuck at 2/13 for a while too. But now even on ComEd's own usage dashboard I'm only seeing data through exactly one week ago, currently thru 2/22 (today is 2/29).

tggman commented 7 months ago

As of today, this integration started working again after a HAC reboot (rebooted for unrelated work). I made no changes whatsoever to this integration's settings since the account number change. I didn't even enter my new account number.

There is a caveat however. A new set of sensors were created by the integration (oldname became oldname_2) so I lost all of my Opower sensor history. Not a big deal for me since I use a Rainforest Eagle 200 Gateway as my primary device for energy monitoring and only use Opower as a backup.

This is the process I used to "fix" the names of the newly created sensors:

Time will tell if reported values are correct moving forwarded.

Shocktrooper commented 6 months ago

I have tried to add the integration and I am currently getting a 403. I have not set this up previously. Someone that used Coned before had this same issue https://github.com/home-assistant/core/issues/111889

murcoil commented 6 months ago

I didn't change anything (other than deleting and re-doing the config last month), but all the entities started reporting again with a couple of stutters starting on 3/1 and then continuously since 3/5.

mdisabato commented 6 months ago

I deleted and added the integration back in after the ComEd account change. It's been a week with no data. I see random values in the integration entity panel, but nothing on the Energy dashboard.

issue-triage-workflows[bot] commented 3 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ianhyzy commented 3 months ago

I'm also having issue with getting comed data still

mdisabato commented 3 months ago

Same here. This has never worked. Before or after the account number change. I have deleted and re-added the integration several times. I've run Spook and rebooted (not restart, reboot) between attempts. No data ever shows up. The Eve Home outlets are there, but the ComEd data is absent.

Thank you.

Michael

carterbox commented 3 months ago

I installed this integration sometime after Feb 16, 2024 and sometime just after / in the middle of account number transition. It's working for me now, but two things were unexpected when I was trying to set it up.

  1. I needed to disable 2-factor authentication on my ComEd account because Opower cannot do 2-factor authentication
  2. The data from ComEd is not live. It is delayed by up to 7 days(!), so the integration is only good for looking at historic energy use. If I want to get live use, I'll have to get a monitor for my breaker box or one that connects to my meter using Zigbee.

These tips may not be the solution to this issue, but are for others like myself who find this issue while trying to figure out why the integration wasn't behaving as I expected.

murcoil commented 3 months ago
  1. The data from ComEd is not live. It is delayed by up to 7 days(!), so the integration is only good for looking at historic energy use. If I want to get live use, I'll have to get a monitor for my breaker box or one that connects to my meter using Zigbee.

ComEd recently (finally) updated the list of devices approved to talk to their smart meters, so you can actually find them for sale. Emporia Vue works great, integrates nicely with HA for near-real time consumption info, costs about $45 shipped. Eliminates a lot of the need for this integration, beyond knowing what ComEd projects your monthly usage will be.

mdisabato commented 3 months ago

I guess that ends this one. The problem is evidently with ComEd and not HA. I might be looking at the wrong device, but I'm not sure I want that hydra in my breaker box. :) Thanks for the links!

tronikos commented 3 months ago

https://shop.emporiaenergy.com/collections/emporia-products/products/utility-connect There is even an ESPHome mod (search for it) to make it local and have more frequent updates.

mdisabato commented 3 months ago

Ahhhh... Nice. That's more like it. There is an outlet just in back of the meter, and it is close enough the AP and the RPi running HA. Perfect!

Thank you so much!

agoeckner commented 3 months ago

This issue suddenly began happening for me after an unexpected power loss and then restart of Home Assistant.

Everything worked well until the power loss and restart. This is the first reboot of Home Assistant since I installed the OPower integration for ComEd.

edit: Perhaps this is a bug in the OPower library: https://github.com/tronikos/opower

edit2: I think that this issue is related: https://github.com/tronikos/opower/issues/22

edit3: Wait, ComEd's account services are actually down right now... Let's see if everything works once they finish maintenance: image

Gompka commented 4 weeks ago

Mine is broken also, tried to delete and reinstall the opower integration, but now I get a failed to sign in error. 2 factor is off, can log into the website fine.

agoeckner commented 3 weeks ago

Try again today? For reference, mine started working again after ComEd finished their maintenance.

edit: Just checked, and mine is working right now. Was yours previously working, and then it suddenly broke?

Gompka commented 3 weeks ago

Try again today? For reference, mine started working again after ComEd finished their maintenance.

edit: Just checked, and mine is working right now. Was yours previously working, and then it suddenly broke?

Got it to log in today and it seems to be showing the right information after I updated to the newest home assistant. Have to wait to see if energy panel updates.

agoeckner commented 3 weeks ago

Awesome! Just a heads-up, for me the data is always a couple days behind. Scroll back a couple days or look at the monthly view and you'll be able to see stuff.

Have a great Thursday! It's supposed to be nice and warm today; perfect beach weather! :)