Skip to content

A compatibility shim to support accessing the new UnifiOs API.

License

Notifications You must be signed in to change notification settings

nonnac/unifi-udm-api-proxy

 
 

Repository files navigation

Unifi UDM API Proxy

Docker Image Version (latest semver) Build GitHub

A compatibility shim to support accessing the new UnifiOs API.

The unifi-udm-api-proxy can be used to provide backwards compatibility between projects that utilize the unofficial Unifi/Protect api's on newer UnifiOs based devices (the UDM/UDMP) - without modifying existing clients.

Also checkout the Hass.io Unifi UDM API Proxy Add-on.

Example

The unifiprotect project is a Home Assistant integration that utilizes the Unifi Protect API to provide Home Assistant with data directly from Unifi Protect.

The normal network model look like this:

unifiprotect <-> protect api (192.168.0.2:7443)

With unifi-udm-api-proxy introduced, the network model changes to:

unifiprotect <-> unifi-udm-api-proxy (192.168.0.2:5000) <-> protect api (192.168.0.1:443)

In this model, unifiprotect communicates with unifi-udm-api-proxy as if it was talking to the Protect api.

Setup

docker-compose is easiest way to deploy an instance:

version: '2.1'
services:
  unifi-udm-api-proxy:
    image: silvenga/unifi-udm-api-proxy:1
    ports:
      - 5000:443
    environment:
      UDM__URI: https://192.168.0.1
    restart: always

The container will listen on http and https (ports 80 and 443 respectively). Ensure that the environment variable UDM__URI is pointed to the UDM/UDMP. Currently, when https is specified in UDM__URI, no server verification will occur.

Compatibility

Since the Unifi API is undocumented, reverse engineering is required. The following projects have been lightly tested to work with the unifi-udm-api-proxy in-place.

About

A compatibility shim to support accessing the new UnifiOs API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 96.6%
  • Dockerfile 3.4%