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 Chimes #1098

Closed Adwyth-1953 closed 1 month ago

Adwyth-1953 commented 1 month ago

Homebridge UniFi Protect Version

7.1.2

Homebridge Platform and OS

Raspberry Pi5

Homebridge Version

1.8.4

Node Version

18.19.0

UniFi OS Version

4.0.6

UniFi Protect Controller Version

4.0.33

Describe the problem

I have configured the plugin to add a switch accessory to trigger doorbell ring events. The switch appears in the Homekit automation configuration function and I can build an automation, which tests correctly in Homekit. I can occasionally trigger the automation from the accessories tile under the plugin configuration accessories tab, but the correct operation will only work randomly. I cannot trigger the automation from the doorbell itself, even though the log shows a doorbell trigger event. I'm sure I have an option or parameter set incorreclt, but I am unable to determine where.

Homebridge HBUP JSON configuration

{
    "bridge": {
        "name": "Homebridge 8215",
        "username": "0E:C8:31:FD:82:15",
        "port": 51131,
        "pin": "748-76-443",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "UniFi Protect",
            "controllers": [
                {
                    "address": "192.168.1.1",
                    "username": "HomeKit",
                    "password": "Home!110042!Kit"
                }
            ],
            "platform": "UniFi Protect",
            "options": [
                "Enable.Doorbell.Trigger.F4E2C670DBCC",
                "Enable.Doorbell.PhysicalChime.F4E2C670DBCC"
            ]
        }
    ]
}

Relevant log output

[27/07/2024, 13:38:52] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Stopped video streaming session.
[27/07/2024, 13:50:40] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getOptions
[27/07/2024, 13:50:40] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getDevices
[27/07/2024, 13:50:40] [Homebridge UI] [homebridge-unifi-protect] (node:666753) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
(Use `node --trace-deprecation ...` to show where the warning was created)
[27/07/2024, 13:54:31] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Doorbell ring detected.
[27/07/2024, 13:54:31] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Doorbell ring event triggered.
[27/07/2024, 13:54:31] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Streaming request from 192.168.1.9: 1600x1200@30fps, 1,450 kbps. Transcoding 1600x1200@30fps (High) [H264], 3,000 kbps [RTSP].
[27/07/2024, 13:54:34] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Stopped video streaming session.
[27/07/2024, 13:54:35] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Doorbell ring detected.
[27/07/2024, 13:54:35] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Doorbell ring event triggered.
[27/07/2024, 13:54:38] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Doorbell ring detected.
[27/07/2024, 13:54:38] [UniFi Protect] Garage Doors [G4 Doorbell Pro]: Doorbell ring event triggered.

Acknowledgment that you are only running UniFi OS and UniFi Protect releases from the Ubiquiti Official release channel

hjdhjd commented 1 month ago

Thanks for the report. First, to be clear, the Homebridge webUI and the HBUP webUI aren’t the same thing. The Homebridge webUI and the “accessories view” it provides are completely unsupported and out of scope for HBUP. If you have an issue there, you should take it up with the Homebridge Config-UI-X team. I wouldn’t recommend using it, looking at it, or doing anything with it.

Second - can you describe exactly what you’re trying to do and your setup. I can’t really follow much of what you wrote aside from the fact you’re trying to automate doorbell rings in some manner.

Happy to help, but to me, this is all a blank slate and only you know your setup and what you’re trying to do. Help me, help you. 😄

Adwyth-1953 commented 1 month ago

Thank you for the quick reply.

I use a Raspberry Pi running Homebridge with an installed instance of the Unifi Protect plugin to provide video and audio from nine Unifi cameras to HomeKit. I have a Unifi Protect G4 Doorbell Pro installed at my garage doors.

I wish to use the G4 Doorbell Pro bellpush to activate an external ringer. I cannot use the Unifi Smart Chime because I am using that function to trigger ringers for a my front door. As you are aware, the Unifi chime can only offers a single alert tone and so cannot be used to differentiate between rings from different doorbells.

I have configured the Unifi Protect plugin to provide a switch accessory for the garage doorbell 

I see the doorbell trigger in HomeKit 

I use a WiFi 4 Channel Dry Contact For Apple HomeKit to provide a set of dry contacts that close when the Garage Doors Doorbell Trigger activates

I see the Dry Contact, which I have labeled “Doorbell” in HomeKit and when I use the “Test This Automation” function, the dry contacts close and the attached alarm sounds.

 There does not appear to be a reason why this will not work, but it does not. I suspect I have an issue with the settings of the Unifi Protect plugin, but I have tried every combination imaginable to no avail.

I hope you are able to help.

Regards,

Paul Thomas Hallett +1 (978) 402-6778

On Jul 27, 2024, at 14:52, hjdhjd @.***> wrote:

Thanks for the report. First, to be clear, the Homebridge webUI and the HBUP webUI aren’t the same thing. The Homebridge webUI and the “accessories view” it provides are completely unsupported and out of scope for HBUP. If you have an issue there, you should take it up with the Homebridge Config-UI-X team. I wouldn’t recommend using it, looking at it, or doing anything with it.

Second - can you describe exactly what you’re trying to do and your setup. I can’t really follow much of what you wrote aside from the fact you’re trying to automate doorbell rings in some manner.

Happy to help, but to me, this is all a blank slate and only you know your setup and what you’re trying to do. Help me, help you. 😄

— Reply to this email directly, view it on GitHub https://github.com/hjdhjd/homebridge-unifi-protect/issues/1098#issuecomment-2254226864, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKEUOMG5PRGUZQKFE4Y57E3ZOPUABAVCNFSM6AAAAABLSB4BIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGIZDMOBWGQ. You are receiving this because you authored the thread.

hjdhjd commented 1 month ago

The UniFi smart chime is absolutely capable of multiple alert tones, though Protect itself doesn’t allow you to choose between them currently. This feature has existed since HBUP 6.2.0. You can read all about it.

There are a number of ways to solve the issue you have. The easiest and likely most robust is to simply buy additional smart chimes and associate them with the respective doorbell. There’s an upcoming update from Ubiquiti that’s currently in testing that further allows you to customize ringtones. This would most elegantly solve your challenge.

Another answer is to enable the doorbell trigger on the G4 Doorbell Pro and create an automation that, when the trigger is turned on, takes whatever action you want. That trigger is turned on only by a doorbell ring. It sounds like you’re trying some version of this, but without seeing screenshots of the automation in question I can’t provide more perspective.

You’re welcome to join the Discord and walk the community through your setup - but there are quite a few ways to do this.

Adwyth-1953 commented 1 month ago

Thank you for this response.

That Unifi is preparing to release an update for selectable doorbell tones is splendid news. Do you have any insight as to when the release will be made available?

Regards,

Paul Thomas Hallett

On Jul 27, 2024, at 17:31, hjdhjd @.***> wrote:

The UniFi smart chime is absolutely capable of multiple alert tones, though Protect itself doesn’t allow you to choose between them currently. This feature has existed since HBUP 6.2.0 https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Changelog.md#6200-2024-03-30. You can read all about it.

There are a number of ways to solve the issue you have. The easiest and likely most robust is to simply buy additional smart chimes and associate them with the respective doorbell. There’s an upcoming update from Ubiquiti that’s currently in testing that further allows you to customize ringtones. This would most elegantly solve your challenge.

Another answer is to enable the doorbell trigger on the G4 Doorbell Pro and create an automation that, when the trigger is turned on, takes whatever action you want. That trigger is turned on only by a doorbell ring. It sounds like you’re trying some version of this, but without seeing screenshots of the automation in question I can’t provide more perspective.

You’re welcome to join the Discord and walk the community through your setup - but there are quite a few ways to do this.

— Reply to this email directly, view it on GitHub https://github.com/hjdhjd/homebridge-unifi-protect/issues/1098#issuecomment-2254259258, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKEUOMHXUXUKWZIYE5M7UU3ZOQGT3AVCNFSM6AAAAABLSB4BIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGI2TSMRVHA. You are receiving this because you authored the thread.

Adwyth-1953 commented 1 month ago

I apologize profusely for being dense, but nowhere do I see the option to select buzz or chime in HBUP 7.1.2. Can you please point me in the right direction?

6.20.0 (2024-03-30)

New feature: UniFi chime devices now expose two additional switches, allowing you to trigger the chime speaker with either the default tone or the buzzer tone. Buzzer tone you say, what's that? Give it a try.

On Jul 27, 2024, at 17:31, hjdhjd @.***> wrote:

The UniFi smart chime is absolutely capable of multiple alert tones, though Protect itself doesn’t allow you to choose between them currently. This feature has existed since HBUP 6.2.0 https://github.com/hjdhjd/homebridge-unifi-protect/blob/main/docs/Changelog.md#6200-2024-03-30. You can read all about it.

There are a number of ways to solve the issue you have. The easiest and likely most robust is to simply buy additional smart chimes and associate them with the respective doorbell. There’s an upcoming update from Ubiquiti that’s currently in testing that further allows you to customize ringtones. This would most elegantly solve your challenge.

Another answer is to enable the doorbell trigger on the G4 Doorbell Pro and create an automation that, when the trigger is turned on, takes whatever action you want. That trigger is turned on only by a doorbell ring. It sounds like you’re trying some version of this, but without seeing screenshots of the automation in question I can’t provide more perspective.

You’re welcome to join the Discord and walk the community through your setup - but there are quite a few ways to do this.

— Reply to this email directly, view it on GitHub https://github.com/hjdhjd/homebridge-unifi-protect/issues/1098#issuecomment-2254259258, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKEUOMHXUXUKWZIYE5M7UU3ZOQGT3AVCNFSM6AAAAABLSB4BIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGI2TSMRVHA. You are receiving this because you authored the thread.

hjdhjd commented 1 month ago

Follow the link above to the release notes for HBUP. Here’s the relevant excerpt:

New feature: UniFi chime devices now expose two additional switches, allowing you to trigger the chime speaker with either the default tone or the buzzer tone. Buzzer tone you say, what's that? Give it a try.

You’re also trying to do advanced things…if you’re new to HBUP, my advice is crawl/walk/run. Get up and running and then read all the documentation if you want to do more sophisticated automations. And join the Discord…lots of good folks to ask questions to including myself.

Adwyth-1953 commented 1 month ago

Thank you

On Jul 27, 2024, at 18:23, hjdhjd @.***> wrote:

Follow the link above to the release notes for HBUP. Here’s the relevant excerpt:

New feature: UniFi chime devices now expose two additional switches, allowing you to trigger the chime speaker with either the default tone or the buzzer tone. Buzzer tone you say, what's that? Give it a try.

You’re also trying to do advanced things…if you’re new to HBUP, my advice is crawl/walk/run. Get up and running and then read all the documentation if you want to do more sophisticated automations. And join the Discord…lots of good folks to ask questions to including myself.

— Reply to this email directly, view it on GitHub https://github.com/hjdhjd/homebridge-unifi-protect/issues/1098#issuecomment-2254269368, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKEUOMHQICMJJGD7Z6WTE73ZOQMWDAVCNFSM6AAAAABLSB4BIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGI3DSMZWHA. You are receiving this because you authored the thread.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 month 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.