hjdhjd / homebridge-unifi-protect

: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
Other
1.43k stars 88 forks source link

Doorbell button no longer triggers #257

Closed ambanmba closed 3 years ago

ambanmba commented 3 years ago

Describe The Problem: Doorbell button no longer triggers Doorbell switch. Other functions continue to work. Nothing was touched in the config from the day when things were working to the day that things suddenly stopped working.

To Reproduce: Ring doorbell. Nothing happens in Homebridge. All other Homebridge / Homebridge-Unifi plugin features continue to work (e.g. visibility of camera streams in Homekit, motion detection triggers, etc.)

Logs: Nothing appears in the logs when the button is pressed.

[25/01/2021, 13:57:11] [HB Supervisor] OS: Linux 5.4.51-v7+ arm
[25/01/2021, 13:57:11] [HB Supervisor] Node.js v14.15.3 /usr/local/bin/node
[25/01/2021, 13:57:11] [HB Supervisor] Homebridge Path: /usr/local/lib/node_modules/homebridge/bin/homebridge
[25/01/2021, 13:57:11] [HB Supervisor] UI Path: /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[25/01/2021, 13:57:11] [HB Supervisor] Starting Homebridge with extra flags: -I
[25/01/2021, 13:57:11] [HB Supervisor] Started Homebridge v1.1.7 with PID: 686
[25/01/2021, 13:57:14] Loaded config.json with 1 accessories and 4 platforms.
[25/01/2021, 13:57:14] ---
[25/01/2021, 13:57:18] Loaded plugin: homebridge-camera-ffmpeg@3.0.3
[25/01/2021, 13:57:18] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
[25/01/2021, 13:57:18] ---
[25/01/2021, 13:57:18] Loaded plugin: homebridge-config-ui-x@4.36.0
[25/01/2021, 13:57:18] Registering platform 'homebridge-config-ui-x.config'
[25/01/2021, 13:57:18] ---
[25/01/2021, 13:57:18] Loaded plugin: homebridge-nuvo@2.2.0
[25/01/2021, 13:57:18] Registering platform 'homebridge-nuvo.nuvo-platform'
[25/01/2021, 13:57:18] ---
[25/01/2021, 13:57:18] Loaded plugin: homebridge-script2@0.3.0
[25/01/2021, 13:57:18] Registering accessory 'homebridge-script2.Script2'
[25/01/2021, 13:57:18] ---
[25/01/2021, 13:57:18] Loaded plugin: homebridge-telegram@0.2.0
[25/01/2021, 13:57:18] Registering platform 'homebridge-telegram.Telegram'
[25/01/2021, 13:57:18] ---
[25/01/2021, 13:57:19] Loaded plugin: homebridge-unifi-protect@4.3.5
[25/01/2021, 13:57:19] Registering platform 'homebridge-unifi-protect.UniFi Protect'
[25/01/2021, 13:57:19] ---
[25/01/2021, 13:57:19] Loading 4 platforms...
[25/01/2021, 13:57:19] [Config] Initializing config platform...
[25/01/2021, 13:57:19] [Config] Running in Service Mode
[25/01/2021, 13:57:19] [UniFi Protect] Initializing UniFi Protect platform...
[25/01/2021, 13:57:19] [Telegram] Initializing Telegram platform...
[25/01/2021, 13:57:19] [Telegram] TelegramPlatform Plugin Loaded
[25/01/2021, 13:57:19] [Telegram] Found bot in config: "Telegram Bot"
[25/01/2021, 13:57:20] Initializing platform accessory 'Telegram Bot'...
[25/01/2021, 13:57:20] [Camera FFmpeg] Initializing Camera-ffmpeg platform...
[25/01/2021, 13:57:20] Loading 1 accessories...
[25/01/2021, 13:57:20] [Telegram Script] Initializing Script2 accessory...
[25/01/2021, 13:57:20] [Camera FFmpeg] [Hikvision] Configuring cached bridged accessory...
[25/01/2021, 13:57:35] [Homebridge UI] Homebridge Config UI X v4.36.0 is listening on :: port 8581
Setup Payload:
X-HM://0000XXX0XX0X0
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 000-11-000 │     
    └────────────┘     

[25/01/2021, 13:57:20] Homebridge is running on port 51345.
[25/01/2021, 13:57:33] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Connected to the Protect controller API (address: 192.168.11.15 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Connected to the UniFi realtime update events API.
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Us [UVC G3 Dome] (address: 192.168.11.120 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Doorbell [UVC G4 Doorbell] (address: 192.168.11.57 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: HSN [UVC G3] (address: 192.168.11.123 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: APS [UVC G4 Pro] (address: 192.168.11.173 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: APN [UVC G4 Pro] (address: 192.168.11.56 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Dwn [UVC G3 Dome] (address: 192.168.11.127 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Kit [UVC G3 Dome] (address: 192.168.11.130 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Gt [UVC G3 Dome] (address: 192.168.11.134 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Dy [UVC G3 Dome] (address: 192.168.11.128 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Ge [UVC G3 Flex] (address: 192.168.11.133 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Discovered camera: Rk [UVC G3 Dome] (address: 192.168.11.129 mac: 18E000000000).
[25/01/2021, 13:57:34] [UniFi Protect] Ultimo [UCK-G2-PLUS]: Controller refresh interval set to 10 seconds.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Us [UVC G3 Dome]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Doorbell [UVC G4 Doorbell]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] HSN [UVC G3]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] APS [UVC G4 Pro]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] APN [UVC G4 Pro]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Dwn [UVC G3 Dome]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Kit [UVC G3 Dome]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Gt [UVC G3 Dome]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Dy [UVC G3 Dome]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Ge [UVC G3 Flex]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Rk [UVC G3 Dome]: Enabling doorbell automation trigger.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Doorbell [UVC G4 Doorbell]: Discovered doorbell message switch: LEAVE PACKAGE.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Doorbell [UVC G4 Doorbell]: Discovered doorbell message switch: DO NOT DISTURB.
[25/01/2021, 13:57:35] [UniFi Protect] Ultimo [UCK-G2-PLUS] Doorbell [UVC G4 Doorbell]: Discovered doorbell message switch (60 seconds): Call 11111111.
[

Homebridge Configuration:

        {
            "controllers": [
                {
                    "address": "192.168.11.15",
                    "doorbellMessages": [
                        {
                            "duration": 60,
                            "message": "Call 11111111"
                        }
                    ],
                    "password": "xxxxxxxx",
                    "username": "homebridge"
                }
            ],
            "options": [
                "Enable.Doorbell.Trigger"
            ],
            "verboseFfmpeg": false,
            "platform": "UniFi Protect"
        },

Screenshots: None

Environment:

hjdhjd commented 3 years ago

Nothing's changed from a code perspective...so that leads me to ask: what might have changed in your environment? Did you update plugin versions, Protect firmware, or anything else of consequence?

I'll take a closer look this week, but would appreciate if you'd think through the above. Thanks!

ambanmba commented 3 years ago

The last successful doorbell trigger occurred at 17:54 AEDT on 21 Jan. The first unsuccessful doorbell trigger occurred at 15:39 AEDT on 22 Jan. --- All doorbell presses from this point onwards fail to trigger The last Ubiquiti firmware update occurred on 6 Jan. The last Ubiquiti config change occurred on 14 Jan (password change due to well publicised UI hack) There was no Homebridge change in the days prior to 21 Jan There was no Homebridge update/change done after 21 Jan other than to debug this problem. Have rebooted Homebridge, have unset/set notification settings in Protect I don't think the problem is on the Apple/Homekit side since the Homebridge Accessories screen doesn't show activity when the button is pressed Pressing the doorbell button operates the physical bell it's attached to The video stream from the doorbell works as normal

hjdhjd commented 3 years ago

Something changed more recently than that given Protect firmware 1.17.1 was released ~four days ago...and you're running it.

ambanmba commented 3 years ago

Wow, good pickup! I just went through the logs and it looks like the auto-update feature got enabled. It shows that on 21 Jan at 20:27 AEDT the controller and all the cameras (including the doorbell) got upgraded. This timing coincides perfectly with the loss of doorbell trigger functionality! Prior to the update the trigger worked, then it stopped after the upgrade.

hjdhjd commented 3 years ago

There’s a bug in 1.17.1 that is supposedly fixed in 1.17.2 where doorbell rings occasionally don’t get acknowledged on doorbells. You can read more in the Ubiquiti forums. I’d suggest you upgrade to 1.17.2, and be watchful over Ubiquiti updates in the future. :smile: I would not recommend autoupdating any Ubiquiti firmware without checking out what issues early adopters have run into. I would generally recommend waiting 1-2 weeks before doing so.

Best of luck.

ambanmba commented 3 years ago

Upgraded to 2.0.26 (CK2+ Firmware) and 1.17.2 (Protect) and restarted the Homebridge service. That didn't solve the problem, but doing a full reboot of the Homebridge server (it's on an rPi) did the trick.

Incidentally, why do all the cameras have a doorbell automation trigger, not just the Doorbell itself?

hjdhjd commented 3 years ago

I misread your question: the answer is to replicate certain behavior that is specific to doorbells in the HomeKit ecosystem. For example, you may want to have a camera pop up on an Apple TV in the same way it would when a doorbell rings. This allows cameras to emulate doorbells in those scenarios.

ambanmba commented 3 years ago

@hjdhjd , I hate to be "that guy" but there is still a problem. The HB-UI-Protect integration seems to break after a few hours. The problem doesn't appear to be Homebridge as the other plugins all seem to work (even Homebridge Camera FFmpeg on another direct link to a HikVision camera). The symptom is that after a full system reboot, the HB-UI-Protect plugin works for some period of time then silently stops working without any logs or error messages. When the HB-UI-Protect plugin stops working it can no longer stream video or respond to triggers such as the Doorbell. All normal UI features as accessed from UI apps work normally. The doorbell rings normally and sends a UI notification on the phone.

CK is at 2.0.26 and Protect is at 1.17.2.

finder39 commented 3 years ago

I am actually having this issue as well. I have now upgraded to 1.17.3 and the issue still occurs. I am happy to share information/logs if that makes this easier to debug, just let me know.

I totally understand your sentiment to wait a couple weeks on upgrading firmware, but let me know if there is anything I can do to help get to the bottom of this.

github-actions[bot] commented 1 year ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.