UniFi Proxy makes it possible to integrate third-party hardware into UniFi Protect

Overview

UniFi Proxy

UniFi Proxy makes it possible to integrate third-party hardware into UniFi Protect.

For testing purposes only, it is recommended to purchase hardware directly from the manufacturer and not to tamper with the system.

Generate new Adoption Token

To adopt a device in UniFi Protect it is necessary to generate a token for it. This token is only valid for 60 minutes and is deleted even after a service restart.

  1. Login into your local UniFi Controller (not unifi.ui.com).
  2. Open following URL https://unifi/proxy/protect/api/cameras/qr which shows an QR Code, if your Browser can't parse the DHCP Name you need to replace unifi with the Controllers IPv4 Address.
  3. Decode the QR Code with a Decoder for QR Codes.
  4. Copy the Adoption Token out of the QR Code Payload.

Generate a new KeyStore

For Communication with the Secure (HTTP/S, WSS) Protocol you need to create your own Certificate. Because Java can't read the raw PEM Files you need to import your Keypair into a Java KeyStore (JKS).

Since there were some problems with the Keytool CLI in the past, we use the KeyStore Explorer tool for this.

  1. Download the Java Key Store Explorer.
  2. Create a new KeyStore File:

  1. Generate new Client Certificate:
mkdir tmp
openssl ecparam -out ./tmp/private.key -name prime256v1 -genkey -noout
openssl req -new -sha256 -key ./tmp/private.key -out ./tmp/server.csr -subj "/C=TW/L=Taipei/O=Ubiquiti Networks Inc./OU=devint/CN=camera.ubnt.dev/[email protected]"
openssl x509 -req -sha256 -days 36500 -in ./tmp/server.csr -signkey ./tmp/private.key -out ./tmp/public.key
cat ./tmp/private.key ./tmp/public.key > ./tmp/client.pem
  1. Import your Certificate into KeyStore as OpenSSL Keypair.

  1. Select your Public and Private Key and untick the Password Checkbox.

  1. Rename the Imported Keypair to your UniFi Controller Host.

Adopting to Protect

If a device does not appear immediately, it may be that too many adoption requests have been sent. In most cases, this can be fixed by restarting the Protect Service.

Adding Recognition Templates

Experimental Feature (Hard CPU Usage)

Visit the Official GitHub Repository of OpenCV an look for predefined Templates under opencv/data/haarcascades.

Debug your Controller

To access your device you need to enable SSH on your Controller, sometimes you need to login as root to view all Directory's.

  • To find UniFi Protect Config: find / -name config.json

  • To find UniFi Protect Logs: find / -name logs

For example, we want to debug the camera.avclient Log.

In the current Controller Firmware Version we can use following Command: tail -f /srv/unifi-protect/logs/cameras.avclient.log

Find your Camera

I used following Tool to identify my Camera and the Stream Information:

You might also like...

This repository should serve as a guide to everybody who wants to study software and hardware for embedded systems but doesn't know where to start.

Roadmap to Embedded Engineering This repository should serve as a guide to anyone who wants to study software and hardware for embedded systems but do

Jan 4, 2023

Protect your Spigot server against IP forwarding exploits, as well as blocking unknown BungeeCord and/or Velocity proxies.

Sentey Protect your Spigot server against IP forwarding exploits, as well as blocking unknown BungeeCord and/or Velocity proxies. But firewalls are a

Dec 28, 2022

FIDO2(WebAuthn) server officially certified by FIDO Alliance and Relying Party examples.

FIDO2(WebAuthn) server officially certified by FIDO Alliance and Relying Party examples.

Overview FIDO (Fast IDentity Online) is an open standard for online authentication. It is designed to solve the password problems stemming from a lot

Jan 5, 2023

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Jan 2, 2023

The SPID/CIE OIDC Federation Relying Party, written in Java

The SPID/CIE OIDC Federation Relying Party, written in Java

SPID/CIE OIDC Federation, for Java SPID/CIE OIDC Federation (for Java) is a starter kit and example projects designed to ease the creation of an OpenI

Dec 13, 2022

The shortest possible maven template / quickstarter for Java 16

The shortest possible Java 16 maven quickstarter The shortest possible Apache Maven template for Java 16 usage git clone https://github.com/AdamBien/j

Nov 8, 2021

Harvest your animals in the most cursed way possible.

Harvest your animals in the most cursed way possible.

Reaping Harvest your animals in the most cursed way possible. By using the Reaper you can harvest food from animals as if you had killed them, but wit

Oct 23, 2022

This is the RestFul API using SpringBoot made to integrate the frontend of this repository.

This is the RestFul API using SpringBoot made to integrate the frontend of this repository. Requirements For building and running the application you

Jan 21, 2022

This plugin integrate your minecraft server with discord webhook

B_DiscordIntegration This plugin integrate your minecraft server with discord webhook PLUGIN FEATURES: Join / Quit message Chat preview Death message

Feb 11, 2022
Comments
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced by 27% 🎉

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /src/main/resources/github/qr-1.png | 24.83kb | 16.33kb | 34.25% | | /src/main/resources/github/keystore-4.png | 58.81kb | 42.40kb | 27.90% | | /src/main/resources/github/keystore-3.png | 62.80kb | 45.75kb | 27.16% | | /src/main/resources/github/keystore-2.png | 57.73kb | 42.80kb | 25.86% | | /src/main/resources/github/keystore-1.png | 77.42kb | 57.89kb | 25.22% | | | | | | | Total : | 281.59kb | 205.17kb | 27.14% |


    📝 docs | :octocat: repo | 🙋🏾 issues | 🏪 marketplace

    ~Imgbot - Part of Optimole family

    opened by imgbot[bot] 0
Owner
Jan Heil
19 Year old IT-Developer working as Electrician.
Jan Heil
Nagram is a third-party Telegram client based on Nekogram with not many but useful modifications

?? Nagram is a third-party Telegram client based on Nekogram with not many but useful modifications. Official site: https://nextalone.xyz Teleg

NextAlone 189 Dec 29, 2022
The ByteSkript development kit, including resources for third-party libraries that are not contained within the standard runtime.

ByteSkript Development Kit Todo. The development kit is a set of advanced resources available for library creators. These are not available within the

null 1 Jan 8, 2022
Nekogram is a third-party Telegram client with not many but useful modifications

Nekogram is a third-party Telegram client with not many but useful modifications

Ketal 8 Nov 13, 2022
A plugin that open the GC command execution interface for third-party clients

gc-opencommand-plugin 中文 | English 一个为第三方客户端开放GC命令执行接口的插件 服务端安装 在 Release 下载 jar 放入 plugins 文件夹即可 控制台连接 首次启动时,会在 plugins 目录下生成一个 opencommand-plugin 目录

筱傑 222 Jan 1, 2023
A singular file to protect as many Minecraft servers and clients as possible from the Log4j exploit (CVE-2021-44228).

MC-Log4J-Patcher The goal of this project is to provide Minecraft players, and server owners, peace of mind in regards to the recently discovered Log4

Koupa Taylor 4 Jan 4, 2022
Library that makes it possible to read, edit and write CSV files

AdaptiveTableLayout Welcome the new CSV Library AdaptiveTableLayout for Android by Cleveroad Pay your attention to our new library that makes it possi

Cleveroad 1.9k Jan 6, 2023
A Velocity proxy plugin for Minecraft server discovery in k8s. All discovered servers are automatically added to the Velocity proxy.

kryo-server-discovery This plugin connects minecraft servers to a velocity proxy within Kubernetes. The service account in the namespace which the pro

Kryonite 9 Sep 13, 2022
Winfoom is an HTTP(s) proxy server facade that allows applications to authenticate through the proxy without having to deal with the actual handshake.

winfoom Basic Proxy Facade for NTLM, Kerberos, SOCKS and Proxy Auto Config file proxies To help this project please give it a star ⭐ Overview Winfoom

Eugen Covaci 56 Dec 8, 2022
A visual implementation of OSHI, to view information about the system and hardware.

MooInfo A visual implementation of OSHI, to view information about the system and hardware. Such as OS, processes, memory, CPU, disks, devices, sensor

周波 104 Jan 6, 2023
A real-time ray tracer in Java, accelerated on heterogeneous hardware using TornadoVM

Java Ray Tracer for TornadoVM Description This project aims to build a real-time ray tracer in Java, accelerated on heterogeneous hardware using Torna

null 10 May 23, 2022