Looking at Blink cameras

I’m playing around with the Blink API at the moment and had the same issue. I found using the following host for all subsequent API calls (after getting the token) works for me.

https://rest-prde.immedia-semi.com

Are you from Germany? If you’re fr US, could you share the exact command line for login and subsequent API (of course, pls remove auth token).

I can’t get it to work still using your suggestion for subsequent API :frowning:

I’m in the UK. The following python extract successfully returns a list of videos for me:

requests.get("https://rest-prde.immedia-semi.com/api/v2/videos/page/0", headers = {"Host":"prod.immedia-semi.com", "TOKEN_AUTH":token})

The way I worked out the change in host name was to monitor the traffic from my phone when using the Blink app. There may be easier ways but I used an (albeit oddly named but very popular) windows app called Telerik Fiddler to setup a temporary web proxy that I could route my phones internet connection through.

2 Likes

Thanks. I will try the web proxy app you listed later.

When I did it before I only saw the host name in Fiddler but I’ve just had another play and if you follow these instructions you can also decrypt the HTTPS traffic and see the full endpoint being used and the headers, body etc… :slight_smile:

Thanks for this again. I was able to use existing squid and figured out the URL. For me, it is https://rest-u002.immedia-semi.com

Looking back from the original author site, he did explain it, lol

Notes: The authtoken value is passed in a header in future calls. The region code for endpoint is required to form the URL of the REST endpoint for future calls.

So my region code endpoint is u002.

Now I’m able to download video using this line

homeassistant@raspberrypi:~ $ curl -H "Host: prod.immedi-semi.com" -H "TOKEN_AUTH: *my_token_auth*" --compressed https://rest-u002.immedia-semi.com/media/u002/account/*my_account*/network/*my_network*/camera/*my_camera_id*/clip_YZ1qUmXw_2018_08_16__23_44PM.mp4 > driveway.mp4

I am also able to snap an image using this line

homeassistant@raspberrypi:~ $ curl -H "Host: prod.immedi-semi.com" -H "TOKEN_AUTH: *my_token_auth*" --data-binary --compressed https://rest-u002.immedia-semi.com/network/*my_network*/camera/*my_camera_id/thumbnail

But for the love of me, I cannot figure the URL to download the image. How did you figure the video url is /api/v2/videos/page/0?

Could you do the same trick to figure the snapped image URL? :wink:

Answering my own question…The Home screen below will contain the URL to download image

curl -H "Host: prod.immedia-semi.com" -H "TOKEN_AUTH: authtoken from login" --compressed https://rest.prod.immedia-semi.com/homescreen

For future tinkerer, be sure to change/append your https://rest-xxxx to a correct value.

1 Like

Just looking for opinions on the Blink cameras. I’m looking for something weatherproof and battery powered to have by the entrance, and I like that it can be armed/disarmed in Hass to only record when motion is triggered and the alarm is on.

Can someone provide the complete steps to get an image file from the blink using the API. I attempted to use the previously listed commands but I was returned an error. I have my token auth but no network id.

Like most battery powered cameras, motion detection doesn’t work well if object is not moving from left to right/side-way.

If you want real time/no delay and better motion (not really much better but a tad better), use non-battery powered camera.

I have HA arm and disarm Blink cameras based on time of the day and presence detection. It works well. Not excellent.

1 Like

If you re-read my posts above, you did not supply/did not connect with the right region code endpoint; thus, you can’t see the network ID, etc.

I’ve got two Blink cameras setup in a similar fashion. They turn on/off at night/morning at times, and on/off at home vs away. I’ve also got it taking a picture every time it arms/disarms. I have to stagger the picture taking by 30 seconds, or it doesn’t work. (I think it was a system busy issue?) My arm when away automation never works, and I haven’t the foggiest as to why. The system shouldn’t be busy, because it’s going to disarmed to armed. Have you had any similar issues with automated arming of the blink system?

Hey Ryan,

This works for me…depending on how fast I drive up the driveway lol I’m using router for presence detection.

> - alias: 'Blink disarm when return home'
>   trigger:
>     platform: state
>     entity_id: group.family
>     from: 'not_home'
>     to: 'home'
>   condition:
>     - condition: time
>       before: '23:00:00'
>       after: '6:00:00'
>   action:
>     service: blink.arm_system
>     data:
>       device_armed: "False"

To arm it, change device_armed: “True”

Is it possible to use only its PIR sensor, without recording any image? As far I know, when they are armed, they upload images to Blink server, right? I would like to only receive PIR alerts, and get images manually (as upload files automatically is a waste of battery since I don’t need it).

Here I see that “PIR enabled” and “armed” are separate settings. Does it mean that I can receive PIR alerts if PIR is enabled although it’s not armed?

Hi Robmarkcole,
Can you please share how to do this script for capture?
Is there anyway do it automatically every 15 minutes or so?
Thanks