[PROJECT] Driver for Blink API

Building on what @jpage4500 mentioned:

  • The driver is set to only poll on a regular basis (manually by default).
  • When you tell it to arm/disarm or enable/disable motion it will update the status if it received the generic success status. So this one should get a pretty quick response if you send a command via the driver. It will NOT get changes from the app (or other means) until the next time it polls.

@snell Iā€™m not seeing updates either - even when armed/disarmed.
Iā€™m using the network child device, showing the attribute ArmString. I have refresh rate at 10 mins.

If you could check the logs to see if the check is running successfully. Need Trace logging for that area. You should not need to send it to me, it should be obvious.

1 Like

Iā€™ll take a look. Iā€™m certainly seeing at least 5 ā€œupdatedā€ events being recorded against the Blink device at 10 minute intervals.

Trace logs show updates are happening at 10min intervals (which is correct).

The trace log does show the correct status of the Blink arming status. This is not reflected on the HE dashboard.

If you go into the Blink device and just click save preferences (nothing else), this appears to force the dashboard to update with the correct status.

Arming/disarming via my virtual switch is operating the Blink correctly but no new status updates are appearing (am seeing the exception as raised earlier).

HTH

@nutcracker:
Ok. One more question then, which device are you showing on your dashboard for it? The parent device or one of the children? Right now there are minimal Events pushed to the parent device (certainly not arm/disarm or enable/disable directly) because they are for the children. There is an Event that should show which systems/cameras are armed/enabled but that had a flaw that should be fixed when I release the updated version in a little bit.

future question.. any idea how fetching thumbnails would work? I'm guessing you can't just return the URL since it had the auth token in it.. or maybe that it possible. it's certainly be the easiest way.

anyway just curious

Updated Version(s):
BlinkAPI.groovy = 0.1.7

Change(s):

  • Logging level now set correctly for video events, still not being processed yet though
  • Revision to the General Response handling (for arm/disarm & enable/disable) so those SHOULD be all set now for their responses. It should help with not seeing an updated status for them when triggered within Hubitat (does not affect polling for other changes though).
  • Addition of GetNetworkStatus. This now polls information regarding a network specified (or all if none specified) for the account. This also includes the name of the Network(s) so people should see the label for those changed correctly. The only piece of new information included was a "Deleted" field that seems to indicate when a network was deleted in the account. Maybe Blink keeps old ones around and just flags them as deleted? Will just have to see how that all functions if someone has such a thing.

Different Topic(s):

  • @jpage4500: That is one thing I am trying to figure out. My tests on my own devices did not appear to work for just using a URL like that (or trying from browsers) so it is not quite as easy as I hoped because of the auth-token. I have gotten some recommendations of things to look at. My goal would be to provide the thumbnails though, that is for sure.
2 Likes

See above:

@snell just updated to the latest version and network status is being reported correctly now! Thank you.

One other thing, on my dashboard Iā€™m showing the updated attribute from the network child device so I can see the date/time stamp of when the network status changed. Is it possible for this field to be updated as well?

Thanks!

Itā€™s possible to obtain the image data from Blink but youā€™d need to set the content type to an image to be able to pipe it to the web browser. Back in the day, Iā€™ve built a web portal for ease of access to the thumbnails (and video) but I think Blink pulled it from their forums after asking me to take the hosting of it down.

The challenge once youā€™ve got the image is how to get it to display within HE. The below may help @snell.

I have pulled in the thumbnail data without issue from the URL they provide (with auth-token sent of course). But it is the data itself, so it needs to be put into an actual file for reading since nobody is going to be able to take the giant string and read that as an image. :slight_smile:

Need to make a change for the Updated. While it should be match on the children for most cases I noticed that the GeneralResponse (arm/disarm & enable/disable) only posts an Updated event on the parent. The next update will include that going to the respective children as well.

2 Likes

Following this project with great interest. I have 8 (3 outdoor, 5 indoor) cameras divided over 2 sync modules (inside/outside). Previously I used Rboys integration on Smartthings (until Amazon pulled the plug), now I only use the scheduling in the app but sorely miss automatic arm/disarm based on presence.

Getting motion alerts would be great. Camera thumbnails is nice, but not a necessity for me as I usually open the Blink app when notified about something.

Keep it up!

1 Like

Motion alerts would be tough due to the way the driver polls for data. The lowest poll is set for 5 minute intervals. Plus, I have not identified a field that I can confirm is "there is motion active right now" from the existing data. Of course, there is more data I still need to pull in. I have to think it is there somewhere.

1 Like

So I was playing a bit with the new driver. I have 3 camera's each with their own sync module. What I found is that if I use the parent device to arm/disarm, the Blink camera's respond within 15-20sec. However the dashboard child tiles do not update (also not after the set 5min interval); but if I manually push Get Network Status on the parent device the tiles update immediately. If I arm/disarm via the child device the tiles respond immediately but the Blink camera's do not respond at all (ie they do not arm/disarm).

just curious, why 3 sync modules? was it to have a schedule per camera? I was considering that but was hoping blink would just make it work with 1.. with this new driver I'm hoping I can do that

With the Blink app, one arms/disarms a sync module. The only way to create zones that are armed and disarmed together is to have a sync module for each one.

Me too. And I don't know why they won't, but they haven't.

Updated Version(s):
BlinkAPI.groovy = 0.1.8
BlinkChild.groovy = 0.1.4

Change(s):

  • Fixes to response handling for arm/disarm & enable/disable area. This should hopefully make those responses happen properly.
  • Added the CheckSyncModule command, does not do a lot except provide more data for the sync modules
  • Added the GetCameraLiveView command... which provides the RTSP link for the video feed, but RTSP is not handled by the dashboard or really any browser so you would need to feed it to something else or convert it before it expires.
  • Finished adding in all the additional attributes from the Camera Info.
4 Likes

When arm/disarming of Blink, what device/attribute should we now use to determine the date/time of last status change? I was using the ā€œnetworkā€ child device, attribute of ā€œupdatedā€ but in the last driver update this is set to null. Is there such a thing now?

Iā€™ve also noticed that for camera devices, battery status attribute returns a number where as before it showed ā€œokā€. All fine if thatā€™s what itā€™s meant to be now... I have a RM rule that detects for battery level changes.

Update: actually, it looks like the battery status changes every 10mins (as per my schedule) from ā€œokā€ to a number... 10 mins later, switches to ā€œokā€ and then a number.

Correct. Besides I found that the signal range of the sync module/camera is rather limited rendering it irresponsive at times.