Blink Binding

@doktormo , may I dare to ask you for some suggestion from your side?
thanks in advance
Marco

Hi all too,

with Openhab 4.0.3, I canā€™t use the Blink Binding anymore too.
I can only use the HTTP Stream of one Camera and I get the following Errorā€™s in openhab.log:

2023-10-25 12:00:25.626 [WARN ] [blink.internal.handler.CameraHandler] - Failed to create thumbnail servlet
java.lang.IllegalStateException: ServletModel{id=ServletModel-46,name='org.openhab.binding.blink.internal.servlet.ThumbnailSer
vlet',alias='/blink/thumbnail/256456',urlPatterns=[/blink/thumbnail/256456/*],servlet=org.openhab.binding.blink.internal.servl
et.ThumbnailServlet@1c4978b1,contexts=[{HS,OCM-38,default,/}]} can't be registered. ServletContextModel{id=ServletContextModel
-3,contextPath='/'} already contains servlet named org.openhab.binding.blink.internal.servlet.ThumbnailServlet: ServletModel{i
d=ServletModel-42,name='org.openhab.binding.blink.internal.servlet.ThumbnailServlet',alias='/blink/thumbnail/764267',urlPatter
ns=[/blink/thumbnail/764267/*],servlet=org.openhab.binding.blink.internal.servlet.ThumbnailServlet@7db3295b,contexts=[{HS,OCM-
38,default,/}]}
        at org.openhab.binding.blink.internal.servlet.ThumbnailServlet.<init>(ThumbnailServlet.java:57) ~[?:?]
        at org.openhab.binding.blink.internal.handler.CameraHandler.initialize(CameraHandler.java:166) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor92.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

@doktormo

Do you have any idea how I can fix this? I have already deleted all cameras and created new ones, but unfortunately only one camera works at a time.

Greetings
Guido

Same for me. I have been waiting for a solution ever since @doktormo posted the new version of the Blink Binding on July 28th (see above). Streams have been limited in this version to one camera only. I donā€™t know why.

Hello
Iā€™m using the new version for OH4 thanks @doktormo !!
I have a blink mini but there is no property for thumbail in the thing ? where can i get it ?
I also have a blink outdoor and the property is ok

Thanks for your help
Johan

It can be fixed by configuring a unique servlet name here:

See:

Hi there,

are there any news regarding the integration of blink doorbells?

Greets

Lars

@wborn: Seems you found the reason why we can have only one camera listing a video stream at a time. Since @doktormo has not been around for a while and development of the addon seems to have stuck, do you have the chance to patch it? Most blink users will have more than only one camera and with the current bug the addon is not very useful.

Hi @fantasticn, try this org.openhab.binding.blink-4.1.1-SNAPSHOT.jar with openHAB 4.1.
Feel free to cherry pick that fix from my blinkbinding branch @doktormo when you continue working on it.

Hi @wborn, thank your very much for providing a patched version of the addon. That is very much appreciated. However, it seems I cannot register my Blink account with this addon. When OpenHAB did not adopt my previous items after substituting the old addon with the new one I deleted all of those items (cameras, blink account) and tried to create new ones. But when inserting the login information I receive the following error:

Failed making field ā€˜java.time.format.DateTimeFormatter#printerParserā€™ accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.

I tried reverting to the old addon (4.1.0) and login went well again.

@wborn: Seems the problem is related to restrictions that have been implemented in Java 17, which is the version to use with Openhab 4.x. Can you fix it?

Iā€™ve made the DateTimeFormatter static so Gson will ignore it. :slight_smile:
Try this new org.openhab.binding.blink-4.1.1-SNAPSHOT.jar @fantasticn .

@wborn: YES!!! You made my day! It is working!

Ever since switching to OpenHAB 4 I was not able to use my Blink cameras within my HABPanel interfaces on my tablets anymore. Even when @doktormo came up with a new version only one of my four blink cameras would show up. But finally it is working again. Letā€™s hope that with the next big update of OpenHAB things will not stop working again or at least an updated version of the addon will then be provided.

Again thank you very much for patching the addon!

1 Like

Thatā€™s good news! :slight_smile: Iā€™ll add some comments to the PR regarding those changes.

I upgraded OH 4.1 to 4.1.1 and modofied the blink binding from updated the blink-4.1.0-SNAPSHOT by the org.openhab.binding.blink-4.1.1-SNAPSHOT.jar
All works well except the blink bindning which didnā€™t start. The blink bridge gives the following error:

2024-01-12 20:17:18.124 [ERROR] [link.internal.handler.AccountHandler] - Error connecting to Blink servers with given credentials
com.google.gson.JsonIOException: Failed making field ā€˜java.time.format.DateTimeFormatter#printerParserā€™ accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.

Can you please help to fix the issue. I run the 64 bit version of OH 4.1.1 because of the 3 times faster performance of the rules on the first run.

You seem to like reinventing the wheel. :laughing:

See: Make DateTimeFormatter static Ā· wborn/openhab-addons@e472c74 Ā· GitHub

1 Like

Thank you @wborn. I found 5 minutes today to test. It works! Great! Thank you for your quick reply!

1 Like

Hi all,
I had to create the addons folder as it didnā€™t exist.
I downloaded the jar to the addons folder and had to change ownership as I copied it using Windows to a network share on the pi.
It worked after entering the 2FA code and I linked my networks using the things I had previously which have all been working fine for several months.

After 5 minutes it goes offline and then Blink send me a new code every 45 minute or so till I recreate the Blink account bridge and start again. After 5 minutes it drops offline again.

Anyone hazard a guess as to what Iā€™ve done wrong ?

Update:
Seems like I put the jar in the wrong place.
Should have been /usr/share/openhab/addons

Many thanks for this binding. Iā€™ve installed the latest release from github on openHAB 4.1.1 using openhab-cli console without problem.

Configuring an oudoor camera I recognized that the temperature is provided in Fahrenheit. Is there any option to switch to Celsius? If not, no problem Iā€™ll use a transformation profile, insteadā€¦

Just found the solution. A transformation profile is not needed. One only needs to add stateDescription Metadata with the following pattern to the item:

%.1f %unit%

Thanks @prinz - Donā€™t know why I didnā€™t see that myself!! Mine now changes=d to
%.1f Ā°C