Coder Social home page Coder Social logo

hjdhjd / homebridge-unifi-protect Goto Github PK

View Code? Open in Web Editor NEW
1.4K 39.0 83.0 7.11 MB

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io

License: Other

TypeScript 89.02% HTML 1.80% JavaScript 9.18%
homekit-support unifi-protect-controller unifi-protect-devices unifi-protect unifi ubiquiti motion-sensor doorbell udm-pro homebridge

homebridge-unifi-protect's Introduction

homebridge-unifi-protect: Native HomeKit support for UniFi Protect

Homebridge UniFi Protect

Downloads Version UniFi Protect@Homebridge Discord verified-by-homebridge

Complete HomeKit support for the UniFi Protect ecosystem using Homebridge.

homebridge-unifi-protect is a Homebridge plugin that provides HomeKit support to the UniFi Protect device ecosystem. UniFi Protect is Ubiquiti's video security platform, with rich camera, doorbell, and NVR controller hardware options for you to choose from, as well as an app which you can use to view, configure and manage your video camera and doorbells.

Why Use This Plugin For UniFi Protect Support In HomeKit?

This plugin attempts to bridge a gap in the UniFi Protect ecosystem by providing native HomeKit support on par with what you would expect from a first-party native HomeKit solution. My north star has always been to create a plugin that just works with minimal required configuration by you to get up and running. All you need is the hostname or IP address of the Protect controller and local user credentials on the Protect controller. That's it. The defaults are sane and correct for the vast majority of people. For the adventurous, there are rich capabilities you can explore to enable you to further tailor your experience. All provided through an elegant webUI accessed through the Homebridge Config UI that allows you to explore all of the more sophisticated capabilities of this plugin in an approachable way.

What does it just works mean in practice? It means that this plugin will discover all your supported UniFi Protect devices and make them available in HomeKit. It supports all current UniFi Protect controller releases.

For the more technically inclined - this plugin has continued to pioneer the HomeKit user experience for UniFi Protect by being the first Homebridge plugin (and first third-party app, to my knowledge) to successfully reverse engineer the UniFi Protect realtime events API that was introduced with UniFi OS. This allows instantaneous, realtime capturing of events as they occur in the Protect ecosystem, allowing us to provide that same level of realtime sensor and camera feedback to HomeKit. Since reverse engineering the realtime events API, most of the major open source smart automation projects have benefited and also incorporated our work, improving the experience for everyone across smart home ecosystems.

Features

  • Easy configuration - all you need is your UniFi Protect controller IP address, username, and password to get started. The defaults work quite well for the vast majority of users. When you want more, there are additional options you can play with, if you choose.

  • Full HomeKit support for the UniFi Protect ecosystem. All generally available UniFi Protect devices are supported, including cameras, chimes, doorbells, lights, sensors, and Viewports.

  • Complete HomeKit Secure Video support for all UniFi Protect cameras. Complete HomeKit Secure Video support, without the need for additional plugins or software beyond FFmpeg. Another community first - all without the need for additional tools to get a complete solution.

  • Incredibly high performance. I've spent the time to optimize the video streaming experience to ensure it feels very responsive, and just works. For those that have hardware-accelerated CPUs and GPUs, live video stream load times using the Home app on iOS average at 0.2-0.3 seconds on a day-to-day basis, which is often better than the native UniFi Protect app! Supported hardware-accelerated platforms are currently: Apple Macs (both Intel and Apple Silicon), Intel Quick Sync Video-enabled CPUs, and Raspberry Pi 4. When not using hardware acceleration, or on slower systems, you can expect live video streams to load within 1-2 seconds.

  • Full UniFi Protect Doorbell support.. This plugin provides complete support for UniFi Protect Doorbells. We support all features of UniFi Protect doorbells including - doorbell rings, two-way audio, package camera support, and the use of the onboard LCD screen for messages. Two-way audio has caveats you should be aware of.

  • Two-way audio support for all UniFi Protect cameras that support it. Some Protect devices that support two-way audio capabilities include UniFi Protect Doorbells, the UniFi Protect AI Pro Cameras, and more. If the Protect device supports two-way audio, that functionality is available to you in HomeKit.

  • Support for multiple controllers. This plugin can support multiple UniFi Protect controllers. If you have more than one controller, it's easy to add them to this plugin, and integrate them seamlessly into HomeKit.

  • Automatic realtime detection and configuration of all UniFi Protect devices. By default - all of your supported UniFi Protect devices are made available in HomeKit without needing any further configuration on your part. Additionally, if you add or remove cameras or other devices to your UniFi Protect controller, this plugin will autodetect those configuration changes and add or remove those devices in HomeKit, seamlessly, in realtime. No need to restart Homebridge to see your new Protect devices added or removed.

  • A builtin webUI using the Homebridge webUI plugin framework allows you the ability to customize the plugin to your needs. You can apply options globally, for all devices connected to a specific Protect controller, or for individual Protect devices in an intuitive way using the Homebridge HBUP webUI.

  • Motion sensor control from within HomeKit. By default, all detected cameras have a motion sensor service. An additional motion switch service can be enabled if you want even more granular control: the motion switch allows you to selectively activate and deactivate motion detection of your cameras. This is especially useful in automation scenarios where you wish to activate or deactivate motion detection selectively when you leave your home or arrive home, for example, or to enable specific groups of cameras to turn on and off motion detection through automation.

  • Occupancy sensors for HomeKit. Any device with a motion sensor can also be used as an occupancy sensor with the appropriate feature option. This further simplifies automation scenarios where say you want to turn on a light in a room but only when there's motion detected over a certain period of time. Taking it one step further, on Protect devices with smart motion event notification, you can configure the occupancy sensor to only trigger when a person is in the room.

  • Create scenes or presets for groups of cameras. If you choose to create specific liveviews, a security system accessory will appear in HomeKit, enabling you to have motion-detection scenes or presets a tap away. For even more customization, you can create liveview-based switches that will allow you to enable or disable motion detection on groups of cameras. They're easy and intuitive to create and can amplify your user experience in HomeKit.

  • MQTT support. MQTT support is available for those that want to make UniFi Protect accessible to an MQTT broker.

  • And more...

What's Not In This Plugin Yet

Acoustic Echo Cancellation (AEC) support for two-way audio in UniFi Protect. We're most of the way there with two-way audio support, and hopefully AEC support can be reverse-engineered in the future.

I hope to continue to work on this one to get AEC working for two-way audio. You can also read more on about two-way audio support here.

Documentation

  • Getting Started

    • Installation: installing this plugin, including system requirements.
    • Plugin Configuration: how to quickly get up and running.
    • Best Practices: best practices for getting the most of your HomeKit setup and UniFi Protect.
    • Troubleshooting: running into login problems or streaming issues? Give this a read before looking anywhere else.
    • Changelog: changes and release history of this plugin, starting with v3.0.
  • Additional Topics

    • Feature Options: granular options to allow you to set the camera quality individually, show or hide specific cameras, controllers, and more.
    • Autoconfiguration: how Protect controller autoconfiguration, transcoding and transmuxing work in HBUP, and why.
    • Audio Options: options to further tailor how audio is handled from Protect, such as background noise reduction.
    • Doorbells: how UniFi Protect doorbell support works in this plugin, and how to use all the available features including doorbell messages.
    • HomeKit Secure Video: how HomeKit Secure Video support works in this plugin with UniFi Protect.
    • Liveview Scenes: use the UniFi Protect liveviews feature (available in the UniFi Protect controller webUI) to create motion-detection scenes.
    • MQTT: how to configure MQTT support.
    • Plugin Configuration Reference: complete list of configuration options available in this plugin.

Installation

Important

Prerequisites

  • Ensure you are using a machine that can handle the CPU and GPU requirements of homebridge-unifi-protect. The more cameras you have, the higher the performance requirements. If you intend to use HomeKit Secure Video, in particular, you will need a capable, modern CPU. Raspberry Pi 4 is a great piece of hardware, but it cannot keep up with the demands of more than a few Protect cameras, and definitely not the higher end members of the Protect camera ecosystem.
  • If you are new to Homebridge, please first read the Homebridge documentation and installation instructions before proceeding. Ensure you've installed Homebridge and the Homebridge Config UI before proceeding.
  • Ensure you have a local user account on your UniFi console dedicated to homebridge-unifi-protect. To create a local user account on your UniFi console:
    • Go to the OS Settings tab on the Protect controller web interface. This is typicaly near the top left of the Protect controller UI page.
    • Click Add Admin located near the top right of the OS Settings page.
    • Click Restrict to local access only and then enter in a username and password for the new local user.
    • Optionally customize the role of the user to adjust the roles. HBUP requires the Full Management role for all of it's capabilities to work, although it will work in a more limited form without administrative privileges.

Getting Started

To install homebridge-unifi-protect:

  1. Go to the Plugins tab in the Homebridge Config UI and searching for homebridge-unifi-protect and install it.
  2. Click on the Set Up icon located in the top right corner of the Homebridge UniFi Protect tile and then enter the hostname or IP address of the Protect controller as well as the username and password you created in the steps above and then login to the Protect controller.
  3. For the moment, don't make any other configuration changes and click Save and then click Restart Homebridge.
  4. After restarting Homebridge, click on the Set Up Child Bridge icon located in the top right corner of the Homebridge UniFi Protect tile. Toggle the child bridge setting for UniFi Protect to on and then save and restart Homebridge.
  5. After restarting Homebridge, click on the Connect to HomeKit icon located in the top right corner of the Homebridge UniFi Protect tile. Use the Home app on your iPhone and scan the QR code to connect UniFi Protect to HomeKit. The Home app may ask questions about where to locate your cameras and whether you want to enable HomeKit Secure Video. Answer according to your preferences.
  6. That's it! You should now be able to access all your UniFi Protect devices in HomeKit. You can further tailor your experience by going to the Homebridge UniFi Protect webUI and exploring the various features and options that are available to you.

Note

HBUP includes everything required to get up and running on many of the more popular platforms and operating systems. If you're running on an unsupported platform, you will need to install a working version of FFmpeg for homebridge-unifi-protect to work correctly with your cameras. Additionally, your FFmpeg will need to support the fdk-aac codec if you want audio support to work. Setting up and configuring FFmpeg is beyond the scope of this documentation.

Tip

  • Only official releases of UniFi Protect and UniFi OS firmwares are supported. No beta, early access, or release candidate versions of any kind are supported.
  • Only official hardware releases for UniFi Protect are supported. Early access or beta hardware is unsupported.
  • No support is provided for any beta versions of Apple operating systems (iOS, iPadOS, macOS, tvOS, etc.).
  • My philosophy is to aggressively adopt the capability and features (that make sense in a HomeKit context) in the latest official Ubiquiti firmware releases and to deprecate old functionality that's been superceded by newer, richer, or more performant capabilities - either by HomeKit or Ubiquiti. Read the Changelog carefully for the latest information on what's new.

Plugin Development Dashboard

This is mostly of interest to the true developer nerds amongst us.

License Build Status Dependencies GitHub commits since latest release (by SemVer)

homebridge-unifi-protect's People

Contributors

bcomnes avatar dansimau avatar dependabot[bot] avatar dsully avatar ghenkhaus avatar glynd avatar hjdhjd avatar oznu avatar ptescher avatar rotx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-unifi-protect's Issues

Adding ability for external triggers.

@hjdhjd , Wow. This is the first and only homebridge plugin that takes full advantage of UniFi. Great work.

I had a request for enhancement, that is low priority. Would it be possible to add a parameter to add a switch for external trigger of motion events? I know not everyone would use this and I agree with your mindset of keeping things simple and hidden unless things are needed.

Here is the scenario: I have a door contact sensor on my mailbox. This is right by the street and far out of my motion zones to avoid headlights. I would like to get an image notification when it is opened. This way I know if it is the mailman, or my wife has already retrieved the mail.

Again, thank you so much for the hard work and such a polished result.

snapshot and stream error

No matter how hard I try I cant get this to work. Ive installed the camera-ffmpeg plugin and this one. My camera is detected in Homebridge and I can add it to the Home app. But there is no snapshot or stream...

This is my config

{
    "bridge": {
        "name": "Homebridge",
        "username": "0E:BE:B9:9A:64:89",
        "port": 53553,
        "pin": "031-45-154"
    },
    "accessories": [],
    "platforms": [
        {
            "platform": "TplinkSmarthome",
            "name": "TplinkSmarthome"
        },
        {
            "name": "Config",
            "port": 8080,
            "auth": "form",
            "theme": "teal",
            "tempUnits": "c",
            "platform": "config"
        },
        {
            "platform": "Camera-UniFi-Protect",
            "name": "UniFi Protect",
            "controllers": [
                {
                    "url": "https://192.168.1.7:7443/",
                    "username": "homebridge",
                    "password": "xxxxxx"
                }
            ]
        }
    ]
}

These are the errors

Screen Shot 2019-08-28 at 7 11 52 PM

Doorbell aspect ratio off

I just added the G4 Doorbell and the image is stretched on both the snapshot and on the video stream. Does this happen with the other cameras too? Is there a way to specify a custom aspect ratio or something for the doorbell?

Unable to stream live feed from UniFi cameras to Home app

First of all, thank you so much @hjdhjd for maintaining this plugin. The docs are great and installation was a breeze for me last night.

I've got two cameras in my UniFi Protect setup (G3 Micro & G4 Doorbell) and was able to successful add them both to HomeKit last night by installing HomeBridge along with this plugin on my Pi.

Image snapshots are working great - Every time I launch Home app, I see the latest still snapshots from both of my cameras.

However I can't get the live feed to work from the Home app. If I tap into either camera in the Home app, it spins for about ~30s then fails with "This camera is not responding".

I took a look at HomeBridge's logs and this is the only output from them:

[8/19/2020, 11:56:05] [UniFi Protect] Garage: HomeKit video stream request received: 1280x720, 30 fps, 299 kbps.
[8/19/2020, 11:56:35] [UniFi Protect] Garage: Stopped video stream.

FWIW the UniFi Protect iOS app is able to stream video and I can also directly stream from the Camera's RTSP URL by visiting that URL in VLC.

Any idea why Home app is unable to stream the video feed?

homebridge v1.1.2
homebridge-unifi-protect2 v3.3.2
UniFi Protect Controller v1.13.4
UniFi Protect Web UI v1.22.2
UniFi G4Doorbell/G3Micro firmware v4.26.12

TypeError: Cannot read property 'replace' of undefined

07/06/2020, 20:45:49 TypeError: Cannot read property 'replace' of undefined
    at getUnifiAuthConfig (/home/hoobs/.hoobs/node_modules/homebridge-unifi-protect2/index.js:34:56)
    at /home/hoobs/.hoobs/node_modules/homebridge-unifi-protect2/index.js:159:14
    at Array.map (<anonymous>)
    at unifiPlatform.didFinishLaunching (/home/hoobs/.hoobs/node_modules/homebridge-unifi-protect2/index.js:158:32)
    at API.emit (events.js:210:5)
    at Server.run (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:104:18)
    at module.exports (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:84:12)
    at Object.<anonymous> (/usr/local/lib/node_modules/@hoobs/hoobs/bin/hoobs:95:81)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
07/06/2020, 20:45:49 Bridge is running on port 51826.
07/06/2020, 20:45:49 Got SIGTERM, shutting down Bridge...

I installed the plugin, within HOOBS, but the moment I save the config and HOOBS restarts my homebridge setup I get the above error.

Any idea what could be going wrong?

Doorbell contact sensor question.

Love everything you have done here. Works great.
So right now if someone presses the doorbell button I get a rich notification on my Apple TV (running the beta and it works great). My question is.... Unless I missed it. Is there a way to get the same notification for motion detection? I seem to have the problem of %50 of the people decide to knock on the door instead of push the button. So I thought it would be great if there was a way to have motion detection activate the doorbell contact sensor to get the same effect. Not sure if this is possible or if there is a better way to do this. I love getting the snapshot on my Apple TV when some presses the button it’s unobtrusive. Would love it even more if there was a toggle or a way to get it for motion instead or as well. Many thanks. I also have the G4 doorbell and a Cloudkey Gen2 not sure if that matters.

Camera gone after update

Had the previous version of this plugin working fine, and I've read the instructions shared via changelog.

  1. First tried an update of the plugin, then manually checking the config.json and removing the old config block, restarted and could see the camera in Home app but no video.

  2. Completely uninstalled the plugin, removed any cameras in HomeKit, restarted.

  3. Reinstalled the plugin and entered all config manually. On restart, the camera no longer appears nor does it appear if I go through 'add accessory' process.

I've repeated 3 now several times, but cannot get the camera itself to reappear in Home app. Am I missing something? Is there another place I need to remove the 'old' camera?

Details:

Homebridge: 1.2.0b33
MacOS server (native)
Unifi Protect on UCKG2+

Video Optimization.

@Sunoo - tagging you over here for #62 - figured it would be better than polluting another plugin's issues / comments thread. 😄

So...curious about your remark on -re...

Steaming fails with ffmpeg exit code 0

First off I just want to say thank you very much @hjdhjd for this amazing plugin!

I have:

  • UniFi Protect G4 Doorbell
  • UniFi Dream Machine Pro
  • Raspberry Pi 4B (2GB).

I'm currently running:

  • Homebridge v1.1.2
  • Node v12.18.2
  • Homebridge UniFi Protect v3.5.1
  • UniFi Protect v1.14.11

After installing the plugin the doorbell was automatically detected, and snapshots work flawlessly 🥳 !

However, when I attempt to pull the camera stream up in HomeKit (iOS 13.6.1) I'm greeted by spinning wheel and no stream loads.

I see the following output from Homebridge:

[8/28/2020, 16:02:31] [UniFi Protect] Doorbell: HomeKit video stream request received: 1280x720, 30 fps, 299 kbps.
[8/28/2020, 16:02:51] [UniFi Protect] Doorbell: ffmpeg exited with code: 0 and signal: null (Error)
[8/28/2020, 16:02:51] [UniFi Protect] Doorbell: Stopped video stream.

Obviously by all appearances this appears to be an ffmpeg issue, but I'm not sure how to get more verbose logs to identify the exact issue.

I tested building ffmpeg on my own (via this script), which didn't seem to make any difference.

I have tested setting Enable.StreamOnly.Low and found that after a few seconds the stream begins, and after about 4-5 seconds of streaming video it freezes and I get the same error in the logs.

I'm not sure where to go from here on better identifying and correcting the issue.

No response in the Home app

Recently had to remove and re-add the cameras from the Home app since I had to reset my UniFi Cloud Key and start from scratch. Unfortunately this has broken something and though cameras are detected by the plugin and added to the Home app, they are showing as "No Response".

Homebridge is showing that the plugin is taking snapshots.

[10/30/2019, 3:00:30 AM] [UniFi Protect] Snapshot from Driveway at 480x270                            
[10/30/2019, 3:00:59 AM] [UniFi Protect] Snapshot from Kitchen at 480x270                             
[10/30/2019, 3:02:10 AM] [UniFi Protect] Snapshot from Driveway at 480x270                            
[10/30/2019, 3:02:22 AM] [UniFi Protect] Snapshot from Kitchen at 480x270                             
[10/30/2019, 3:03:50 AM] [UniFi Protect] Snapshot from Driveway at 480x270                            
[10/30/2019, 3:03:52 AM] [UniFi Protect] Snapshot from Kitchen at 480x270  

But ffmpeg is unable to steam.

[10/30/2019, 3:08:40 AM] [UniFi Protect] ERROR: FFmpeg exited with code 1

Home app shows:

Screenshot 2019-10-29 at 11 04 37 PM

I thought it was my homebridge installation and I had a long overdue pending transfer of my homebridge setup to another server, so decided to do that and test again. Unfortunately the same error is happening on this fresh install.

One thing I noticed in UniFi Protect and I don't know if this is new or has something to do with this error, is that the RTSP URL is no longer showing an IPv4 but IPv6 instead.

Screen Shot 2019-10-29 at 11 12 57 PM

'undefined' rtsp stream URL

I have an issue with RTSP stream URL. Hostname/IP appears as undefined. Video stream will not work but still image does.

image

image

Homekit hangs

Hi

I'm new to all this homebridge stuff so pls excuse me if I am not clear.

I managed to install the api, and managed to see my unifi g3 cameras as accesories within homebridge. When I switched to homekit, I also managed to see these cameras as a favourite accesory.

However, the problem is homekit hangs almost immediately, when the screen shows a spinning circle on a screen that says "Loading Accessories and Scenes" and no matter how hard I tried, I couldn't change that.

Does anyone have similar issues and suggestions on how to solve this?

Thanks!

UVC G3 Flex cameras - won't go live

Hi following the last update the speed is a lot better, thank you.
I have noticed though that my 2 x UVC G3 Flex cameras don't go live whereas my G3 bullet and dome go live really quickly, settings all seem the same... any ideas?

Get Verified

I would not consider this a high priority but wanted to suggest making this a "Verified" plugin.

Re-add previously removed cameras

I’ve removed a couple cameras directly from HomeKit because I thought I was having issues. Now when I go to “Add Accessory” in HomeKit those two cameras won’t show up.

What can I do to fix that ? ;)

Rich notifications on iOS 13

Due to changes in iOS 13 rich notifications no longer work if the motion sensor is not part of the camera (accessory of). This has been resolved through a pull request in homebridge-camera-ffmpeg initiated by NorthernMan54 (Sunoo/homebridge-camera-ffmpeg#332)
@hjdhjd Would it be possible to implement the recent updates in homebridge-camera-ffmpeg to facilitate this? I have merged the code into index.js and it seems to be working. Alternately as this solution is specific to Unifi Protect would it be possible to merge in the motion sensor capability from homebridge-unifi-protect-motion-sensors?

Camera added to home but No Response

Hi All,

I have just added your plugin to my hoobs install, yet the camera says no response in home. could you please help my config is below

{
"server": {
"port": 80,
"origin": "*",
"autostart": 0,
"home_setup_id": "X-HM://0023ISWTE6BP3",
"polling_seconds": 5
},
"client": {
"default_route": "status",
"inactive_logoff": 30,
"theme": "hoobs-light",
"locale": "en",
"temp_units": "fahrenheit",
"country_code": "US",
"postal_code": "94040"
},
"bridge": {
"name": "HOOBS",
"port": 51826,
"pin": "031-42-434",
"username": "9A:10:24:B3:AF:E9"
},
"description": "",
"ports": {},
"accessories": [],
"platforms": [
{
"platform": "webostv",
"devices": [
{
"name": "Bedroom TV",
"ip": "192.168.1.99",
"mac": "78:5D:C8:63:37:D0",
"pollingInterval": 10,
"keyFile": "/.hoobs/etc/lgtvKeyFile",
"prefsDir": "
/.hoobs/etc/.webosTv",
"tvService": true,
"volumeControl": false,
"channelControl": false,
"mediaControl": false,
"inputs": [
{
"appId": "com.webos.app.hdmi1",
"name": "HDMI 1"
},
{
"appId": "com.webos.app.hdmi2",
"name": "HDMI 2"
},
{
"appId": "com.webos.app.hdmi3",
"name": "HDMI 3"
},
{
"appId": "com.disney.disneyplus-prod",
"name": "Disney Plus"
},
{
"appId": "netflix",
"name": "Netflix"
}
]
},
{
"name": "My Bedroom TV",
"ip": "192.168.1.98",
"mac": "78:5D:C8:7D:E9:7D",
"pollingInterval": 10,
"keyFile": "/.hoobs/etc/lgtvKeyFile",
"prefsDir": "
/.hoobs/etc/.webosTv",
"tvService": true,
"volumeControl": false,
"channelControl": false,
"mediaControl": false,
"inputs": [
{
"appId": "com.webos.app.hdmi1",
"name": "HDMI 1"
},
{
"appId": "com.webos.app.hdmi2",
"name": "HDMI 2"
},
{
"appId": "com.webos.app.hdmi3",
"name": "HDMI 3"
},
{
"appId": "netflix",
"name": "Netflix"
}
]
}
],
"plugin_map": {
"plugin_name": "homebridge-webos-tv"
}
},
{
"platform": "Camera-UniFi-Protect",
"plugin_map": {
"plugin_name": "homebridge-unifi-protect2"
},
"name": "UniFi Protect",
"videoProcessor": "ffmpeg",
"debugProtect": false,
"controllers": [
{
"url": "192.168.1.1",
"username": "MY NAME",
"password": "PASS WORD"
}
]
},
{
"platform": "Camera-ffmpeg",
"plugin_map": {
"plugin_name": "homebridge-camera-ffmpeg"
},
"cameras": []
}
]
}

Correct username/password resulting in server error 500 when attempting to retrieve configuration

I have a local (limited admin) user on a UDMP + Protect configuration. Username/password is definitely correct (I purposefully made it incorrect and, as expected, this changes to an auth error).

This repeats ad-nauseum. I'm happy to grab logs, etc, whatever, but just need a pointer as to where to start.

[8/4/2020, 6:47:04 PM] [UniFi Protect] 10.0.0.1: Unable to retrieve NVR configuration information from UniFi Protect. Will retry again later.
[8/4/2020, 6:47:04 PM] [UniFi Protect] Error: 500 - Internal Server Error

Connection reset happening every hour according to Homebridge log

Hi there,

I was looking at my Homebridge log for the first time in quite some time and noticed some frequent activity coming from the plug-in.

[8/13/2020, 2:15:19 PM] [UniFi Protect] X.X.X.X: Connection reset.
[8/13/2020, 2:15:19 PM] [UniFi Protect] X.X.X.X: Unable to retrieve NVR configuration information from UniFi Protect. Will retry again later.
[8/13/2020, 2:15:29 PM] [UniFi Protect] UniFi Controller [UDM-PRO]: Connected to the Protect controller API (address: X.X.X.X mac: XXXXXXXXXXX).
[8/13/2020, 2:15:29 PM] [UniFi Protect] UniFi Controller [UDM-PRO]: Connected to the UniFi realtime system events API.

This supposed connection reset seems to be happening every hour, on the hour. I was wondering whether or not this event is normal?

Thanks!

Request - MAC address ease of use

When using the enable & disable features requiring a mac address, it would be super helpful if we could have two features:

  1. Accept notation with colons, so we can copy directly from Unifi
  2. Log an warning message on startup if Mac address is malformed, i.e. fat fingered and removed a digit by accident

Nice to haves. Thanks.

homebridge-unifi-protect2 v1.3.5 with Unifi Protect NVR Appliance

Unifi Protect Controller 1.13.3
Web UI 1.20.0
Node.js Version | v12.18.0
NPM Version | v6.14.5

I can not get any of my cameras to show up in HomeBridge.
[6/11/2020, 05:20:49] [UniFi Protect] Unable to bootstrap cameras from UniFi Protect controller: Error: No cameras with enabled RTSP channels found. Only cameras with RTSP streams enabled can be used with this plugin. Please enable RTSP on at least one camera in UniFi Protect.
[6/11/2020, 05:20:49] [UniFi Protect] Unable to register cameras with HomeKit: TypeError: Cannot read property 'forEach' of undefined

I have tried for the URL https://CONTROLLERIP and https://ControlerIP:7443

I have created a local user account on the Protect System and can login fine with that. I know my RTSP streams work as I can view them in VLC just fine.

Console spam even after adding cameras

Not a huge issue, but is is possible to eliminate these messages after the cameras are added to HomeKit?

[6/15/2020, 12:03:56 PM] Homebridge is running on port 51352.
[6/15/2020, 12:03:57 PM] Kitchen is running on port 38307.
[6/15/2020, 12:03:57 PM] Please add [Kitchen] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Front Door Top is running on port 34365.
[6/15/2020, 12:03:57 PM] Please add [Front Door Top] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Front Foyer is running on port 46191.
[6/15/2020, 12:03:57 PM] Please add [Front Foyer] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Crib is running on port 46785.
[6/15/2020, 12:03:57 PM] Please add [Crib] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Living Room is running on port 33095.
[6/15/2020, 12:03:57 PM] Please add [Living Room] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Dining Room is running on port 36253.
[6/15/2020, 12:03:57 PM] Please add [Dining Room] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Nursery is running on port 44641.
[6/15/2020, 12:03:57 PM] Please add [Nursery] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Front Door is running on port 34471.
[6/15/2020, 12:03:57 PM] Please add [Front Door] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Garage Right is running on port 39119.
[6/15/2020, 12:03:57 PM] Please add [Garage Right] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Garage Left is running on port 44525.
[6/15/2020, 12:03:57 PM] Please add [Garage Left] manually in Home app. Setup Code: --**
[6/15/2020, 12:03:57 PM] Loft is running on port 39999.
[6/15/2020, 12:03:57 PM] Please add [Loft] manually in Home app. Setup Code: --**

And with debug disabled, should we still see the plugin spitting routine use to the console?

[6/15/2020, 12:09:02 PM] [UniFi Protect] Snapshot from Crib at 480:270
[6/15/2020, 12:09:02 PM] [UniFi Protect] Snapshot from Front Door at 480:270
[6/15/2020, 12:09:02 PM] [UniFi Protect] Snapshot from Front Door Top at 480:270
[6/15/2020, 12:09:02 PM] [UniFi Protect] Snapshot from Dining Room at 480:270

I feel like the console should be silent except to report errors, not warnings or info.

StatusCodeError: 405

Getting this when homebridge starts up. Double checked the details to the key, no luck.

StatusCodeError: 405 and it fails to load any of the streams.

Unexpected token < in JSON at position 1

after installation i received the following error (udm pro, protect active, 2 cameras installed)

(node:23172) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse ()
at requestPromise.get.then.response (/usr/local/lib/node_modules/homebridge-unifi-protect2/index.js:118:32)
at tryCatcher (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/bluebird/js/release/async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
(node:23172) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23172) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Support for Unifi Dream Machine Pro

I wanted to put this here for those that may be trying to use this with the UDM-Pro as it will not work in most environments. Currently, the API is returning an IPv6 address for the nvr.host property. This means this plugin will not work as-is (though may work if you have setup IPv6 in your network). I could not find an option to disable IPv6 on the controller, so I believe the only way to work around this is if we had a way to override the json response for 'nvr.host'.

Snippet response from api/bootsrap:

...
"nvr": {
        "mac": "FCECDAAAAAAA",
        "host": "fe80::aaaa:aaaa:aaaa:aaaa",
        "name": "UDM-Pro",
        "canAutoUpdate": false,
...

No streaming video on Centos install with working ffmpeg

I have an install on Centos, camera's show up but streaming video is not working. When I use the plugin Homebridge Camera FFmpeg I do have streaming video. Any ideas on what could be causing this? Snapshots are working, its is just the streaming video that is not working. Log says this when requesting stream through Home App on iPhone:

[8/26/2020, 3:48:46 PM] [UniFi Protect] Frontdoor: HomeKit video stream request received: 1280x720, 30 fps, 299 kbps.
[8/26/2020, 3:48:46 PM] [UniFi Protect] Invalid loglevel "level+verbose". Possible levels are numbers or:
[8/26/2020, 3:48:46 PM] [UniFi Protect] "quiet"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "panic"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "fatal"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "error"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "warning"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "info"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "verbose"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "debug"
[8/26/2020, 3:48:46 PM] [UniFi Protect] "trace"
[8/26/2020, 3:48:46 PM] [UniFi Protect]
[8/26/2020, 3:48:46 PM] [UniFi Protect] Frontdoor: ffmpeg exited with code: 1 and signal: null (Error)
[8/26/2020, 3:48:46 PM] [UniFi Protect] Frontdoor: Stopped video stream.

Cannot connect to stream or retrieve snapshot

As per the title, I've followed the guide(s) to get this running but no success for me. I'm trying to get this running on a HOOBS (rasp pi "out of the box solution" with homebridge pre-installed) but no matter what I try I can't seem to get it to work.

RSTP stream confirmed working through VLC on local machine, unsure if its FFMPEG (guessing so) but Unifi Protect local account login works (made a specific user account for this purpose) and all of the Unifi side of things checks out.

Any help would be super appreciated!

FYI. Complete noob here, probably nothing wrong with the plugin and more my lack of understanding of what is going wrong to resolve this.

Multiple Homes, one hub & cloudkey

Thank you for version 3. Big update, very useful.

Is there any other way to handle multiple homes without having to setup multiple home bridges? It would be great to assign cameras to "homes" or have a way to add the same hub to multiple homes and then remove the cameras. The current implementation of disabling specific cameras can support this but only by maintaining multiple home bridge hubs.

Any thoughts on supporting multiple homes? It's a huge blind spot in most IoT implementations right now. Lutron only recently got round to supporting it even.

Cameras not streaming

In newest release 3.0.2 the camera tiles update fine every 10 seconds, but the streams won't start. Happens with G3 Flex cameras and doorbell the same

[8/4/2020, 10:31:46 PM] [UniFi Protect] UDMPRO [UDM-PRO] Front [UVC G3 Flex]: Stream quality configured: High.
[8/4/2020, 10:39:31 PM] [UniFi Protect] Front: Starting video stream: 1280x720, 30 fps, 299 kbps.
[8/4/2020, 10:40:01 PM] [UniFi Protect] Front: Stopped video stream.

In Homekit - "No Response - This Camera is not responding"
Then after going back to main Homekit page, the tiles will no longer update.
Once I force quit Homekit, and go back in, the tiles update normally.

This is on iPhone homekit. I ran another test on Apple TV HomeKit and it pulls a 1080p stream and works. vs the iPhone pulling a 720p stream and not working

Worked fine before latest update. No added config, just a straight uninstall/install. Then deleted old cameras from Homekit
UDM Pro - 1.7.2
Protect - 1.14.11

Marking Devices as Favorites and Naming Questions

Hello @hjdhjd - Thank you very much for creating this plugin for Homebridge. It is by far the most robust UniFi Protect to HomeKit integration I have used (and I have tried them all) for any automation platform. Well done! 👍

I'm hoping you can help me with the following:

  1. I seem to be having an issue with marking a camera as a favorite. When the camera is marked, it displays correctly on the Home app screen but the accessories (motion sensor, sensor switch) appear too. I tried overriding it by going into each individual accessory and unchecking this option but it reverts back to the previous state. This happens regardless of the grouped or single tile display. Can this be fixed?

  2. Would it be possible to name each of the accessories in the configuration? I would prefer to use different names in HomeKit vs what I use in UniFi Protect (including the displayed accessories). I know you are able to change the names in Homebridge but that does not flow through to HomeKit. Maybe it could be done by device.mac address as you do with the other functions?

Thanks again for all your efforts!

Best regards,
Rodney

Getting promise errors in log when using "disable" feature to disable a specific camera

When attempting to use the disable feature, I start to see UnhandledPromiseRejectionWarning in the log.

Configuration reads (params obfuscated):

        {
            "platform": "UniFi Protect",
            "options": [
                    "Disable.FCECDA123456"
            ],
            "controllers": [
                {
                    "address": "172.16.99.5",
                    "name": "UniNVR",
                    "password": "somelongpassphraseabout30charslong",
                    "username": "homebridge"
                }
            ]
        }

When I add the options section I get the errors below, when I remove them they go away. I've tried lower case disable as well, same effect.

(node:4353) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'accessory' of undefined
    at WebSocket.<anonymous> (/usr/local/lib/node_modules/homebridge-unifi-protect2/src/protect-nvr.ts:264:62)
    at WebSocket.emit (events.js:311:20)
    at Receiver.receiverOnMessage (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/websocket.js:797:20)
    at Receiver.emit (events.js:311:20)
    at Receiver.dataMessage (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:437:14)
    at Receiver.getData (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:367:17)
    at Receiver.startLoop (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:143:22)
    at Receiver._write (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:78:10)
    at doWrite (_stream_writable.js:441:12)
    at writeOrBuffer (_stream_writable.js:425:5)
    at Receiver.Writable.write (_stream_writable.js:316:11)
    at TLSSocket.socketOnData (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/websocket.js:872:35)
    at TLSSocket.emit (events.js:311:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at TLSSocket.Readable.push (_stream_readable.js:209:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)
(node:4353) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4353) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:4353) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'accessory' of undefined
    at WebSocket.<anonymous> (/usr/local/lib/node_modules/homebridge-unifi-protect2/src/protect-nvr.ts:264:62)
    at WebSocket.emit (events.js:311:20)
    at Receiver.receiverOnMessage (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/websocket.js:797:20)
    at Receiver.emit (events.js:311:20)
    at Receiver.dataMessage (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:437:14)
    at Receiver.getData (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:367:17)
    at Receiver.startLoop (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:143:22)
    at Receiver._write (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/receiver.js:78:10)
    at doWrite (_stream_writable.js:441:12)
    at writeOrBuffer (_stream_writable.js:425:5)
    at Receiver.Writable.write (_stream_writable.js:316:11)
    at TLSSocket.socketOnData (/usr/local/lib/node_modules/homebridge-unifi-protect2/node_modules/ws/lib/websocket.js:872:35)
    at TLSSocket.emit (events.js:311:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at TLSSocket.Readable.push (_stream_readable.js:209:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)
(node:4353) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

Unable to configure HOOBS for UniFi Protect 2

Hello. I have followed the instructions on the plugin page of hoobs, set the username and password as well as IP address. I’m using the udm pro for unifi protect and have tried both ip address’ with and without the port value of 7443. I’ve also tried with and without http and https. I’ve also tried pointing it to unifi.ui.com
9AA13241-0582-4937-91A0-7E4279F52A0E

Image resolution

Hi, I have two Unifi cameras a G3 Flex and G3 Pro. The image quality doesn't look great especially from the G3 Flex.

both cameras report the resolution like this:
[UniFi Protect] Start streaming video from Drive UVC G3 Flex with 1280:720@25fps (299kBit).

Should that be 1920x1080? I can't see what to configure to change that.

Thanks for the plugin.

I added new camera to Protect and got these errors, had to restart the plugin to get the new camera recognized by the plugin / added to HOME.

Plugin (homebridge-unifi-protect2 v3.1.3)

(node:16903) UnhandledPromiseRejectionWarning: Error: Accessories must be created with a non-empty displayName.
at new Accessory (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:230:29)
at new PlatformAccessory (/usr/lib/node_modules/homebridge/src/platformAccessory.ts:69:9)
at ProtectNvr.discoverAndSyncAccessories (/usr/lib/node_modules/homebridge-unifi-protect2/src/protect-nvr.ts:120:21)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at ProtectNvr.updateAccessories (/usr/lib/node_modules/homebridge-unifi-protect2/src/protect-nvr.ts:203:5)
at Timeout._onTimeout (/usr/lib/node_modules/homebridge-unifi-protect2/src/protect-nvr.ts:371:7)
(node:16903) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16903) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Configure HD quality

Hi, love your plugin and the fantastic rewrite. Maybe consider adding a GitHub Sponsor link 👍🏻

I've got G3 Flex cameras and the streams are all in 1280x720:

[8/5/2020, 8:18:49 AM] [UniFi Protect] Driveway: Starting video stream: 1280x720, 30 fps, 299 kbps.

How can I change that to the 1920x1080 that the camera supports? For the stream mostly, but ideally also for the snapshots.

I've tried this:

{
    "platform": "UniFi Protect",
    "debug": false,
    "controllers": [],
    "options": [
        "Enable.StreamOnly.High"
    ]
}

Large delay (10-20s) in opening stream

Using v3.0.2, I'm seeing huge delays in starting the stream. What's strange, however is that 95% of the time spent waiting for the stream to come up, nothing is displayed in the homebridge logs. At the very last second, you see the line that the stream has started:

[8/4/2020, 8:04:27 PM] [UniFi Protect] Kitchen: Starting video stream: 1280x720, 30 fps, 299 kbps.

Then the stream starts within a second or two of that line being written to the log.

All settings are set to their default, I have tried disabling Medium and High streams and tried the follow ffmpeg parameters in an attempt to shorten the delay as these settings used to result in a stream start of 1-2 second in the prior version (v1.2.14):

-preset ultrafast -tune zerolatency -profile:v high -level 4.2 -x264-params intra-refresh=1:bframes=0

That seems to make things take significantly longer. I tried to capture a debug log, but because of the extremely verbose polling logging, it was impossible to sift through what was related to only the single camera I was trying to troubleshoot.

Device: UniFi Cloud Key G2+
Firmware Version: v.1.1.13
Controller Version: 1.13.4

Unable to Stream UDMP VLAN

I have a UDMP and the cameras are in a different VLAN. HB see the cameras but I'm getting the following error when try to stream;

[5/28/2020, 11:25:51 PM] [UniFi Protect] Snapshot from DRIVEWAY at 480:270 [5/28/2020, 11:25:51 PM] [UniFi Protect] An error occurs while making snapshot request [5/28/2020, 11:25:52 PM] [UniFi Protect] Start streaming video from DRIVEWAY with 640:360@20fps (132kBit) [5/28/2020, 11:25:52 PM] [UniFi Protect] An error occurs while making stream request [5/28/2020, 11:25:52 PM] [UniFi Protect] ERROR: FFmpeg exited with code -2

I'm wondering if the error is because the cameras are in different VLAN or its something else. There is no firewall restrictions between VLANs.

Favorites for Camera on/off Affects Camera itself

When I select in Homekit "show as separate tiles", putting the "camera control" switch as a favorite or removing it make the camera itself also change. I would like the cameras to be in Favorites but not the "on/off" button. I can do this with my Nest integration (via Starling) but not on this. I can disable the on/off switches inside Homebridge for now, but not sure if this is intended implementation.

Is there any way to modify which RTPS stream this plugin uses?

As per the title; is there any way to modify/instruct which RTSP this plugin chooses?

I am experiencing significant lag / delay issues caused by what I think is the plugin automatically going for the highest quality enabled RTSP stream whereas I would prefer it to go for the lowest or medium quality for HomeKit purposes.

I have yet to try the obvious and switching those higher quality RTSP streams off but I am using them for another project where the higher quality streams is desired.

Any help is greatly appreciated!

No RTSP channel found

Hi,

During start I get the error Message "No RTSP channel found". RTSP is enabled for 2 of my 5 cameras and for all 3 resolutions. I tested RTSP with VLC and it worked. What am I missing?

Regards
Christoph

No Audio

Great job on the plugin, I'm running homebridge on a 2018 MacMini and got this working no problem, however, there's no audio...is that by design or is there something I can troubleshoot?

Multiple network interfaces and streaming video

I might be running into an issue on my system with multiple network interfaces. Would it be possible to include an option to define which network interface to use for streaming to homekit.

A similar option is available in the camera ffmpeg plugin by setting interfaceName in the config.

Would you take this in consideration?

Centos install no streaming video

On a Centos install with working ffmpeg (streaming video in Camera FFmpegplugin) the stream is not working. This is what is in the log:

[8/26/2020, 8:47:18 PM] [UniFi Protect] NVR Office [UCK-G2-PLUS] Frontdoor [UVC G3 Pro]: Adding camera to HomeKit.
[8/26/2020, 8:47:18 PM] [UniFi Protect] NVR Office [UCK-G2-PLUS] Driveway [UVC G3 Pro]: Adding camera to HomeKit.
[8/26/2020, 8:47:18 PM] [UniFi Protect] NVR Office [UCK-G2-PLUS] Frontdoor [UVC G3 Pro]: Stream quality configured: High.
[8/26/2020, 8:47:18 PM] [UniFi Protect] NVR Office [UCK-G2-PLUS] Driveway [UVC G3 Pro]: Stream quality configured: High.
[8/26/2020, 8:48:03 PM] [UniFi Protect] Driveway: HomeKit video stream request received: 1280x720, 30 fps, 299 kbps.
[8/26/2020, 8:48:32 PM] [UniFi Protect] Driveway: Stopped video stream.

The iPhone displays the still image with in white the text "No Response This camera is not responding"

Any tips?

Over LTE (Cellular) Video Streaming Optimization

I have been playing with the plug-in and the video streaming over Wi-Fi is very smooth with a loading time of few seconds. When I try it over LTE or another Wi-Fi the video streaming experience its not than smooth. The loading time is around 10 seconds when load, other times shows unavailable. Over Wi-Fi the streaming is stablished @ 1280x720, 30 fps, 299 kbps. over LTE is stablished @ 640x360, 30 fps, 132 kbps. Is there a way to optimize the over cellular experience reducing fps or kbps? Also, I tried over another Wi-Fi connection and the experience is the same as the cellular one. Not sure where the issue is... The internet connection upload is 300 Mbps with very low latency and the LTE connection is around 180 Mbps. The Protect App works perfect over LTE. Any idea?

Start stream delay, audio, latency

The 3 main issues I have with this plugin:

  • the delay when you initiate a video stream (long spinning circle load time)
  • a big 5-10 sec lag on the video stream itself
  • no apparent audio support (or at least if there is, no audio in my case)

Perhaps dev can look at the code for homebridge-ring and borrow an idea or two. It is super snappy, very responsive and is able to send audio and video to the Home app with about a 0.5 second delay. Also uses ffmpeg, but relies on a video stream from Ring servers.

I'm sure since it relies on LAN devices and not a web server, this plugin can do even better!

Doorbell as a sensor to trigger automation

Thanks for integrating the G4 Doorbell camera into homebridge! I almost went back to my ring, but much happier to be using this plugin!

I'm not sure if this is a limitation of HomeKit, but is it possible to use the doorbell as a trigger for automations? From what I can see it doesn't look like that action is exposed as a sensor or switch. The camera only has the motion sensor of the camera and a switch to turn off motion sensing. Am I missing something here? I am guessing HomeKit is hiding this some how because when I ring the doorbell, HomeKit does actually notify me with a proper doorbell notification...

IMG_90C9D6C34533-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.