Blink integration stopped working and quits 2FA with unexpected error

My Blink integration stopped working all of a sudden. Trying to set it up again ends with an unexpected error after entering the verification PIN. This is what I do: I enter my credentials and receive the Blink mail afterwards. Entering the PIN just aborts the procedure with an error. This is what the log says:

Logger: homeassistant.components.blink.config_flow
Source: components/blink/config_flow.py:41
Integration: Blink (documentation, issues)
First occurred: 22:39:09 (1 occurrences)
Last logged: 22:39:09

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/blink/config_flow.py", line 101, in async_step_2fa
    valid_token = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/blink/config_flow.py", line 41, in _send_blink_2fa_pin
    return auth.send_auth_key(blink, pin)
  File "/usr/local/lib/python3.8/site-packages/blinkpy/auth.py", line 236, in send_auth_key
    json_resp = response.json()
AttributeError: 'NoneType' object has no attribute 'json'

Logger: blinkpy.auth
Source: /usr/local/lib/python3.8/site-packages/blinkpy/auth.py:195
First occurred: 22:39:09 (1 occurrences)
Last logged: 22:39:09

Connection error. Endpoint https://rest-e001.immedia-semi.com/api/v4/account/xxxxx/client/xxxxxx/pin/verify possibly down or throttled.

I experienced similar issues from time to time in the past but setting up a fresh integration usually fixed it. But not this time.

I noticed that the integration didn’t work anymore after I moved my arm/disarm automations to node-red. While doing this I paid attention not to flood Blink’s servers with too many arm/disarm requests. Don’t know if this caused a blocking of my account? The Blink app is still working and I can control my cameras from it.

I’m pretty clueless right now and any help is much appreciated…

Home Assistant Version: core-2021 3.3, supervised on Debian

UPDATE:
I just forced a WAN IP refresh from my ISP by restarting my router and tried again to setup the Blink integration. This time I did not receive a mail from Blink with the authorization PIN and I just proceeded without it and it succeeded.

So all sensors and services are available now but the preview images are not loading. I have an automation for refreshing the preview images once an hour which is now working again as I can see it in the Blink app.

Home Assistant now generates every 5 seconds this log entry:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 496, in get
return await self.handle(request, camera)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 513, in handle
image = await camera.async_camera_image()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 382, in async_camera_image
return await self.hass.async_add_executor_job(self.camera_image)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/blink/camera.py", line 92, in camera_image
return self._camera.image_from_cache.content
AttributeError: 'NoneType' object has no attribute 'content'
1 Like

Ok, after upgrading Home Assistant to core-2021.3.4, deleting Blink and installing it again, everything works again as expected.

Still not sure what the root cause was… But it seems that upgrading to 2021.3.3 caused it as others also started reporting problems with Blink and 2021.3.3.

2 Likes

Thank you, did same and is working now :slight_smile:

Any tips you can share to get this fixed? I upgraded from 2021.3.2 to 2021.3.4 and have removed/readded Blink several times with various combinations of restarting core and the whole host to no avail.
I’m getting the same error:

Logger: aiohttp.server
Source: components/blink/camera.py:92
First occurred: 7:10:19 PM (11 occurrences)
Last logged: 7:10:29 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 496, in get
    return await self.handle(request, camera)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 513, in handle
    image = await camera.async_camera_image()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 382, in async_camera_image
    return await self.hass.async_add_executor_job(self.camera_image)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/blink/camera.py", line 92, in camera_image
    return self._camera.image_from_cache.content
AttributeError: 'NoneType' object has no attribute 'content'

Reinstall fixed it for me too, thanks!

Same problem with core-2021.3.4 upgrade. I deleted the Blink integration and tried to reinstall but can’t connect to my blink account. Any idea?

@smeloche same problem here. Anyone we can ping to put some fire under this?? I’m open to testing new/dev code fwiw.

One way to have the 2FA work is to change password on the phone and before logging in to the app with the new password, login into the home assistant integration first then 2FA should be good.

Hi all , so today out of the blue my blink preview pics won’t load, latest versions , HA all updated , I uninstalled the integration , restarted , reinstalled and still not working .
Now here is the weird thing , I have 7 XT2 cameras , 5 out of the 7 are showing previews, it’s just two where I updated the preview pic in the app. I have also restarted the modem and removed the batteries from those two cameras to see if it would help . No errors anywhere and I’m not doing anything outside of the integration. Any where I can check or anything you can think of? The iso app is working and showing all previews. It’s worked flawlessly for at least 6 months .

Hi - I have the same issue lately. The blink previews show nothing in HA, but in the app everything is working great. Does anyone has an idea how to fix that? Thx

Ive noticed it being a little temperamental in mine , I will generally reload the integration and it works with no issues Not sure if that will help you or not

Thx. With the new version (2022.4.7), it’s now sometimes working and sometimes not. No clue what triggers that.