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

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.

Hi!

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:

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

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.

@jshatch Did you solve your Alexa problems?

Basically I do this to invoke Alexa:

rule "doorBell"
when
     Item G4DBIsRinging changed to ON  
then
   logInfo(LOG, "First DoorBell is pushed! ") 
   AlexaKitchenDotTTS.sendCommand("Ding-dong! Someone is at the door!")
 end

Alexa Kitchen Dot tts is set up using amazonecho control binding:

String AlexaKitchenDotTTS                   "Text to Speech"                        (AlexaKitchenDot) {channel="amazonechocontrol:echo:f502a697:ID:textToSpeech"}
1 Like

Yeah, thatā€™s almost exactly what I did. At first I was trying to go the opposite direction and use the doorbell button to trigger a routine that sent an announcement, but you canā€™t do that. Then I saw the Amazon binding and that you can send text commands, and I linked all my echos together so they all say the same thing. I also send a command to the echo show to start viewing the camera using monocle.

1 Like