I’m new to OpenHAB. I have just installed this custom binding.
I got UDM Pro thing added and discovery worked. So I added my G4 Doorbell.
Now every points in G4 Doorbell are Null and even if I push doorbell, it won’t change. If I click snapshot image its blank. I have turned on anonymous snapshot on individual camera.
The fact all points are NULL, I wonder despite auto discovery, somehow my devices are not correctly communicating with OpenHAB. Where can I start?
Hi!
What firmware version are you using? What version of unifi protect? What version of openhab? And what version of the binding?
Try restarting openhab and look at the openhablog, do you see anything that stands out?
Please post a sample of your items definition as well. Next step would be to enable debug logging.
The fact that you can discover devices tells me that the authentication is working.
UDM Pro 1.9.3
Protect version 1.17.4
OpenHAB 3.0.1
Binding 3.0.0-ALPHA12
I am not sure how I can get code version of item.
As I try to get log viewer going, I noticed my LXC version of HABian do not open the log viewer while Rasberry Pi or VM version do. I might have to dig a bit more to see if my physical setup itself is an issue.
I will ask a bit more detailed question once I can figure out my issue is.
I got it to work. Not exactly sure the issue was. May be there is some lag before it connected.
One question is I read one of future plan is to include live stream, but in the mean time, I would like to test out RTSP stream. I have been trying to you IP Camera generic binding but I am not sure what to supply on IP address & Port.
Glad to hear it is working for you!
I would like to include live streams, but for me personally I have seen the need so far.
If people using this binding want live stream I will look into it of course.
HomeSeer uses serial snapshot images as their way of Live Streaming. It is fast and real time, but no audio and ultra-low frame rate.
Home Assistant has real live streaming, but that requires some buffering; therefore, smooth frame rate yet it is several seconds behind the real time.
If I may dream, I would like to see a combination of the two. But in OpenHAB this may be more of a Widget request rather than Binding.
If so, what I may be wanting from the binding side are:
Stream URL outputs from the Binding.
I believe this is essentially what IP Camera bindings does PLUS snapshot.jpeg URL output each.
The latter may be as simple as
snapshot URL Channel = http://[Camera IP address].snap.jpeg
Having all things into single UniFi Protect Binding would absolutely help someone like myself i.e. novice to OpenHab. I spent a few days trying to figure out and more than few times during the process I was going to give up saying OpenHab does not support UniFi Camera streaming.
Lastly, I am not sure if it is under your control vs. limitation of OpenHAB, it is responsive but not as fast as Homebridge or HomeAssistant when I try creating Doorbell Push to Speaker TTS simple two step automation. OpenHAB one takes 2-3 seconds while other two is ~1 sec.
I’ll have a look at this. I could be lag in the platform in combo with tts and sonos (which is the setup I use). Both homeassistant and Homebridge uses the same websocket api that is used by this binding, so the lag should be about the same. It should be measurable though to see where the bottleneck is.
thank you very much for your binding. I’m really looking forward to using it on my system. I do however have a problem with the current release.
I have created a new openhab installation from scratch because I have seen the same issue in my production environment and wanted to rule out some side effects from the large amount of rules, etc. I have running.
In the test environment I’m running a plain OH 3.0.2 install with an mqtt binding (because I need to forward the “is ringing” to a mqtt broker and your alpha 13 binding.
As soon as I add my NVR as a thing (without any cameras) the java process of OH inhales and takes as much memory as it can.After around 10 minutes it went up from 5MB idle without your add-on to 17.5GB just after adding the NVR as a thing.
I’m running Unifi Protect 1.19.0-beta.10 if this makes a different.
Another thing that might be of interest, I’m running openhab in a docker container.
There is one error in the openhab.log
2021-06-07 11:30:34.493 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.openhab.binding.unifiprotect.internal.types.UniFiProtectNvrDevice.device0isPresent(UniFiProtectNvrDevice.java:408) ~[?:?]
at org.openhab.binding.unifiprotect.internal.types.UniFiProtectNvrDevice.getDevice0Model(UniFiProtectNvrDevice.java:371) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.refreshChannel(UniFiProtectNvrThingHandler.java:329) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.refreshNvrChannels(UniFiProtectNvrThingHandler.java:226) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.refresh(UniFiProtectNvrThingHandler.java:204) ~[?:?]
at org.openhab.binding.unifiprotect.internal.thing.UniFiProtectNvrThingHandler.run(UniFiProtectNvrThingHandler.java:166) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
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:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
I’m currently running on firmware 2.1.11 and unifi protect 1.18.0 on a cloud key gen2+.
Please check your firmware version as well (it’s available under settings general tab)
I can try the beta unifi protect version as well to verify that it works. The next step for you is to enable debug logging to see more in detail what is happening.
I’ll let you know when I have tested the beta.
So to wrap up:
Which firmware version?
What unifi protect hardware (controller) are you using ?
Can you access your nvr with for instance ssh from the docker container?
while writing my protect app version I was starting to think if that might be the issue.
I have downgraded my protect version to 1.18.1 (loosing everything I have recorded so far ;-)) and now it works as expected. Seems to be a problem with your binding and the new version of unifi protect.
Hi, after restarting the UDM Pro and my Raspberry PI the connection to the UniFi Protect NVR works. Now I tried to add my G4 camera.
I use the name of my camera and the mac address without the “:”. I get always the “online” status, even if I enter a wrong mac address. But all the channel values are NULL: