npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-unifi-protect-platform

v1.1.0

Published

Homebridge platform for UniFi Protect with (Cameras, Doorbells).

Downloads

18

Readme

homebridge-unifi-protect-platform

UniFi Protect platform for Homebridge with support for realtime events from UniFi Cameras and Doorbells.

NOTE: This only works with UniFi OS capable devices (UDM-Pro); it has been not been tested with the vanilla UCK-G2.

Installation

  1. Homebridge
  2. npm i -g homebridge-unifi-protect-platform
  3. Add platform to your config file

Supported Features

Unlike other UniFi Homebridge platforms, this platform provides realtime events and does not poll at set intervals. This means you’ll get doorbell and motion events pushed to HomeKit instantaneously.

  • Camera
  • Doorbell Events (Push)
  • Motion Event (Push)

Tested Devices

  • UDM-Pro
  • UVC-G3
  • UVC-G3-Dome
  • UVC-G4-Doorbell

Configuration

In order to use this plugin, you’ll need to add the following JSON object to your Homebridge config file:

{
  "platform": "unifi-protect",
  "name": "unifi-protect",
  "unifi": {
    "controller_url": "https://controller-ip:controller-port",
    "username": "homekit",
    "password": "homekit"
  }
}

| Config Key | Description | Required | | ---------------------- | ----------------------------------------------------------------------------------------------------------- | -------- | | platform | Homebridge Platform name.This value should always be unifi-protect. | Y | | name | The name of this platform within Homebridge.This is mainly used for logs and can be any value you want. | N | | unifi | | Y | | unifi.controller_url | The URL to your controller. | Y | | unifi.username | The username to login to your controller. | Y |

Advanced Config

The values above are the basics to get you started, however you can fine tune your config if needed:

| Config Key | Description | Required | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------- | | unifi.auth_url | The URL to auth.By default, this resolves to: {unifi.controller}/api/auth/login | N | | unifi.api_url | The URL to the Protect API.By default, this resolves to: {unifi.controller}/proxy/protect/api | N | | unifi.ws_url | The URL to the Protect WebSocket API.By default, this resolves to: ws(s)://{controllerip}/proxy/protect/ws/updates | N | | unifi.timeouts | Override request timeouts | N | | unifi.timeouts.default | Timeout in milliseconds for most requestsThe default value is 30s. | N | | unifi.timeouts.snapshot | Timeout in milliseconds for snapshot requestsThe default value is 15s. | N |

To Do

Development

Environment

All development tooling dynamically configures Homebridge through environment vars that should be set to match your environment. These values can be found in the dev/start.ts file.

A .env file is supported in the root of the project directory.

Tools

homebridge-unifi-protect-platform has some tooling to help making development easier:

  • yarn dev will launch Homebridge through TypeScript pointed towards src
  • yarn dev:stream displays all events emitted from the controller
  • yarn dev:inspect displays an output of your current Protect enviroment

Credits

Much of the initial charactistic/services code has been lifted and repurposed from dgreif/ring. Huge thanks to @dgreif!

License

homebridge-unifi-protect-platform was created by Shaun Harrison and is made available under the MIT license.