Replies: 9 comments 28 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@tronikos - Thanks for your response. I will try option 3, making a custom_component on a test hass instance. I might also try 2. (I had also found your testing HACS repo that now says it is out of date. Side Note: the reasons I'd like to test this out before waiting for 2023.9 is that I have multiple ConEd accounts under the same username. Is that something that is supported by any chance? testing with demo.pyAfter taking a 2nd look at the opower repo, I decided to try to see if I could get Results/exceptions so far -- I think I have to change my ConEd auth methods. Currently it is set to send via SMS an OTP on login. Where would a user find out the utility specific account auth requirements? Just following demo.py's prompts and entering username and password:
Trying to supply the OTP password as the mfa_secret --
|
Beta Was this translation helpful? Give feedback.
-
So I'm guessing the ConEd MFA (aka Two step verification) needs to be "Google Authenticator" for opower, and I have to capture the TOTP secret so that opower can generate the necessary TOTP. When I tried that, the ConEd website said " Error: Please call us at 1-800-752-6633 to complete this request. " Before I call them and try to deal with that, I''ll wait for your confirmation on how the account should be set up. |
Beta Was this translation helpful? Give feedback.
-
The ConEd contributor hasn't updated the documentation yet. Based on the discussion in the PR and the code, my understanding is that only the TOTP secret is implemented. https://github.com/bvlaicu/coned seems to have some relevant instructions:
|
Beta Was this translation helpful? Give feedback.
-
@tronikos - Thanks for your help. After about 20+ minutes on the phone with ConEd, I was able to get them to resolve the error so I could switch my account over to using Google Auth TOTP. The demo script does work and returns data for the active electric meter on my 2nd account. (The 1st account has gas and a disabled electric meter.) So I'm glad to see the demo works and now time to try getting this working with Home Assistant. I get the exception from demo about a mismatched aggregation when it tries to fetch billing data vs. usage data with either the default day or hour. I didn't see a CLI arg to turn that off fetching billing data, but that's certainly not important for a demo script.
|
Beta Was this translation helpful? Give feedback.
-
There is |
Beta Was this translation helpful? Give feedback.
-
Trying to test the updated integration with Home Assistant. Right now I'm going the custom component route. When I try to configure up the integration, I get:
I may be missing something. (I've pulled in the updated components from the two PRs and merged the changes to coordinator.py from both. I'll go back over my steps. Things I've noticed:
|
Beta Was this translation helpful? Give feedback.
-
@tronikos mentioned this in the PR
The re-auth dialog (aka integration needs attention) does pop-up, and I've tried it with the same results, but it also seems to go away. I think it goes away after the update message declaring success happens.
|
Beta Was this translation helpful? Give feedback.
-
Just read up a bit in the thread, was only responding to individual messages before. Since the demo works for you it sounds like this has something to do with the device token - possibly specifically the previously identified issue of TOTP token reuse. I'm theorizing that your HA instance is trying to call authenticate multiple times in quick succession (presumably once for the login dialog, then again for the sync). To get into this state would require two things: 1. your device token cookie is (not) being set/reset/not accepted by ConEd, or 2. HomeAssistant is resetting the cookie/not reusing the same session on its side. This will cause ConEd to re-prompt for 2FA and since its in such quick succession, you'll reuse the same TOTP code and ConEd will reject the second auth attempt. The demo script does the double auth "properly" (tries authenticating twice, reusing the device token once). So now, to resolve this: as an initial workaround, try just reloading the integration. This should trigger the sync without the initial login, thereby only causing one auth flow where the TOTP code should be accepted. What version of HA are you using? |
Beta Was this translation helpful? Give feedback.
-
Very glad to see #13, the implementation for ConEd is already merged.
What's the best way to test it and try it out?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions