-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add config flow and 2FA support for Blink #35396
Conversation
- Made sure async services are ok (no I/O in loop) - Fixed config flow (now that I somewhat understand it)
- removed temporary random number appended to device_id
@balloob i hate to tag you, but is there any way i can get this expedited for a review? Blink integration is now broken for everyone without this change |
- Changed strings to common references - Removed async_abort since username is unique id
- Pass in data via import method rather than dict (per review)
- Use entry_id for config entries - Add startup wrapper to minimize API calls during setup - Better handling of invalid auth/2fa keys - Store authtokens and login info for improved setup
The breaking change paragraph needs to be adjusted and say that extra items in configuration.yaml will not be accepted and stop the integration from being set up. They will not be ignored. |
@MartinHjelmare - thanks for the review, much appreciated! Just updated the breaking changes comment. And for general organization purposes (ie. I will forget about all of these unless I write them down), here are things being tabled for future PR's:
If I missed any, just let me know so I can hold myself accountable 😃 |
@fronzbot there's one more comment to address. When can you do that? We're going to cut the beta today very soon and we'd like to include this PR. |
Missed that. I'll get to that within the next hour, should be quick 👍 |
- Will be added to options flow at later time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Great work all! Can't wait to be able to use my blink cameras! |
+1
*Ben Woo*
(212) 724-1188
*this*is*ben*woo*@gmail.com <http://gmail.com/>*
…On Wed, May 13, 2020 at 7:13 AM Darragh Broadbent ***@***.***> wrote:
Great work all! Can't wait to be able to use my blink cameras!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#35396 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK6CPPMRZI6YJL3XYATOGVDRRKTKFANCNFSM4M4PQA5A>
.
|
When are these changes going to get pushed to the clients or is that something I need to do on my server? |
Breaking change
As of May 11, 2020 Blink has removed the old username/password authentication method which means all current Blink integrations will be broken. In order to support this change, a 2FA key must be entered before setup can continue. Some users may not have 2FA enabled on their account yet, but you will still receive an email at login asking you to allow the device to continue setting up. Your current YAML config will be converted to a GUI-based config flow but the only supported entries are
username
,password
, andscan_interval
. All other entries must be removed otherwise the integration will not be configured.Proposed change
Fixes #35214
More information on fronzbot/blinkpy#210
Moving forward, Blink is migrating to 2FA. What this means is that I'll need to remove YAML config at some point, but for now we can migrate users since another endpoint exists that just requires you to click "Allow Device" in your email (no time limit as far as I can tell...which is clearly excellent security 😏). So here is a summary of changes (many changes not mentioned here were made to the core library: fronzbot/blinkpy)
show_advanced_options
forscan_interval
inconfig_flow.py
doesn't seem to work, so I could use some help here. Not sure why it's broken. Given that users can still use yaml config, I figured I can save this as a "to-do" since we've got a bit of a time crunch before this integration breaks for all users.I'm not sure my implementation of the config flow is correct. I know it works, but "works" and "correct" are rarely the same thing 😄. So I appreciate any and all feedback.
Type of change
Example entry for
configuration.yaml
:Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: