Ubuntu 23.10 server + Unifi-Controller

  • Debian 12 supported nicht länger MongoDB. Da ich weiter Updates für den Unift-Controller erhalten möchte, hab ich auf Ubuntu gewechselt

Zum Schluss nach ein Reboot und bei Bedarf das Backup vom alten Controller einspielen, wenn man wie ich von Debian12 auf Ubuntu wechselt

UNIFI-VIDEO start …fail!

Nach einem normalen Tag voller Updates meldet sich der NVR plötzlich ab und verweigert den Start. Aus den Logs lässt sich nur erahnen womit das ganze zusammen hängt.

Sep 15 14:59:19 video systemd[1]: Starting LSB: Ubiquiti unifi-video...
Sep 15 14:59:19 video unifi-video[1917]:  * Starting Ubiquiti UniFi Video unifi-video
Sep 15 14:59:20 video unifi-video[1996]: (unifi-video) Hardware type:Unknown
Sep 15 14:59:20 video unifi-video[1996]: (unifi-video) checking for system.properties and truststore files...
Sep 15 14:59:21 unifi unifi-video[1917]:    ...fail!
Sep 15 14:59:21 unifi systemd[1]: Started LSB: Ubiquiti unifi-video.

Nach kurzen suchen in UI Forum stieß ich auf ähnliche Beiträge und eine ganz simple Erklärung. Mit dem letzten Java Update hat es UNIFI-VIDEO entschärft.

Problem is the Java version. Latest that v3.10.13 video will run on is 8u275.
Also latest Camera FW that Video supports is "v4.23.8" - don't go above that!
  1. Download der Java Version „jre-8u271-linux-x64.tar.gz“
  2. Login als root (sudo su)
  3. mkdir /usr/local/java (wenn nicht schon vorhanden)
  4. cp jre-8u271-linux-x64.tar.gz /usr/local/java
  5. cd /usr/local/java
  6. tar zxvf jre-8u271-linux-x64.tar.gz
  7. rm jre-8u271-linux-x64.tar.gz
  8. update-alternatives –install „/usr/bin/java“ „java“ „/usr/local/java/jre1.8.0_271/bin/java“ 1
  9. update-alternatives –config java (auf meinem System war Auswahl „2“)
    *2 /usr/local/java/jre1.8.0_271/bin/java 1 manueller Modus
  10. echo „JAVA_HOME=/usr/local/java/jre1.8.0_271“ | tee -a /etc/default/unifi
  11. reboot (nun funktioniert auch der UNIFI-VIDEO wieder)

Unifi G3 Flex Snapshot

  • zum Einbinden in Mediola über die URL, da RTSP nicht unterstützt wird

Overview…

This requires you to allow API access for a user, the user needs View Camera privileges, copy the user API key, identify the camera you wish to retrive the snapshot from and copy it’s unique ID – all which are required to compile a URL which you can test in a browser and if successful you can use the URL as your snapshot request for your alarm system.

Step by Step…

1. Select a user that has View Camera privileges (admin users will have this by default).

2. Allow API Usage for this user and make a note of the API key for later.

3. Find and select the camera you want to take snapshots from, under RTSP Service, enable the RTSP Service to show the RTSP URL and copy the uniquie ID without the appended underscore and it’s corresponding integer. Make a note of this for later (you can now turn this off if it was originally off).

4. Compile the URL by replacing nvr_hostname_or_ip with the IP or hostname of your NVR, keep the port (7080) of the web UI unless changed, camera_id with the camera ID we copied in step 3, and user_api_key with the user’s API key copied in step 2… and we should have a URL as below:

http://<nvr_hostname_or_ip>:7080/api/2.0/snapshot/camera/<camera_id>?force=true&apiKey=<user_api_key>

Try the URL in a browser, preferably logout of the NVR first, and it should retrieve a JPEG snapshot.

For remote access you’ll need to forward port 7080.