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.
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
@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.
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!
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:
Do you have multiple sync modules, or just one?
What version of HA are you on?
Do you manually delete videos after they are recorded (via the blink app)?
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.
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):
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.
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.