New UniFi Protect binding for OH 5.1

I just switched from OH 5.0.3 to 5.1 and also from the old UniFi Protect binding to the new one.

Now I have a few questions:

I can switch the status led of my G4 Instant on and off with the binding. But when I change that setting in the Protect iOS app, it is not being reflected in OH.

How do I control the recording mode from OH? I need to be able to switch from off to always + events only and back. But I did not find a channel for that.
In Home Assistant, which is AFAIK also using the API, one can configure that via “recording mode”.

Thanks!

@digitaldan

I have another issue: When streaming video to a widget, go2rtc uses extreme amounts of memory over time, leading to a kernel OOM panic.

I have created 2 issues for my problems:

Hi, great new binding! thanks"! i noticed a view things: i have a g4 doorbell. i receive the ring event twice. the item changes from closed to open and back to closed. some seconds later again to open and then again to closed. but the ring button was pushed only once.

also noticed that for my g5 bullet and g3 instant i can not find any trigger channels as mentioned in the docs

and when using the 2way audio, i push the microphone button on the video, browser has permissions but no sound is sent to the camera.

as this is not the official binding thread, i dont know if its ok to post this here but i learned for other bindings there is one thread with all issues/discussions. i can post somewhere else if more appreciated.

@digitaldan

Is this binding also supposed to work with a UDM SE? My NVR thing unfortunately stays offline. Nothing too relevant in the logs when I disable/enable the thing (debug level):

2026-01-14 19:52:47.165 [WARN ] [ty.util.ssl.SslContextFactory.config] - Trusting all certificates configured for Client@e38ddab[provider=null,keyStore=null,trustStore=null]
2026-01-14 19:52:47.165 [WARN ] [ty.util.ssl.SslContextFactory.config] - No Client EndPointIdentificationAlgorithm configured for Client@e38ddab[provider=null,keyStore=null,trustStore=null]

Edit: my log level change was not saved the first time. There is actually more output:

2026-01-14 20:04:10.141 [DEBUG] [ernal.handler.UnifiProtectNVRHandler] - Initializing NVR
2026-01-14 20:04:10.142 [DEBUG] [ernal.handler.UnifiProtectNVRHandler] - Initialization failed
java.lang.IllegalStateException: Failed to start Jetty clients
        at org.openhab.binding.unifiprotect.internal.api.UniFiProtectApiClient.<init>(UniFiProtectApiClient.java:111) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.handler.UnifiProtectNVRHandler.lambda$1(UnifiProtectNVRHandler.java:144) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.IllegalStateException: HttpClient is not running (did you forget to start it?): HttpClient@c7db033{STOPPED}
        at org.eclipse.jetty.websocket.client.WebSocketClient.doStart(WebSocketClient.java:416) ~[?:?]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.api.UniFiProtectApiClient.<init>(UniFiProtectApiClient.java:109) ~[?:?]
        ... 7 more
2026-01-14 20:04:15.143 [DEBUG] [ernal.handler.UnifiProtectNVRHandler] - Initializing NVR
2026-01-14 20:04:15.144 [DEBUG] [ernal.handler.UnifiProtectNVRHandler] - Initialization failed
java.lang.IllegalStateException: Failed to start Jetty clients
        at org.openhab.binding.unifiprotect.internal.api.UniFiProtectApiClient.<init>(UniFiProtectApiClient.java:111) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.handler.UnifiProtectNVRHandler.lambda$1(UnifiProtectNVRHandler.java:144) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.IllegalStateException: HttpClient is not running (did you forget to start it?): HttpClient@c7db033{STOPPED}
        at org.eclipse.jetty.websocket.client.WebSocketClient.doStart(WebSocketClient.java:416) ~[?:?]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.api.UniFiProtectApiClient.<init>(UniFiProtectApiClient.java:109) ~[?:?]
        ... 7 more
2026-01-14 20:04:20.145 [DEBUG] [ernal.handler.UnifiProtectNVRHandler] - Initializing NVR
2026-01-14 20:04:20.146 [DEBUG] [ernal.handler.UnifiProtectNVRHandler] - Initialization failed
java.lang.IllegalStateException: Failed to start Jetty clients
        at org.openhab.binding.unifiprotect.internal.api.UniFiProtectApiClient.<init>(UniFiProtectApiClient.java:111) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.handler.UnifiProtectNVRHandler.lambda$1(UnifiProtectNVRHandler.java:144) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.IllegalStateException: HttpClient is not running (did you forget to start it?): HttpClient@c7db033{STOPPED}
        at org.eclipse.jetty.websocket.client.WebSocketClient.doStart(WebSocketClient.java:416) ~[?:?]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[?:?]
        at org.openhab.binding.unifiprotect.internal.api.UniFiProtectApiClient.<init>(UniFiProtectApiClient.java:109) ~[?:?]
        ... 7 more
thomas@openhab:~$ 

Same here. I opened an issue:

For those of you who got the binding working: What NVR device are you using?

UDM-Pro.

Keygen 2plus

Sorry, i missed the comments on this thread. If there are issues with the binding please open a github ticket, its the best way to get my attention.

I also i have a huge PR i will open up soon that adds in the private api, so the binding will use both apis, this will basically expose every possible feature to openHAB (was trying to avoid the private api, but the public one is just not complete enough yet).

1 Like

Aha! That way, all the channels that were there in the old binding (e.g. is-dark) will also be there in your binding?

Yes, is-dark is there and working, i just need to review it one more time before opening a PR, its a lot of code as it speaks to two very different APIs (and looking around, it seems using both is how other projects are doing it as well).

2 Likes

For some reason none of my devices have channels at all - the is-dark one was the actual one I was looking for as I use it to trigger lights outside when it’s dark :grin:

Any idea when this will be merged?

I’m looking forward to it as well! Hope you soon find time for your magic, @digitaldan :blush:

Hi sorry for the late reply, i finally got a PR open for this, hopefully this gets reviewed soon and into our nightly builds.

The README has the full list of camera channels, its very long

PR:

1 Like

@digitaldan, this question mark seems odd?

Its hard to see with only a partial screenshot and no description, Can you elaborate where you are seeing this and maybe a little more of the UI ? I think its a channel description, but the online status seems odd there. In any case it seems like it trying to load a missing icon for the openHAB channel semantic tag, but i’m not seeing that on my system.

Apologies, I thought that would have been enough. Also, I was on my phone, which is less convenient for screen shots.

It shows a Channel Link, from an Item UI view. Some more detail:

When looking at it from the Thing UI view, there’s an icon:

But where there’s an I for is-dark:

… there’s also ? in the Item UI view (although now there’s no icon to be loaded, just a letter I):

These are just semantic tags issues with the Main UI for those couple of more advanced channels, they don’t affect the functionality at all of the binding or channel. I’ll see if i can update the xml description for those channels next time i make an update to something else in the binding.

I didn’t assume there were any functional problems. But I reckon you like to dot the i’s and cross the t’s :wink:

1 Like

@digitaldan, I don’t see anything about this enhancement in the overview of changes of 5.1.4?

But the PR was merged?