@Seaside Lately the binding seems to be randomly soft disconnecting or something, you know, doorbell rings, openhab doen’t know anything about it, and the way to get it back is to uninstall and reinstall the binding (just restarting doesn’t work). Sometimes the binding throws an error about a missing token, others the binding thinks it’s connected. It seems to happen whenever either openhab is updated / restarted or the Unifi Protect application is updated / restarted (it got updated last night to 2.2.6). I’ve resorted to a cron job that uninstalls and reinstalls the binding at midnight. What can I provide to you to help troubleshoot this strange behavior? It clearly seems that this is not the case for most users.
I have some code for the Doorbell pro, after that I’ll take a look again.
For me I’ve never seen this. I have occasionally gotten the event API to be down, but that has been fixed with a restart of the binding.
In the Protect ap does it display any error, offline or similar?
Sorry for the late reply, no errors in Unifi itself. All I have to do is something like restart openhab and it goes offline until my script fires, sees that it is offline, and reinstalls the binding. There’s nothing that I can see where Unifi itself is causing this. I can reproduce this at will so if you want me to do anything to get you data I can.
I think I know the cause. Again the case of 2 versions of the binding installed.
I was doing this:
install binding from Marketplace
uninstall that binding via CLI
install binding from GitHub via CLI
This should result in ONE binding installed. But then I saw in the log when openHAB started, that it AUTOMATICALLY installed a “missing binding”.
And then the version of the Marketplace was installed again.
I now uninstalled that one via the UI and it looks like this is settled now.
But this should not be different from uninstalling via the CLI IMHO.
Love the binding, works pretty well except for the “invalid heatmap: null” errors, even with the heatmap items and img items commented out (I have no need/use for them)
But I just noticed another oddity that I was hoping you could look into.
The “RecordingMode” read/write switch. I wanted the ability to change the recording mode, so as a test, I have my cameras set to always (1) record, though through changing it via the sitemap with the 0=Never, 1=Always, 2=Motion, I tried toggling to 0/Never, and the sitemap will update to Never, but if I have UniFi protect open and have the camera up, it never changes from Always to Never, and after about a minute in the OpenHAB Sitemap, it goes back to Always.
Then I remembered my OpenHAB user may have only had read-only permissions, so I went into UniFi and granted it full management of the UniFi Protect app,
Tried it once and it successfully switched from Always to Never and updated in UniFi too, but after that it won’t change anymore. I’ve set it to Always in UniFi, and tried changing it back to Never via OpenHAB but nothing happens.
Is there something I’m missing, or anything else I can check? It worked once so I know it’s set up properly, but something seems to have gotten hung up.
I’m glad you find the binding useful!
I’m going to put some work on this binding, and I’ll add options to not use heatmaps.
Regarding recording mode, I have not tested in a while, I’ll test it.
It could be that the naming in the UniFi api has change or something else, I’ll try to have a look at it.
First of all … @Seaside thanks for creating this binding!
I would love to integrate my G4 doorbell, but I am not managing to do so.
My NVR connection works and it also detects all my devices - 3 cameras - but once I create the things from the scanned list, I only get null values. Even for the camera names, which were listed in the scan process.
Unifi Protect Version 2.2.6
OH version 3.1.1
Any ideas what the issue might be? I have enabled the debug logging, but I am not too sure what to look out for in the payload to see if things work.
Hi
Protect v 2.2.9
Unifi OS UCK G2 Plus 2.5.11
Camera G3 Instant
OpenHAB 3.4.2
Latest version of the binding.
On the IP adress of the cam in incognitode mode I can see with url http://192.168.1.227/snap.jpeg I can see a still image. If I refresh I see the new image.
I made an item of type image for the snapshot and the anonymous snapshot, I configured the switch for the snapshot, I enabled and disabled a snapshot folder, … All I get is a greyed out image. Tried the anonymous snapshot (enabled it), tried the snapshot, the last motion detection image… All i get is grayed out images.
I tried the snapshot URL as a oh-image card, to no avail…
I’m a little bit beyond imagination.
It’s just not clear to me what the actual function of the binding can be, as the only thing I want is when I call the page an actual view of what the camera sees, no video stream needed.
Edit: As for now I get the actual data from Last Motion and the camera name and in the openhab tmp folder (/var/lib/openhab/tmp) I got 1 image from the motion detection, don’t know how
Yes I can add support for G5, but I need the bootstrap.json to see what it looks like.
if you enable debug log, and send me the bootstrap.json as a privte message I can add support for G5.
In openHAB karaf console, enter the following command
It’s a bit hard for me to understand what the problem is. Possibly you can enable debug log and see what binding says. Also check the openhab log for error messages.
Just upgraded from a G4 Doorbell to a G4 Doorbell Pro, I am missing some doorbell channels.
Is the G4 Pro supported ? It doesautomatically auto discover as a G4Camera. Do I have to manually add it as a g4 Doorbell with the associated MAC address?
The main one i care about is the " is-ringing " channel.
This was my old G4 Doorbell:
unifiprotect:g4doorbell:UniFiProtect:D0xXxXxXxX:is-ringing
Now it detects it as a G4 Camera, not a G4 Doorbell.
unifiprotect:g4camera:UniFiProtect:ACxXxXxXxXxX
Binding is installed from the Community Marketplace, running openHAB 3.4.2 - Release Build
There is no support for G4 pro doorbell. I have added support in a pre-release, but never got confirmation that everything worked. I’ll try to dig up that build and you can test it out if you like?