Blink Security Camera Binding

The binding isn’t using the polling setting correctly. I’ll have an fix available tomorrow.

Hi Matthias, first of all… thanks so much for putting some effort on this!!! I have been looking for a Blink binding (or equivalent) for years, and in the end since I don’t have a Software Developer background I had to create a custom bash script to arm/disam the cameras when I wanted to. With the help of custom rules I was able to have this working to my liking, but it was quite cumbersome to get going.

I am very interested in being a Guinea Pig and try this out and report any findings. I own two modules and 6 cameras. Unfortunately I am about to go on a long needed vacation with the family and wont be back until next year. I will keep track of this post and download the latest complied binding and give it a try!

Looking forward to collaborate and have create a good solution :slight_smile:

Funky28

1 Like

Polling of camera properties works properly now.
Using the setThumbnail Switch now also automatically updates the thumbnail.
The new version is back online through the Google Drive link above.

Will add the polling for the network armed/disarmed next and update the pull request accordingly.

Thank you to all of you for testing or giving me the motivation to do this :pray:

Hi Matthias,

great, it’s working…thanks a lot for your effort!
Martin

Hi Matthias

I had some time to test the binding as well running 2 networks with 5 cams altogether.

I experience the following issue on both network things and think that this happens after about 1 day:

COMMUNICATION_ERROR
Blink API Call unsuccessful <Status 409>

The bridge still shows online.
Disabling and reenabling the bridge will also set the networks back online.

Any idea what this could be?

I was able to reproduce this, just today.

It looks like the API is being called with a stale security token, which gets replaced with a new one after calling the login endpoint again during reenabling of the bridge.
Don’t know why that wasn’t an issue before. I’ll add a perodic refresh of the token. Look like every 12 hours should be enough.

Thanks for reporting!
Matthias

Thank you very much! I have been waiting for this for years! Best christmas present :wink:
How can I use this binding? I mean, how can I integrate this in my openhab Installation?

Wow, so now I am a bit disappointed. Not because you made this great binding, but because I have started implementing roughly the same binding this weekend without checking if someone else did. :relaxed:

From what I can see, our approaches have quite some similarities, so I guess I will drop my binding and try yours instead.

From what I have implemented in my binding I would like to make a few suggestions:

  • when a HTTP call returns 401 unauthorized (as done in the blinkpy library, maybe the status is 409?) although a token is available, reset the token and try logging in again and then retry the current action (instead of periodic refresh)
  • add a periodic refresh of the homescreen and update all channels based on the result, so changes made via the mobile app are reflected after a given time
  • check the results of the command api (enable/disable, arm/disarm) in the background and trigger a homescreen refresh after completion instead of updating the corresponding channels directly. This would save a few false-positives in case of “system is occupied” or “timeout” (which happen quite a lot if three people are updating the same camera from their mobile apps at the same time)
  • automatically get a new thumbnail if the thumbnail-URL changes with a homescreen refresh and update corresponding channel. In the current code I can’t see that channel updated anywhere except when OpenHAB sends a Refresh command.

Would you be willing to pick up any of those or maybe even let me contribute?

Hi Sascha,

first of all, you’re more than welcome to contribute. Please contact me directly so we can set it up on Github.

Thank you for your suggestions. I haven’t updated the pull request, since I wanted to finish the documentation of the new code.
Except for the first suggestion, the other suggestions are already available in the recent version of the addon (the one available through the link above):

  • add a periodic refresh of the homescreen and update all channels based on the result, so changes made via the mobile app are reflected after a given time

Homescreen is polled with the given refreshInterval config parameter and states updated accordingly.

  • check the results of the command api (enable/disable, arm/disarm) in the background and trigger a homescreen refresh after completion instead of updating the corresponding channels directly. This would save a few false-positives in case of “system is occupied” or “timeout” (which happen quite a lot if three people are updating the same camera from their mobile apps at the same time)

Addon is now using the async command callback to get the finished status of the async actions instead of “predicting” the result

  • automatically get a new thumbnail if the thumbnail-URL changes with a homescreen refresh and update corresponding channel. In the current code I can’t see that channel updated anywhere except when OpenHAB sends a Refresh command.

Thumbnail state is now updated during homescreen refresh (see above) and also after the setThumbnail returns successfully.

As for the first one, I was thinking about a 12 hour refresh of the token. But I’ll add your suggestion of trying to refresh the token once after a failure.

Cheers,
Matthias

Hi _radza,

How can I use this binding? I mean, how can I integrate this in my openhab Installation?

right now the addon is only available as a pre-compiled jar through the link above. You have to place this jar in your openhab addons directory and openhab will pick it up automatically.

Hi all,

Sascha made some excellent contributions to the binding, bugfixing and optimizing the code. An updated version is available through the new link (since its now a 3.3.0-SNAPSHOT version):
https://drive.google.com/file/d/1rMMoMOizZmr5RzgaYPUJWbCQpyO7d3ot/view?usp=sharing

Merry christmas everyone!

Matthias

2 Likes

What a nice Xmas present :smiley:
Thank you both very much!

Have some great christmas days!

Ciao Mattia io sarei davvero interessato, ma vorrei che tu mi insegnassi come rilevare i miei sistemi blink, sono un principiante se ti va di insegnarmi te ne sarei grato buon Natale

English please, this is an international community!

Merry X-Mas

Sorry

Hi Mattia I would be really interested, but I would like you to teach me how to detect my blink systems, I’m a beginner if you want to teach me I would be grateful Merry Christmas

Hi Matthias,

Great Work, everything is working without fails.
Is ist possible to get Temperatur in degrees Celsius ?

Greetings Guido

When the power goes off definitely, the Blink camera will automatically be … For D-Link router, click IP & MAC Binding->Binding setting on the left page.

advancedmd

Hi Guido,

did you use the most recent version from here:

This version returns the temperature as a convertible unit.

Regards,
Matthias

Hi Matthias,

Happy new year, I have just added the Things via the Admin Console and then created an item file. Now the temperature is displayed in °C.
Thank you for the tip.

// Blink Kameras
Number:Temperature Temperatur_Blink_Terasse "Terasse: [%.1f %unit%]" <temperature> (GP_SENSOR_TEMP)
        { channel="blink:camera:eebxxxx8f50:256xxx6:temperature" }

Best regards
Guido