[PROJECT] Driver for Blink API

Hi @snell - I have some changes almost ready for the new Blink image attribute.. hopefully OK that I post them here but I'll post to HD+ thread when deployed.

I'm displaying the image from Thumbnail if it's present

When you click on the tile I'm showing this detail screen which lets you arm/disarm, enable/disable motion and also an option to update the image (it calls GetNewThumbnail on the driver)

The only thing that would help is if you can add the timestamp to the URL in Thumbnail attribute. If that's not possible I can try to manually do it using the Thumbnail File attribute but it'd be a lot messier.. just let me know!


side-note - I haven't looked at the changes in a while; is there any other changes that I could make work/look better? I see a GetCameraLiveView command -- has that changed? I kind of remember a while back that it didn't work for BlinkXT2 cameras

1 Like

Updated Version(s):

  • BlinkAPI.groovy = 0.5.16

Change(s):

  • Added some additional triggers for the "Updated" attribute on parent and child devices.
  • Additional processing of video event data specifically for Doorbell devices.
1 Like

FWIW - I released an update to HD+ to support images

I did add a comment about possibly doing some kind of auto-fetch of the image every X minutes or hours.. I know my cameras at least are battery powered so I wouldn't want to do it too much. But, I can still add the option if it would make this feature better

2 Likes

No changes to the parent driver at all. Just for the generic child driver which is only meant for use if you have an unidentified device. If one of your devices still shows as using BlinkChild, it should work better if you switch to the child-specific driver for that type of device. BlinkChild primarily attempts to handle activities like a Camera. BlinkChild had not seen an update since 2022...

Updated Version(s):

  • BlinkChild.groovy = 0.2.3

Change(s):

  • Revised BlinkChild to perform the new thumbnail capture method.
  • Revised BlinkChild functions to conform to how I currently perform them in the other child drivers.
  • Minor logging cleanup.

While poking around to see about using the new thumbnail option between this driver and the HD+ dashboard I noticed that I have two MiniCamera drivers. They are both the same version and doing a diff compare between them show there are no differences. Not sure how this happened, or if it has any harm. (Or if needed for some code clean up in the next release.)

EDIT: Don't know where the extra driver went, but I am only seeing one now and not two. (And no my coffee wasn't spiked this morning.)

You got photo evidence there... I have no idea how that could have happened either. Maybe a weird visual "fluke" by the Hubitat? Since any driver with the same name will override an existing one (ex: if you had one driver named "Test", but then created a whole new driver and named IT "Test" also you would only have the new one remaining). I do not put versioning or such in the names... so new versions should always overwrite the old ones.

1 Like

Maybe my coffee was spiked. My local hub is fine. I swore I was on my local hub this morning, but I guess I was on my remote hub. That is the hub that has two MiniCamera drivers. Using HPM it says there is an update for the Blink Drivers. I update it and all is well. However if I do a Match Up it finds a Blink Mini Camera driver. When I match that HPM says there is an update for it again. My guess is that it is updating the driver but failing to remove/replace the old one. Is it safe to just delete one of the two and repeat the match up process again?

EDIT: I just deleted one of the extra drivers. Re-matched, and re-updated. I only have 1 driver now and matching/updating doesn't go into that odd loop again.

Very strange behavior indeed. I have no idea how/why that could have happened. Maybe it got out of sync with HPM? I do not know/use HPM much so maybe that is something that can happen (or not).

Hello @snell,

Thanks for creating this driver. I'm looking forward to getting it working and removing my IFTTT integration (which only works with entire systems, not individual cameras).

I am also having the issue described in earlier posts with "Conflict detected" and it seems to be pretty regular and with all devices. I've thought maybe it was because I needed delays between events but that hasn't proven true. It's seemingly random but can happen to any one of my cameras.

For example, I'm working on a rule for turning off my indoor cameras when "Day" is activated. I've done one camera at a time with a 5 second delay between them and still sometimes one or more will remain armed (with this error).

I'm not sure what to do to troubleshoot at this point. The Blink app will disable the camera just fine.

From the log there a LOT of those are happening very close together, within just a few seconds. The "Conflict detected" message is because the API is returning an HTTP 409 error... which, as far as we have managed to figure out, is when too many requests are being sent to the Blink API for your system and it has not completed processing the previous request.

They remain unchanged when this error happens, because the API did not perform the task (it returned the error). If you manually tried that particular camera again after a bit of a wait it likely would work.

How many cameras are you enabling/disabling in a group? The easiest solution is to put a bit more delay between commands in your Rules... since there is not much I can do from my end except maybe force more of a delay than I already have in there (and that only applies when someone uses the "all camera" method, not selecting them individually).

I was doing two at a time with a 5 second delay between them. I wound up creating rules for groups of cameras that I wanted to arm / disarm at the same time (with a momentary virtual switch as the trigger, so I could trigger that switch from other rules) and did one camera at a time with 5 seconds between each change and so far, so good.

1 Like

Where are the beta drivers for Blink?

Are these the latest beta versions (getting from HPM)?

  • Blink Drivers
    • BlinkAPI v0.5.17 (driver)
    • BlinkChild v0.2.3 (driver)
    • BlinkChild-Camera v0.1.5 (driver)
    • BlinkChild-Doorbell v0.1.4 (driver)
    • BlinkChild-Network v0.1.1 (driver)
    • BlinkChild-SyncModule v0.1.1 (driver)

There are no separate beta drivers for this project. On the rare occasion where I do make a driver for someone testing something out specifically, I name them differently and do not publish them. But even that is pretty rare for any of my projects.

So the ones you get off HPM or directly from the links in the first post are going to be the latest.

Silly question as I know the answer :wink:
Still no way to access motion event from a camera?
I'm trying to avoid an outdoor motion sensor to turn on the lights.

Does not hurt to ask. At this time though I still do not know of a way to get a push notification from the API or an alternative method like a websocket. Sorry.

It’s about a 1 second delay, but you can have Alexa set a virtual switch when it receives the event.

3 Likes

I'm a Goggle environment.
I have never used Google Home for any automations but a good thought.
I'll see if I can get the events through that and pass it on to HE.
Seems it's an IFTTT solution.

It's been a while since I tested it, but you used to be able to use the Alexa cloud without ever having a device.

@snell
I've not noticed this until today :frowning: but in my logs all have:
dev:3182023-11-29 11:48:16.001error Blink - Unauthorized, attempted [Method:Enable Motion Detection, ID:1420089, Type:Camera]

Followed by:
dev:3182023-11-29 11:50:27.003error Blink - Unauthorized
dev:3182023-11-29 11:52:15.048error Blink - Unauthorized response during authorization

for my camera emable commands.

The Blink device says Auth OK but the Status says Unauthorized.
I don't see a place to get a PIN anymore in the Android app.
Suggestions?

State Variables

  • Video Limit : 500
  • Video Purge ID : 4231651773
  • Driver : BlinkAPI
  • AuthorizationFailures : 0
  • Local Storage Notification : true
  • Max Owls : 10
  • Camera Usage Notification : true
  • Authorization : OK
  • Bandwidth Notification : true
  • Blink New Info Date : 20210204
  • Verified : true
  • Low Battery Notification : true
  • Version : 0.4.4
  • Armed System(s) : [284174, 118478]
  • Driver Name : BlinkAPI
  • Battery Dead Notification : true
  • Network : [118478, 284174]
  • Camera : [371741, 371746, 826467, 1260785, 1260787, 1420089, 1420090]
  • Client : 3303789
  • Scheduling Notification : true
  • WiFi Notification : true
  • Blink New Info URL : https://updates.blinkforhome.com/
  • Status : Unauthorized. Please perform Authorization and try Disable Motion Detection again.
  • AccountID : 95716
  • Video Refresh Count : 0
  • Camera(s) With Motion Enabled : [1260787, 1260785, 371741, 371746, 826467, 1420090, 1420089]
  • Updated : 2023-11-23T06:46:29+00:00
  • Tier : prod
  • SyncModule : [494246, 706587]
  • Max All Devices : 20
  • Video Auto Delete Days : 14
  • Max Chimes : 5
  • LFR Notification : true
  • Driver Version : 0.5.17
  • Max Sirens : 5
  • Sync Module Offline Notification : true
  • Motion Notification : true
  • Temperature Notification : true
  • Max Doorbell Buttons : 2
  • AuthToken : 2I1RRabeqSy2RVi6CCqbUQ
  • ClientID : BlinkCamera_2855-62-55-10-307998
  • Doorbell Notification : true
  • Driver Status : Up to date
  • Camera Offline Notification : true
  • Max Cameras : 10
  • Video Storage : 14
  • Max Doorbells : 10

Nevermind says Emily Liotella. :slight_smile:
I added an IFTTT switch to create a motion event from my front door camera and that triggered Blink to need a PIN reauth.
image

1 Like