Blink Camera support

I do not see how to arm or disarm blink cameras within an Amazon echo routine. I do not think this is possible. Do you have an example you can show?

Edit : typos

You cannot set an action to arm or disarm blink systems in an Alexa Routine.

2 Likes

Not to argue. You see actual results. However, from the Amazon.com page below:
"Works with Alexa – View live streams, motion clips, arm and disarm your system, and set up smart reorders for batteries through select Alexa-enabled devices. " I would surely contact Blink support. They are surely falling short on their promise since Alexa Routines are one of the strengths of amazon connection.

You are correct. Wanted to understand @djgutheinz said it could be done. Really wish Amazon would allow.

Thanks. Getting lots of help, and I appreciate it... I just wish I understood what was going wrong better. Using your enterTokenExample as a test, I get an error in the def params, for the headers:
illegal colon after argument expression; solution: a complex label expression before a colon must be parenthesized @ line 321, column 29

Tried changing it to:

headers: "[ token-auth: ${ token }]",

This does not get a compile error, but results in an error in the log:
java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.util.Map on line 326

Line 326 corresponds to:

httpPostJson(params) {resp -> 

As a related example, here is my latest Params line (this one gets a 408 - Request Timeout response):

Params = [ uri: "https://rest-${ state.Tier }.immedia-semi.com/api/v4/account/${ state.AccountID }/client/${ state.Client }/pin/verify", contentType: "application/json", headers: "[token-auth: ${ state.AuthToken }]", body: "{\"pin\":\"${ PIN }\"}" ]
1 Like

Try this:

headers: [(token-auth): state.AuthToken ]
Or
headers: [(token-auth): "${state.AuthToken}" ]

2 Likes

Thanks, but neither of those work. The problem then is that it indicates:
java.lang.NullPointerException: Cannot invoke method minus() on null object

BUT... What you folks were leading to made me stumble on the correct solution and I got a successful PIN validation! What that line should have been is:
headers: [ "token-auth": "${ state.AuthToken }" ]

So the now-working key line is:

Params = [ uri: "https://rest-${ state.Tier }.immedia-semi.com/api/v4/account/${ state.AccountID }/client/${ state.Client }/pin/verify", contentType: "application/json", headers: ["token-auth": "${ state.AuthToken }" ], body: "{\"pin\":\"${ PIN }\"}" ]

Seeing that verification was a nice boost in the morning here. Of course now I need to get to work, but I should be able to get some more done this evening. Sorry about the delay everyone! Have to add a lot of thank yous to this driver.

5 Likes

Thanks to all that have contributed to this so far.
It will be so nice to get a working solution for this technology that does not require third party assistance such as IFTTT.

3 Likes

I do not know how "rough" people want the driver when they start playing with it. Right now it can:

  1. Request an email with a PIN from Blink and then Verify that PIN once you enter it (this process should only really need to be done once unless the device is deleted or somehow botched up)
  2. Arm/disarm a specific system (or all for the account)
  3. Enable/disable motion detection on a specific camera (or all for the account)
  4. Get some general system information

Things it DOES NOT do that I am still working on (that people mentioned interest in):

  1. Any type of visual (video or still)
  2. Report motion detection (not sure how useful this will be as this is a POLLING method, not a notification like you get with your phone, and the polling interval is fairly long)
  3. Specific camera info (battery & temperature for example)
3 Likes

Well that is perfect for my current usage. I just want to be able to arm/disarm systems. :slight_smile: I currently have 3 systems, will I be able to arm/disarm them individually?

Many thanks for all your hard work.

Yup, arm/disarm is possible individually (you enter the NetworkID assigned to them by Blink... which is not the most obvious thing but as far as I know you cannot dynamically edit commands or preference settings).

If you leave it blank it sets them all.

So I may try to clean up some and get some more features working then post the "early" version in a new project thread tonight.

2 Likes

Sounds great. How do you find out the NetworkIDs, will this be a feature of the app or driver?

1 Like

Initial versions of the 2 required drivers are now posted in a separate thread:
[PROJECT] Driver for Blink API

As I mentioned, it is pretty rough still (I got some more working though).

@darren.rockach: The NetworkIDs & CameraIDs are found in the driver in a couple places:

  1. It should create State Variables named "Network" and "Camera" (and others) that each contain a list of the IDs for those devices in your account.
  2. Each child device is named with the ID as the number in the name.
  3. Each child device should have a State Variable "ID" within it.
  4. Each camera child device should have a State Variable "NetworkID" within it that has the Network it belongs to.

I will continue to watch this thread, but for changes/feature requests/bugs/whatnot around the new drivers, please post in the project thread.

3 Likes

You are freakin’ amazing! The setup and activation worked perfectly and I was able to delete my ifttt account :tada:

1 Like

Awesome. Installation and set up worked like a charm. Can see all my cameras!!
Going to start playing with the features.

Is it still not possible to get a thumbnail image from a Blink Outdoor camera with the Snell device driver? thanks

Nope. Until I can write the data to the Hubitat's file storage from the driver, I do not have a good way to do it.

Ok by 'data' are you meaning a base 64 encoded string or something else?
Just wondering if users could supply an alternative UNC file location or similar?

Right now I can receive it as the raw data (which overflows what Hubitat can log), so I would go with the Base64 string.

I have the URI for it obviously (and it is posted in the state variables) but that does not help immediately because it needs the token data in the header. So it is not as easy as putting the URI for an image dashboard item unfortunately.

Could that data be sent elsewhere? Maybe. I will really want to be able to keep as much on the Hubitat as possible.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.