Blink notification isn't working

Great improvement!
I started to fiddle around with all the files when I realized the PR is already merged and in the newest dev version… :smiley:
Tested so far the trigger_camera and blink_update service and they work perfect, very fast and reliable.

I had problems with the motion sensor which updated very slow (probably with the next auto update according to scan_interval), though (blink ‘name’ Motion Detected on/off).

For now I use a Xiaomi Motion Sensor to trigger the camera at the front door to take a picture and with a small delay the manual update.
When the bell is pressed Ill have the picture downloaded and forwarded with telegram.
The picture is on my phone after 6s. Maybe its possible to get the time down to 4s but I have to play a little bit more with the camera to see what is actually possible.

Cheers and thx for the great update!

@fronzbot Thanks so much for the blink update. I was looking through the docs and can’t seem to find how to send a service to arm or disarm blink. Did I miss something?

You didn’t miss anything, I failed to mention it in the documentation. The new blink platform uses the Alarm Control Panel component, so you should have a device in homeassistant called alarm_control_panel.blink_sync. You can arm and disarm the whole system that way. Also, previously I think I had switches to arm/disarm individual cameras but I removed that since the camera component has a service specifically for that called enable_motion_detection more info here. SO you can individually enable/disable cameras with a service call and then arm/disarm the whole system from the control panel (but you can only use ALARM_ARM_AWAY, the “Home” version doesn’t map to anything).

Let me know if you have any other questions. I’ll try to get a PR into the docs to call this info out.

2 Likes

Awesome. Thanks. I will play around with it.

Since yesterday the component will not load anymore. On HA start Ill get the following error:

blink: Error on device update!

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 251, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 349, in async_device_update
await self.hass.async_add_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/alarm_control_panel/blink.py”, line 72, in update
mode = self.sync.arm
File “/usr/local/lib/python3.6/site-packages/blinkpy/sync_module.py”, line 94, in arm
return self._summary[‘network’][‘armed’]
TypeError: ‘NoneType’ object is not subscriptable

No blink devices are loaded, no camera/sensor/alarm panel.

this is happening to me too. dont have any solutions, but would be very interested in finding one. thank you for any help anyone can give.

and

My Blink cameras and sensors all just came back up after a restart. i was not doing anything related to Blink, havent changed anything in my config. I was updating an unrelated DHT sensor and after restart, all my Blink components were back. Not sure what caused it to happen, but thanks to all yall who understand how the code side of all this works and spend your time working on it so people like me can enjoy this stuff.

@fronzbot Firstly, thanks for this component, great work.

Just wanted to share an issue, apologies, not sure if this needs to be raised elsewhere, but in testing this since the latest 80.1 update, I’ve noticed that HA will only display a camera image in the HA front end IF I have a video stored on the blink server.

I have the following group setup to display the last image and an automation that takes a snapshot each hour. The snapshot works fine and updates the camera image in the Blink app, but was never displayed in HA. Once I armed the cameras and then caused a video to be stored on their servers, I was able to get the images to display in HA.

Let me know if you need any further updates or information.

group:
blink_system:
name: Blink Cameras
icon: mdi:cctv
control: hidden
entities:
- alarm_control_panel.blink_sync
- binary_sensor.blinkbridge
- camera.blink_driveway
- camera.blink_shed
- camera.blink_back_door
- camera.blink_conservatory
- camera.blink_patio

Yep, it was a known issue and will be fixed in 0.81! :+1:

https://github.com/home-assistant/home-assistant/pull/17538

1 Like

You the man :muscle:, thanks for the update,

Great! Thanks a lot!
Even got it working now with the workaround!

I had some problems with the new service to download the latest clip, though. I dont know if its related to the problems we have atm (I did not try it until today). It will not download the latest clip but the latest clip after hass was started. It ignores new clips.
Lets say I got 4 clips stored, I restart Hass and run the service - > it downloads the latest clip, number 4.
Now it records some new clips, number 5 and 6. I have an automation to grab and forward those clips but it downloads number 4 again and again.

Do you run the blink.blink_update service before downloading the clips? In the blink app on your phone, have you ever deleted videos or do you have a bunch listed?

For reference, the way the API works is that on each refresh, the Blink servers are queried for a list of videos. It then takes that list and sorts it by date recorded, so the link to the most recent video clip is stored in a variable per camera. Now, if you have a ton of videos it’s possible the new videos are being stored on a different “page” (all videos are split among multiple pages on the Blink servers. By default, I just grab the first two pages) which would mean it can’t find the most recent clip.

If you did update prior to downloading a clip, please open an issue on the blinkpy repository so that the issue is tracked and so we can try and resolve it. It may just be as simple as increasing the number of pages to download, or adding a home-assistant config option to do so.

Thanks for answering. I am not that creative, there were 4 clips on the server :smile:
I run the update service before downloading a clip but even after 24 hours and several new videos it always downloads the same clip.
I will have a closer look this weekend, I am just wondering that nobody had the same issue.

Edit: I updated everything and re-wrote all automations. And what can I say? It works just perfect. Tested everything and no problem so far.
This component is really stunning and just great. I love it! Thanks a lot for your work on this!

I am trying to take a snapshot with my blink cameras upon movement detected by my motion sensors.
The script I have works great with my Foscam cameras. Here is my script:

camera_snapshots:
  sequence:
    - service: camera.snapshot
      data:
        entity_id: camera.frontgate
        filename: '/home/homeassistant/.homeassistant/www/ALERT_snapshot_frontgate.jpg'

I cannot figure out the syntax to do the same with my blink cameras. Any help is much appreciated.

The camera.snapshot service only saves the current camera thumbnail to a file. What you want to do is call the blink.trigger_camera service, followed by blink.blink_update and THEN the camera.snapshot service.

The blink.trigger_camera service will send a command to the camera to tell it to take a picture. The blink.blink_update service will force home-assistant to pull the updated information from the blink servers (you should add a delay in between the two of at least 5 seconds). Once the update is finished, the thumbnail will be updated and can be saved with the camera.snapshot service.

Here is an automation+script I have that actually performs all three of these steps:

automation
script

2 Likes

This appears to be the answer to my question “how do I take a snap shot with my BLINK camera upon motion detection?” but I’m not being successful implementing it . First, all is good with the camera setup running HA 0.84.6:
blink:
username: [email protected]
password: !secret ha_pass
scan_interval: 180
binary_sensors:
monitored_conditions:
- motion_enabled
- motion_detected
sensors:
monitored_conditions:
- battery
- temperature
Your referenced automation link is not working which may be the needed information. Also, does the referenced script just get added as a .yaml file in the script folder? I’m not well versed on scripts, or automations yet, I don’t see how this file would be created using the HA configuration script tool.
I did try to run blink.blink_update and blink.trigger_camera service using the developer service tool. Unfortunately neither of these services provides a given drop down entity or service data. I did manual populate the service date with:
{
“entity_id”: “camera.blink_cam_1”
}
However, that failed. I can call service camear.disable_motion_detection successfully. Appreciate any insights anyone can provide on getting the blink camera image to display a snap shot.

Ok, you’ve got a bunch of questions so I’ll try to answer them all where I can.

First, per the documentation you have to call the blink.trigger_camera service with the name of the camera. So, in your example, you would call the service with

{
    "name":"blink_cam_1"
}

For scripts and automations, there are many ways you can go about implementing them and I highly recommend reading the documentation (here are quick links for the automation and script documents).

What I do, which is by no means the only way to do it, is create individual yaml scripts which I then combine into a single scripts.yaml file via a bash script ran at startup. There are more elegant ways to do that, but whatever :smile: EDIT- I store my config on github if you want to poke around too

Finally, here is a link to the referenced automation (someone else asked a similar question that I answered elsewhere on this board)

And just in case I remove the script from my github page in the future, here is the referenced script in full:

blink_trigger_camera:
  alias: Script - Blink Trigger Camera 
  sequence:
    - service: blink.trigger_camera
      data:
          name: "Camera1"
    - delay: 00:00:05
    - service: blink.trigger_camera
      data:
          name: "CameraKS"
    - delay: 00:00:05
    - service: blink.blink_update

Thank you for the assistance. I was dealing with too many variables and didn’t know which one I was completing incorrectly. The developer tool service calls (blink.trigger_camera & blink.blink_update) appear to be processing now. I haven’t been able to get the corresponding camera picture to update, like it does via the phone app, but we’ll review the referenced documentation and hopefully be successful.

Hi, my script only refresh if i press to call the service script, but it is not updating the snap automatically, any idea?