UniFi Protect Binding (Cloudkey gen2+, Dream Machine Pro, NVR)

where did you find this separate file when you set it to trace?
I only have the usual events, openhab and audit.log files in my log location

I bookmarked this post for moments like these :wink:

This creates a new file in the same directory.

1 Like

I have just installed the binding from Marketplace last week, I get the exact same issue. I have tried to find a solution in this and other topics, but have not been successful. Suggestions welcome.

After I did the separate log files, I am seeing this one as well.


2024-07-29 14:49:28.110 [DEBUG] [otect.internal.model.UniFiProtectNvr] - Request failed reason: EXECUTION_FAULT message: Execution fault when sending request to UniFi Protect
java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[?:?]
	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:732) ~[?:?]
	at org.openhab.binding.unifiprotect.internal.model.request.UniFiProtectRequest.sendRequestGetResponse(UniFiProtectRequest.java:170) ~[?:?]
	at org.openhab.binding.unifiprotect.internal.model.request.UniFiProtectRequest.sendRequest(UniFiProtectRequest.java:121) ~[?:?]
	at org.openhab.binding.unifiprotect.internal.model.UniFiProtectNvr.refreshEvents(UniFiProtectNvr.java:190) ~[?:?]
	at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.lambda$2(UniFiProtectNvrThingHandler.java:529) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) [?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) [?:?]
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) [?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	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:840) [?:?]
Caused by: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	at org.eclipse.jetty.client.AuthenticationProtocolHandler$AuthenticationListener.onComplete(AuthenticationProtocolHandler.java:164) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210) ~[?:?]
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:481) ~[?:?]
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:461) ~[?:?]
	at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:424) ~[?:?]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:374) ~[?:?]
	at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:596) ~[?:?]
	at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1723) ~[?:?]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1552) ~[?:?]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:208) ~[?:?]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:148) ~[?:?]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:80) ~[?:?]
	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:131) ~[?:?]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:172) ~[?:?]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[?:?]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:555) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164) ~[?:?]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[?:?]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) ~[?:?]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[?:?]
	... 1 more

Somewhere in that same log, thereā€™s a reference to a (or two?) json file(s). I believe @Seaside could use it for debugging, if you send him it.

The binding seems to have stopped working in my instance .
I am running Protect 4.0.33 with the latest binding offered in the ad-on store November 25, 2023 on OH 4.1.2.
non of the channels appear to be updating with actual values ether displaying null or off.
The log shows several errors like this

2024-08-07 20:40:48.364 [ERROR] [l.thing.UniFiProtectBaseThingHandler] - Failed to set heatmap, event type not present: UniFiProtectEvent [type=motion, start=1723063234569, end=null, camera=66b27ee6024e4603e4000417, score=100, id=66b3dbc603934603e40059b4, metadata=MetaData [objectType=null, objectCoords=null, objectConfidence=null], modelKey=event, partition=null, thumbnail=e-66b3dbc603934603e40059b4, heatmap=e-66b3dbc603934603e40059b4, smartDetectTypes=[], smartDetectEvents=[66b3dbc903e24603e40059b6, 66b3dbe102034603e40059c6]] or invalid heatmap: null

I have the heatmap options turned off i donā€™t think that is the issue.
OH reports the things as online and fine.

I already tried removing all the things, removing the binding, rebooting and installing fresh but still nothing appears to come thru the binding.

What next steps do i have to trouble shoot the issue?

@Red_Sackles, Iā€™ve got issues as well, Iā€™ll cross-reference your mentioned log with mine later today.

Iā€™ve shared my experiences above (read as from UniFi Protect Binding (Cloudkey gen2+, Dream Machine Pro, NVR) - #397 by ErikDB) and have opened a Github issue (G5 Bullet - Binding stops working properly after roughly two hours Ā· Issue #23 Ā· seaside1/unifiprotect Ā· GitHub).

The binding developer is on holiday, but asked me to send him the ā€˜bootstrap logsā€™. I figured out what that is, youā€™ll read it if you follow the first link. Thanks in advance to log what you can. I hope that speeds up the debugging whenever the magician is free to do his magic. :slight_smile:

Unrelated to the binding issue, I had hoped to use the camera as motion sensor to switch the porch lights. But Iā€™m beginning to fear the Unifi software classifies too much as motion (e.g. some night insects hovering in front of the camera)ā€¦

Using only ā€˜smart motionsā€™ or whatā€™s its name, puts the bar too low, it seems, as not all human activity is always correctly recognized by the AI.

Does anyone have experience with using the camera in such a way?

FYI, after the upgrade to openHAB 4.2.1, the binding was uninstalled on my systemā€¦ Installing it again fixed the issue (although I expect the above-mentioned issue of the binding stopping working after a period still persists.)

For motion detection an infrared or radar sensor is more reliable.
Not sure what the deal is with spiders but they seem to prefer to set up shop right in front of cameras. And yes all of that is counted as motion.

Hi there,

actually i got a problem with the binding:

Since update to Protect V5 my ā€œsnapshot streamā€ does not work anymore. Therefore i used a cam url like this http://10.0.140.11/snap.jpeg?cb=1711743078 and an image card on main ui.
Is there a way to get the snapshot or videostream url with a channel/item of the binding?

in protect 4.1.53 the channels are very sporadic in updates not very reliable sometime they update but after a couple of days not

The binding with openHAB, you mean?

Protect 5.0 is still Early Access, lots of stuff isnā€™t working (yet). I get updates almost on a daily basis

yes so i have some g5 ptz and a g4 doorbell pro and the binding show them online but most of the time lately no updates of the items ā€¦

edit saw this on homeassistant github UniFi Protect smart detection sensors are not turning on after Protect 4.1.x fix coming in 5.0.31 (ea) Ā· Issue #124967 Ā· home-assistant/core (github.com)

Protect 5.0 is stable. Anyone already tested it with this binding?

yes tested here with latest stable unifi protect and the binding seems to work ok

1 Like

wait just looked in the logs the only thing i see is:

[.core.thing.binding.BaseThingHandler] - Handler UniFiProtectG5CameraThingHandler of thing unifiprotect:g5camera:back:back_entry tried accessing its bridge although the handler was already disposed. 
1 Like

Does it continue to work, even hours after openhab restart? For example the ā€˜motionā€™ or ā€˜darknessā€™ channels?

yes so far for a couple of days you have problems ?