hjdhjd/unifi-protect

Trigger chime on POE g4 pro Chime

arsonik opened this issue · 4 comments

Describe The Problem:
Hi there
I am trying to find a way to trigger the g4 pro poe chime sound without using the main g4 pro doorbell
so I can use a trigger on another door ?
possible ? how ?
cheers

To Reproduce:
Not applicable

Logs:
Not applicable

Screenshots:
Not applicable

hjdhjd commented

There's not a way to do this in the current release, but it's a good add for a future version. Appreciate the feature request...it'll be in an upcoming release.

I'd love to help!
If u have few hints to help me started ?
I'll open a pr

Got it working with your api like that !!

    const ep = api.getApiEndpoint('chime');
    await api.retrieve(ep).then(async (res) => {
        const chime = JSON.parse((await res?.buffer()).toString())[0];
        const ring = `${ep}/${chime.id}/play-speaker`;
        api.retrieve(ring, { method: 'POST' }).then(async (res) => {
            console.log('🔔');
        });
    });

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