Yes, see UniFi Protect Binding (Cloudkey gen2+, Dream Machine Pro, NVR) - #400 by ErikDB and following As well as G5 Bullet - Binding stops working properly after roughly two hours · Issue #23 · seaside1/unifiprotect · GitHub
interesting wich version of openhab do you use ?
4.2.2
It seems the developer of the binding doesn’t have time at the moment to look at this. Is there anyone else who understands how the binding works, and might have an idea how to (help me) fix this issue?
that is what i have aswell and unifi dream machine se maybe try to manually install the latest jar from his github repo that is what i have aswell https://github.com/seaside1/unifiprotect/releases/download/unifiprotect-4.0.0-v1.4/org.openhab.binding.unifiprotect-4.0.0-latest.jar plus my config is done via files not ui and i have in the unifi a user for openhab with full permissions for unifi protect
I think I had the latest jar installed, but to be sure, I overwrote the file now, and rebooted the Linux machine on which openHAB is running.
The binding works now. But that has been the case after every restart. So I expect it to break down within a few hours again. I’ll try to update later today.
I checked just now, and the binding doesn’t pick up on motion anymore.
The reboot was at 12h00. If I glance at the logs, I see a first error some 2h15m later:
2024-10-08 14:15:36.328 [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) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:732) ~[bundleFile:9.4.54.v20240208]
at org.openhab.binding.unifiprotect.internal.model.request.UniFiProtectRequest.sendRequestGetResponse(UniFiProtectRequest.java:170) ~[bundleFile:?]
at org.openhab.binding.unifiprotect.internal.model.request.UniFiProtectRequest.sendRequest(UniFiProtectRequest.java:121) ~[bundleFile:?]
at org.openhab.binding.unifiprotect.internal.model.UniFiProtectNvr.refreshEvents(UniFiProtectNvr.java:190) [bundleFile:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.propertyChange(UniFiProtectNvrThingHandler.java:512) [bundleFile:?]
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268) [?:?]
at org.openhab.binding.unifiprotect.internal.event.UniFiProtectEventManager.actionEventDetected(UniFiProtectEventManager.java:97) [bundleFile:?]
at org.openhab.binding.unifiprotect.internal.event.UniFiProtectEventManager.propertyChange(UniFiProtectEventManager.java:70) [bundleFile:?]
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268) [?:?]
at org.openhab.binding.unifiprotect.websocket.UniFiProtectEventWebSocket.onFrame(UniFiProtectEventWebSocket.java:126) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor49.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onFrame(JettyAnnotatedEventDriver.java:210) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:99) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:326) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:225) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:259) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:459) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:440) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:555) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.54.v20240208]
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) ~[?:?]
... 15 more
This error comes back a number of times.
I’ve got the impression @Seaside is not able to look at the problem for a while… Is there anyone else who understands how it all works under the hood?
i forgot i had a rule for things like this:
var lastKnownStatus = typeof lastKnownStatus !== 'undefined' ? lastKnownStatus : {};
var consecutiveOffline = typeof consecutiveOffline !== 'undefined' ? consecutiveOffline : {};
var restartInProgress = typeof restartInProgress !== 'undefined' ? restartInProgress : {};
var dailyOfflineDuration = typeof dailyOfflineDuration !== 'undefined' ? dailyOfflineDuration : {};
const excludedThings = [
"shelly:shellypro2-relay:1",
"shelly:shellypro2-relay:2"
];
rules.JSRule({
name: "Thing Status Monitoring and Management",
description: "Proactively manages Thing statuses, performs hourly restarts, and provides daily offline summaries.",
triggers: [
triggers.GenericCronTrigger("0 0 * * * ?"), // Hourly
triggers.GenericCronTrigger("0 * * * * ?"), // Minutely
triggers.GenericCronTrigger("59 59 23 * * ?") // Daily summary
],
execute: (module, input) => {
const allThings = things.getThings();
const now = new Date();
const isHourlyRestart = (now.getMinutes() === 0);
const thingsToRestart = [
"unifiprotect:nvr:house",
"unifi:controller:udm_house"
];
const relatedThings = [
"unifiprotect:g5camera:hangaar:back_entry",
"unifiprotect:g4camera:hangaar:front_entry"
];
// Hourly Restart
if (isHourlyRestart) {
for (const thingId of thingsToRestart) {
const thing = things.getThing(thingId);
if (thing && thing.isEnabled) {
executeRestart(thing, "hourly routine");
relatedThings.forEach(id => restartInProgress[id] = true);
setTimeout(() => relatedThings.forEach(id => restartInProgress[id] = false), 10000);
}
}
}
// Minutely Status Checks & Actions
for (const thing of allThings) {
const thingId = thing.uid;
if (restartInProgress[thingId]) continue; // Skip if in restart
const currentStatus = { status: thing.status, isEnabled: thing.isEnabled };
try {
if (!lastKnownStatus[thingId] || JSON.stringify(lastKnownStatus[thingId]) !== JSON.stringify(currentStatus)) {
if (thing.status !== "ONLINE" || !thing.isEnabled) {
executeRestart(thing, `status change (${thing.status}, ${thing.isEnabled})`);
}
consecutiveOffline[thingId] = 0; // Reset on status change
} else if (!excludedThings.includes(thingId) && (thing.status !== "ONLINE" || !thing.isEnabled)) {
consecutiveOffline[thingId] = (consecutiveOffline[thingId] || 0) + 1;
if (consecutiveOffline[thingId] >= 60) {
actions.notificationBuilder(`Persistent Issue: ${thing.label} (${thingId}) has been ${thing.status} for 60 minutes.`).withTitle(`Persistent Issue`).withIcon('f7:arrow_2_circlepath_circle_fill').withTag('Things').addUserId('blabla@gmail.com').send();
consecutiveOffline[thingId] = 0; // Avoid spamming
}
}
lastKnownStatus[thingId] = currentStatus;
if (excludedThings.includes(thingId) && thing.status !== "ONLINE") {
dailyOfflineDuration[thingId] = (dailyOfflineDuration[thingId] || 0) + 1;
}
} catch (error) {
console.error(`Error handling Thing ${thing.label} (${thingId}):`, error);
}
}
// Daily Summary (end of day)
if (now.getHours() === 23 && now.getMinutes() === 59) {
const offlineSummary = Object.entries(dailyOfflineDuration)
.filter(([id, duration]) => duration > 0)
.map(([id, duration]) => {
const thing = things.getThing(id);
return `${thing ? thing.label : id} (${duration} minutes)`;
});
if (offlineSummary.length > 0) {
actions.notificationBuilder(`Daily Offline Summary:\n${offlineSummary.join(', ')}`)
.withIcon("f7:arrow_2_circlepath_circle_fill")
.withTag("Things")
.withTitle("Daily Offline Summary:")
.withReferenceId("things-1") // Future reference
.addUserId("blabla@gmail.com")
.send();
}
dailyOfflineDuration = {}; // Reset
}
}
});
function executeRestart(thing, reason) {
console.log(`Restarting ${thing.label} (${thing.uid}) due to: ${reason}`);
thing.setEnabled(false);
restartInProgress[thing.uid] = true;
setTimeout(() => {
thing.setEnabled(true);
restartInProgress[thing.uid] = false;
}, 5000);
}
So i remove the automatic restart script and then i get errors like this after some time
2024-10-09 00:23:53.329 [ERROR] [websocket.UniFiProtectEventWebSocket] - Failed to decode frame, not enough byte: 0
2024-10-09 00:28:08.508 [ERROR] [al.model.json.UniFiProtectJsonParser] - Failed to parse bootstrap json
2024-10-08 22:55:16.689 [ERROR] [l.thing.UniFiProtectBaseThingHandler] - Failed to set thumbnail, event type not present: UniFiProtectEvent [type=smartDetectZone, start=1728420908351, end=null, martDetectTypes=[person], smartDetectEvents=[]] or invalid heatmap: null
I found these as well. But if you log on DEBUG
or TRACE
level, you’ll see more “failed” things, I expect.
Hi!
Sorry, yes short on time mostly. It is what it is unfortunately. I have made a fix for a bug that I had that caused a disconnect if the websocket. I’ll commit that fix and will start to look at the bootstrap related stuff.
That error got present with Protect 5 release and has blocked me for fixing any other errors since my system was not working at all.
Maybe I’ll install your fix first, and then send you new json bootstrap files?
I don’t think it would matter, bootstrap will look the same independently of the unifiprotect addon.
But you can test it out if you like Release unifiprotect-4.0.0-v1.4 · seaside1/unifiprotect · GitHub
unifiprotect-4.0.0-v1.4
- Added UVC AI Pro
- Fixed issue with socket getting closed when camera is offline
I’ve made a fix for the cpu 0 error you had. Please try it out and see if it solves your problem.
Unfortunately no luck. I installed the new jar, and rebooted the openHAB system around 5h57. As usual, it went well for a while, but then:
2024-10-15 08:10:41.146 [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) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:732) ~[bundleFile:9.4.54.v20240208]
at org.openhab.binding.unifiprotect.internal.model.request.UniFiProtectRequest.sendRequestGetResponse(UniFiProtectRequest.java:170) ~[bundleFile:?]
at org.openhab.binding.unifiprotect.internal.model.request.UniFiProtectRequest.sendRequest(UniFiProtectRequest.java:121) ~[bundleFile:?]
at org.openhab.binding.unifiprotect.internal.model.UniFiProtectNvr.refreshEvents(UniFiProtectNvr.java:190) [bundleFile:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.propertyChange(UniFiProtectNvrThingHandler.java:516) [bundleFile:?]
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268) [?:?]
at org.openhab.binding.unifiprotect.internal.event.UniFiProtectEventManager.actionEventDetected(UniFiProtectEventManager.java:97) [bundleFile:?]
at org.openhab.binding.unifiprotect.internal.event.UniFiProtectEventManager.propertyChange(UniFiProtectEventManager.java:70) [bundleFile:?]
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335) [?:?]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268) [?:?]
at org.openhab.binding.unifiprotect.websocket.UniFiProtectEventWebSocket.onFrame(UniFiProtectEventWebSocket.java:126) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor49.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onFrame(JettyAnnotatedEventDriver.java:210) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:99) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:326) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:225) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:259) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:459) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:440) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:555) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.54.v20240208]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.54.v20240208]
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) ~[?:?]
... 15 more
And this error keeps popping up periodically.
Upon rebooting openHAB, I see this error:
18:33:11.114 [WARN ] [b.core.thing.binding.BaseThingHandler] - Handler UniFiProtectG5CameraThingHandler of thing unifiprotect:g5camera:f4b3b5f657:F4E2C676310A tried accessing its bridge although the handler was already disposed.
18:33:11.333 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: Cannot invoke "org.openhab.binding.unifiprotect.internal.types.UniFiProtectCpuInfo.getAverageLoad()" because the return value of "org.openhab.binding.unifiprotect.internal.types.UniFiProtectSystemInfo.getCpu()" is null
at org.openhab.binding.unifiprotect.internal.types.UniFiProtectNvrDevice.getCpuAverageLoad(UniFiProtectNvrDevice.java:372) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.refreshChannel(UniFiProtectNvrThingHandler.java:329) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.refreshNvrChannels(UniFiProtectNvrThingHandler.java:234) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.refresh(UniFiProtectNvrThingHandler.java:212) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.run(UniFiProtectNvrThingHandler.java:170) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
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) [?:?]
I’ll send you my bootstrap as it is now.
This authentication error is not the same as the first one you had “because the return value of “org.openhab.binding.unifiprotect.internal.types.UniFiProtectSystemInfo.getCpu()” is null”
Double verify you have entered correct credentials, double verify that you only have one version of the binding installed
In openHAB Console you can do this:
openhab> bundle:list|grep -i “unifi Protect”
You should only get one row, please post the version you have installed
openhab> bundle:list|grep -i "unifi Protect"
325 │ Active │ 80 │ 4.0.0.202410141758 │ openHAB Add-ons :: Bundles :: UniFi Protect Binding
&
erik@MinipcLG2:/usr/share/openhab/addons$ ls -lap
totaal 4220
drwxr-xr-x 2 openhab openhab 4096 okt 8 12:00 ./
drwxr-xr-x 4 openhab openhab 4096 sep 30 03:47 ../
-rw-r--r-- 1 root root 3539683 aug 25 17:42 no.seime.openhab.binding.esphome-4.1.0-SNAPSHOT.jar
-rw-r--r-- 1 root root 581448 aug 5 21:29 org.openhab.binding.shelly-4.3.0-SNAPSHOT.jar
-rw-r--r-- 1 root root 182887 okt 15 05:54 org.openhab.binding.unifiprotect-4.0.0-latest.jar
-rw-r--r-- 1 openhab openhab 70 sep 29 21:23 README
I thought that maybe I should’ve installed org.openhab.binding.unifiprotect-pre-4.0.0-v1.5.jar
, rather than org.openhab.binding.unifiprotect-4.0.0-latest.jar
, so I installed org.openhab.binding.unifiprotect-pre-4.0.0-v1.5.jar
.
Now I don’t see any errors on openHAB startup, only this:
15:26:53.541 [WARN ] [b.core.thing.binding.BaseThingHandler] - Handler UniFiProtectG5CameraThingHandler of thing unifiprotect:g5camera:f4b3b5f657:F4E2C676310A tried accessing its bridge although the handler was already disposed.
Since 202410141949
is a bigger number than 202410141758
, I assume this was the correct jar.
openhab> bundle:list|grep -i "unifi"
327 │ Active │ 80 │ 4.0.0.202410141949 │ openHAB Add-ons :: Bundles :: UniFi Protect Binding
To be complete:
erik@MinipcLG2:/usr/share/openhab/addons$ ls -pal
totaal 4220
drwxr-xr-x 2 openhab openhab 4096 okt 16 14:56 ./
drwxr-xr-x 4 openhab openhab 4096 sep 30 03:47 ../
-rw-r--r-- 1 root root 3539683 aug 25 17:42 no.seime.openhab.binding.esphome-4.1.0-SNAPSHOT.jar
-rw-r--r-- 1 root root 581448 aug 5 21:29 org.openhab.binding.shelly-4.3.0-SNAPSHOT.jar
-rw-r--r-- 1 root root 182921 okt 16 14:50 org.openhab.binding.unifiprotect-pre-4.0.0-v1.5.jar
-rw-r--r-- 1 openhab openhab 70 sep 29 21:23 README
Let’s see how this one works!
Maybe I mixed up latest and the v1.5, but will be interesting to see if it works.
Still going strong!
However, the logs still show this:
2024-10-16 17:27:10.630 [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.refreshBootstrap(UniFiProtectNvr.java:166) ~[?:?]
at org.openhab.binding.unifiprotect.internal.model.UniFiProtectNvr.refreshProtect(UniFiProtectNvr.java:223) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.refresh(UniFiProtectNvrThingHandler.java:206) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.run(UniFiProtectNvrThingHandler.java:170) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
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
(repeated at 2024-10-16 19:27:27.674
and 2024-10-16 21:27:45.273
(so I expect it again at 23:27…?))
I also see there are 429 bootstrap files created since I installed the latest jar file. That doesn’t seem right.
So there’s still something not fully as it should be, I assume?