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

@Joeknx did you get it working? The json response will tell if there is a bug or whats going on.

Regards s

Thanks for the question! I readded everything. The Addon, the bridge and the camera. Now it works!
I did not know how to run the Karaf console.

1 Like

Glad to hear. Well if it works no need for debugging right?

Regards S

Thanks for the great work and the support!

1 Like

I have installed the binding on Openhab 3 Snapshot build. I added a few cameras (things) but nothing more. After a few hours openhab slows down and the following errors appear in the log - [ab.core.internal.events.EventHandler] - Dispatching event to subscriber ‘org.openhab.core.internal.items.ItemUpdater@e3070’ takes more than 5000ms.
I have removed the binding and openhab is now operating normally.
Let me know if you need any further info.


I’ll investigate. I’m curios if there are any others using this addon for openhab 3 that are experiencing the same problem?
Also there seems to be an issue with openhab 3 running out of memory:


I’ll post back once I have any findings.
What version of Openhab 3 are you using?

Regards, S

If it’s a matter of CPU load, actually I also had this problem. I do not know for sure whether it was “caused” by the UniFi Protect or the http binding (*) since those two covered the logs with tons of warnings.
At the end, I removed both bindings, cleared the cache and reinstalled everything. I guess clearing the cache was the bringer at the end, since I deleted / reinstalled the bindings several times before. Maybe you can try this @Tim2016?

(*) I am sure the problem was not caused by one of the bindings itself, especially since http binding is just a released one and now everything is working fine and the bindings did not change.

1 Like

Hi @wosch87, I had already cleared cache and rebooted several times. As soon as I removed the binding the errors went away. I do not currently use the http binding.

@Seaside - Openhab 3.1.0 Build 2212.

I have also noticed the following error in the log - org.apache.cxf.interceptor.Fault: unable to create native thread: possibly out of memory or process/resource limits reached.

Openhabian running on an RPI 4 B with 4GB RAM.

What other bindings are you using? Do you have any rules that are running?
I have not run UniFi Protect that much with OH3 since I’m developing some other bindings at the moment for OH3 and I try to keep each environment somewhat clean. I have now launched it in OH3 so waiting for results.

My impression so far is that there are OOM issues with OH3 in general, see the thread above I posted. The binding with exactly the same code has been running for more than 1 month in my OH 2.5 instance where I have 10+ cameras a lot of events and on top of that debug is enabled. And I have not seen any memory /cpu issues. If there is a OOM bug I suspect it then would be related to how the binding is utilizing the openhabcore and that something has changed there.

Regards S

Hi @Seaside,

I am using the following: Amazon Echo Control, Harmony Hub, Hue, iCloud, Milight, Modbus, MQTT, Neato, Nest, Netatmo, Pioneer AVR, Samsung TV, System Info, Telegram, Tradfri, Unifi and Z-Wave.

I have 15 rules running but they are only triggered infrequently.

I also started afresh with OH3. I did previously upgrade but could not get OH stable and based on reading a few posts I took the opportunity to build OH3 from scratch. So I have almost no textual config.

I’ve been running for 3 days now on an RPI3, where I have rules for motion dection on the cameras. Running 7 cameras and also periodically doing snapshots with rules.
The memory has increased from 29% to 30.4% in 3 days. Hard to tell if it is a memory leak or not.

Referencing to https://community.openhab.org/t/openhab-3-runs-out-of-memory-java-heap-space-errors-cpu-100-after-a-few-hours/

There is a bug with DSL GUI rules as well as DSL text rules which leads to OOM.
I think you have to re-evaluated once those bugs are fixed. I don’t think there is a specific memory leakage in this particular addon (could be wrong but that’s my feeling).

Regards, S

Thanks for looking @Seaside . I will attempt to re-install again. It could be well be linked to the java issue.

1 Like

Interesting binding. I got a UDM-Pro and am waiting for the G4 doorbell to be available in the EU.
As soon as it is available this binding might be a perfect addon to make full use of it.
Added this thread to the favorites :slight_smile:

1 Like

Just ordered a g4 doorbell in eu store, finally in stock, I plan on adding features for doorbell once I have it :+1:

1 Like

Allready sold out :frowning: i signed up to get a ‘back in stock’ notification.

1 Like

I have added a alpha10 build which handles reboots of the nvr (restarts the event listener) I have also removed a lot of the info logging (moved to debug)

Could you please explain how to update to alpha10? Is it simply replacing the file in the addons folder? Will the settings such as the things and items themselves be kept or is it necessary to setup them again?

Sorry for the stupid question, but I never worked with bindings which are not implemented in the official repo yet.

You can just replace the jar, a restart won’t hurt either to be on the safe side. You don’t have to recreate any items or change any existing configuration.

Regards S

1 Like

Breaking change and major update.

Added G3 Camera type, G4 Camera type and G4 Doorbell.
Possible to do smart detection, custom lcd message on doorbell and detect ringing events.
See first post for more info.
If you plan on upgrading, I would suggest to delete all cameras and the bridge and then readd them from scratch. Should be quick with discovery of the cameras.

The Camera thing type has been renamed from camera to g3camera, g4camera and g4doorbell.

1 Like

Added an ALPHA12 build which fixes an issue with downloading heatmaps.