[PROJECT] Driver for Blink API

Try doing the Authorize with the "Reauthorize" selection set to false. This is actually the method to request a new PIN, leaving it at true does the more common reauthorization meant for if your client has already received a PIN.

Thanks for the quick response.

I've done both Authorize with "Re..." set to "false" as well as "true".
I've deleted the virtual device a number of times.
I've deleted all the new drivers a number of times.
I've used your links to install new drivers in Hubitat.
I've "copied" and "pasted" your drivers in Hubitat.
All no goes.

I'm running Platform Version 2.3.3.140 on a C-7.

My cameras work just fine using the Blink app from Android.

I've successfully used your drivers for a long time on a C-5 and my C-7 until earlier this month.

Yikes!

Hmm... That is not the best news. If you go into the Blink app's devices listing, you could remove the "Authorized" device that represents the Hubitat. It most likely will have limited info to it unless you entered something in the Client Name Preferences field originally.

In the Blink app (on Android at least):

  1. Go to the Settings tab.
  2. Select the "Account and Privacy" listing.
  3. Scroll down under the Privacy Settings and select "Manage Mobile Devices"

This listing shows every device (including your Hubitat) that has been authorized to work with Blink. It is really easy if you have only ever used it with one phone, you could delete all the others (I had bunches of old phones they had retained myself).

Once you remove the device(s) that correspond to the Hubitat, you can go back to your Hubitat and treat it as a completely new install (you obviously know it, but I will paste those steps below):

  1. Create a new virtual device for Blink.
  2. Select this driver for the Device Type then Save Device.
  3. Enter your Blink account email and password and Save Preferences.
  4. Select the "Authorize" command with a false value. Blink should email or text a PIN to validate this device.
  5. Enter the PIN received in the Verify PIN field and select the Verify PIN command.

If all this does not work, let me know. Maybe we can look into some logs over messages.

Morning,

Found the issue.

And all is well, thanks!

It seems the culprit was my DDNS setting and it just happened to happen when Blink went on the "blink"!

A couple weeks ago I set my hub to "static" IP through the Hubitat settings. No problem, except the DDNS was set to 8.8.8.8. Why? Above my pay scale.

Anyway, I set the DDNS to 1.1.1.1 and all my issues vanished!

Thanks for your kind help.

Happy Thanksgiving!

1 Like

Question for fellow "BLINKers" here. I have an original sync module from 2017. And my cloud storage is grandfathered in too. Is there any benefit to replacing the sync module with a new sync module 2?

The newer ones have the USB port active so you can plug in a USB drive for "local storage" but it still sends everything up to their cloud anyways.

So practical benefit? Minimal. If your current one is working there is not much use in swapping it out.

1 Like

Thanks!

I actually have both... I have my old one (still working fine) but when I got a couple new cameras a few years ago I got the new Sync module... I have a USB drive plugged into it but other than being able to "separate" my cameras into one set on the old sync and one set on the new sync it really has not added any additional value.

1 Like

Hi @snell, just noticed that HPM's "Repair Package" option for Blink drivers only repairs the compulsory drivers and omits the optional child drivers (BlinkChild-Camera in my case) is this the expected behaviour? Thanks.

I have no idea what might be causing that. It is not anything that is configurable in my drivers nor do I know of anything that is set in the manifest that way. Maybe it is just how HPM works? Since I am not really familiar with it I really do not know. Might be better to ask in the HPM thread if optional drivers are not repaired for some reason.

If you go into HPM and list the apps/drivers that it believes are installed does the driver show up?

1 Like

I have seen this when I added a new optional driver manually, outside of HPM, during development. I had to Match Up in HPM (so that it became "aware" of the driver that was added) and then Repair. Give that a try, @hubitrep, and if it doesn't help then I agree with the suggestion to ask in the HPM thread.

1 Like

Good point @thebearmay, it doesn't show up. I guess I had it installed manually. Not sure why the driver code had disappeared though (was getting errors in logs during periodic updates).

I proceeded as @tomw suggested and it's now listed.

Thanks for your help !

3 Likes

Hi Mate,

I am successfully installed your driver and able to get my camera details in hubitat.

Only problem i am facing right now is that i am not able to get motion enable or disable for particular camera and i can only arm and disarm my system from main virtual device
Whenever i am trying to enable motion or any other actions in the child devices I am getting the below error.

I am using old blink module and i installed your driver through HPM.

Regards,
Sundar

Here are three immediate things to check/try, then getting into log data for me:

  1. If you go to the child device for "Drive way - Camera-27031", check the State Variables list of the device. There SHOULD be a variable labeled "Network ID" with a number there. This error is if a device does not have that for some reason. Assuming (from what I see of the devices in your log) it should be linked (in Blink) with one of the two sync modules and their resulting network (the two you have listed in your logs also).

  2. If there is NOT a Network ID (likely, considering the error) you should go to the parent device and select the "refresh" command. You may have to wait a minute depending on your network, how many Blink devices you have, etc... for the API to provide everything and it to get processed.

  3. If the child device does not get a Network ID after that, the next attempt is to REMOVE the child device (just use the normal Remove Device button at the bottom of the child device). Then try the refresh over again. It should recreate the child device.

Final log check: If the child device STILL does not have a Network ID... Then we will need to dig deeper. In that case you will need to enable Trace logging on the parent device, open a log window, and then run the refresh command again. Copy the entire log entry that starts with Homescreen response = {"account":" (it can be pretty long). Send it to me as a Message, do NOT post it here on the thread because of the ID info in it. If you want, you can hide any ID numbers (change them to 1s or something) if you are worried about me seeing them. Once I can look at the log I can see if the API is not sending the Network ID for that camera or something else is happening.

1 Like

@snell I am able to successfully enable and disable the motion for my cameras and it comes up with network id as well.

But, i have noticed a bizarre behaviour of not enabling motion for all cameras in single instances instead i need to press multiple times, the enable button in main device same goes for disable of motion as well.

Any idea?

Thanks for your prompt response.

Not sure I exactly understand but I will try to answer:

  1. If you Enable/Disable Motion within a camera child device, it will only work for that specific camera even if there are others on the same sync/network. The same goes for enabling motion from the parent device because you have to enter the specific camera's ID that you are enabling/disabling.
  2. Arm/Disarming a system is different. If you Arm/Disarm it affects an entire Network ID and all the devices on that network. You have at least two networks it looked like. I am not sure if there are multiple cameras on each or a single one.
  3. Arm/Disarm System and Enable/Disable Motion often get a bit odd. You can have a camera (or multiple) Enabled for motion but will not get a notification (via the Blink app, it does not work via these drivers) unless the System is also Armed. Likewise, you can have multiple cameras on an Armed system but if one has motion Disabled you will not get notices from that specific camera (but you still work from any others that were left with motion Enabled). This type of thing is usually for people that have a single sync/network but mix cameras in places they want notices (outdoors/entries) and places they do not (inside) but still might want to get an image from or check on once in a while.
  1. If you Enable/Disable Motion within a camera child device, it will only work for that specific camera even if there are others on the same sync/network. The same goes for enabling motion from the parent device because you have to enter the specific camera's ID that you are enabling/disabling.

I have noticed that the main Device allows to enable or disable motion for the child cameras without specifying the camera ID but only thing is that its not enable or disable in single instance. We need press multiple instance to perform enable or disable muliple camera at same time. So, thanks for the clarifications.

thanks for the support and clarification mate. Let me try to fidle around to understand little bit more...thanks for the lovely support.

I just checked the code and the parent CAN have the Enable/Disable Motion commands run without requiring the Camera ID. What it should do in this case is it will go though each camera listed in the parent device's State Variable "Camera". For each one it should try to get the Network ID from that camera, then Enable or Disable. It should do each of them in order although there will be a slight delay as it does each of them (I also built a 1 second delay between them each happening to give it time to process responses).

What are the implications of multiple sync modules, if any? Also, is there a difference from this driver's perspective between module type 1 and type 2?

Thanks.

Jay