Blink Camera Group Motion Detection Enable Question

HI!

Running hassio on a Raspberry Pi 3

I have six Blink cameras; three are XT outdoor and three are indoor cameras.

I have a group defined for the cameras I want to schedule. One of the five cameras are armed all of the time and not part of the group.

Blink_Scheduled_Cameras:
name: Blink Scheduled Cameras
entities:
- camera.blink_sn1
- camera.blink_sn2
- camera.blink_sn3
- camera.blink_sn4
- camera.blink_sn5
- camera.blink_sn6

I created a simple automation using the UI that triggered at a specific time.

  • id: ā€˜1540761531618ā€™
    alias: Blink Scheduled Camera Arm - Every Night
    trigger:
    • at: ā€˜21:36ā€™
      platform: time
      condition: []
      action:
    • data:
      entity_id: group.blink_scheduled_cameras
      service: camera.enable_motion_detection

The automation triggers but only three of the five cameras actually enable motion detection.

Any thoughts?

Thanks in advance for anything anyone can suggest!

Scott
PA

My assumption would be too many API calls too quickly, so Blink is probably throttling you (you probably have an error in your logs saying ā€œProblem connecting to serversā€ or something). It would probably be better to individually call the service for each camera with a ~5s delay in between each call (I would expirment with that value though, 5s is just a guess).

Also, maybe youā€™re aware of this but Iā€™ll mention it anyways, enabling motion detection for an individual camera does NOT enable motion detection for the system. You have to arm the sync module via the alarm control panel to do that. If the sync module is disarmed, your cameras having motion detection enabled wonā€™t actually do anything.

Thank you! I keep the system armed all of the time for that one always-on camera, so I just need to figure out the others.

Do I need to do this for each camera separated by a pause / wait command or do I need individual automations. I am hoping it is the former.

I will check my logs but I suspect youā€™re right on the API callsā€¦

Scott

You can make multiple service calls in the same automation, so you would only need one automation to do this. As an example, I do that here where I am taking a picture with my blink camera over a certain interval and then save that image to a folder

Many thanks! That was it!

On to adding day-specific versions. :slight_smile:

@fronzbot - would you be able to repost your blink script - the link seems to have expired? Iā€™m trying to do something similar but my cameras arenā€™t updating. Iā€™ve added in 30s delays between cameras because Iā€™ve found if my internet is slow, sometimes it can take longer.

Also I noticed you had a few blink scripts on other threads here that are also expired. Itā€™d be awesome if youā€™re able to share what youā€™ve setup with blink because Iā€™ve been trying to optimise the setup (including the UI for it on lovelace) and would be great to view other setups.

Thanks!

Doing this on my phone, so hopefully I got the format right!

alias: Blink Automatically Take Picture
trigger:
   - platform: time
     minutes: '/20'
     seconds: 00
condition:
  condition: and
  conditions:
    - condition: time
      before: '00:10:00'
      after: '04:10:00'
    - condition: sun
      after: sunrise
      after_offset: '-00:30:00'
action:
  - service: script.blink_trigger_camera
  - delay: 00:00:10
  - service: camera.snapshot
    data:
      entity_id: camera.blink_living_room
      filename: /images/raw_images/blink_living_room_{{now().year}}{{now().month}}{{now().day}}_{{now().hour}}{{now().minute}}{{now().second}}.jpg

Awesome. Iā€™ll play around with this over the weekend. Thanks!

Hey guys, Iā€™ve been trying to have a xiaomi speaker play a sound if my camera detect motion but Iā€™m struggling to have blinkā€™s motion binary sensors activate on motion.

Hereā€™s what I have:

# Notify on camera motion
- alias: Camera motion
  trigger:
  - entity_id: binary_sensor.blink_front_door_motion_detected
    platform: state
    from: 'off'
    to: 'on'
  condition: 
  - condition: state
    entity_id: binary_sensor.blink_front_door_camera_armed
    state: 'on'
  action:
  - data:
      gw_mac: <hidden>
      ringtone_id: 13
      ringtone_vol: 30
    service: xiaomi_aqara.play_ringtone

I have the blink system armed and the Front Door Camera set to detect motion. I wave my hand in front of it which triggers Blink to capture video and the Blink app lets me know that motion was detected. But the automation does not trigger any sound or notification by HA. When I look at the binary_sensor.blink_front_door_motion_detected state, it says that it hasnā€™t detected motion for 6 days. Not sure why. Any ideas would be appreciated!

Thanks

The blink integration operates on a polling scheme, so itā€™s only looks for motion every so often based on your scan_interval, which i think is 5 minutes by default, so your automation probably wouldnā€™t work very well anyways.

As to why it hasnā€™t reported motion detection in awhileā€¦that sounds like an issue. So some questions for you:

  1. Do you have multiple sync modules, or just one?
  2. What version of HA are you on?
  3. Do you manually delete videos after they are recorded (via the blink app)?
  4. What is your region_id? (go to dev tools --> states --> alarm_control_panel.blink_blahblahblah and look for the ā€œregion_idā€ attribute.

@fronzbot - thanks for the response. Answers to your qns below.

  • I have only 1 sync module
  • Version 0.91.1
  • Yes I do. But to test this, I left the videos there for a while and still didnā€™t see it come up.
  • Region is = prsg

Re your point about polling period - can the blink app be forced to notify on motion? Feels a bit surprising that there isnā€™t a more immediate way to update home assistant if it detects something.

Thanks

Ok, thanks for the info. Iā€™m wondering if the new video endpoint Iā€™m using for motion detection just isnā€™t implemented yet across all regions. I only know for sure that it works for ā€˜prodā€™ (US) and ā€˜prdeā€™ (Europe). That might be the root cause of the issue.

For polling period- no, there is no way (currently) to get an immediate update from Blink. This would require the underlying library to have a closer integration with Blink (ie. I would actually have to work with Blink to implement it). The library is just a third-party API I wrote based on standard http requests to try and closely mimic the behavior of the Blink app.

If youā€™re willing to try some more debugging, here is a suggestion (more work on your end, and itā€™s not a problem if you are uncomfortable doing it):

  • Set your default logger level to debug see here
  • Disable all integrations other than blink in your configuration.yaml file
  • Re-start home-assistant and then try to trigger your camera for motion.
  • ~6 minutes later (assuming the binary_sensor for motion detection did not change to True) copy and paste the contents of your homeassistant.log file here (or upload it somewhere and add a link to download it, email me (link in profile), doesnā€™t really matter).

Doing that should allow me to see every api call that is made to try and narrow down what is failing and hopefully allow me to figure out a fix. I also opened up an issue regarding this on the main library page here

Ok sure. Iā€™ll take a crack at it on the weekend and post what I find.

Re: polling period - understood. My use case was going to be to connect the blink cameras to my xiaomi gateway. So at night if it senses motion, rather than just notifying my phone (which may not wake me up), itā€™ll activate my speakerā€™s alarm and wake me up as well as hopefully scare them off. Understand if the current integration doesnā€™t allow it to be used in that way though. Will have to figure something else out.

Thanks

1 Like

Watching this thread as well.

Hi @fronzbot, I gave it a shot this weekend and messaged you the file. Let me know if it isnā€™t clear and you need me to do anything else.

Thanks!

To get a pushed notification you can add ifttt and create an applet that will notify homeassistant everytime your camera will detect a motion. Itā€™s not perfect but will do the job.