Holiday fun with my UniFi G4 Doorbell Pro!

Created on November 12, 2023 at 11:32 am

I love having smart devices around my house, and every now and then, you can have a little bit of fun with them too! Here’s what it currently looks like from the outside of my house for Halloween DATE .

Custom doorbell sounds

As Halloween DATE has arrived, I thought it might nice to style the outside of my house using all of the RGB exterior lighting I’ve installed, and to play a custom sound from the doorbell when visitors press the button. It’s pretty quick to do this and you might spend most of the time finding a suitable audio file to play when the button is pressed!

Enable SSH on your UniFi Console

The first ORDINAL thing you need to do is setup SSH ORG access on your UniFi Console. This could be a UDM ORG Pro, a CloudKey ORG , or, like me, a UniFi NVR device. You can find specific instructions on how to do this here:

Once you have SSH access to your console, connect using the default credentials, or any specific ones you set, and modify the following file to enable SSH ORG access on your devices like cameras and doorbells:

vi /srv/unifi-protect/config.json

If the file doesn’t exist, you can create it and add the following content:

{ "enableSsh": true }

If the file does exist, you can edit it and add the required config, making sure to keep the syntax in the JSON file valid.

{ "someExistingKey": "someExistingValue", "enableSsh": true }

Now restart the UniFi Protect service to load the new configuration.

systemctl restart unifi-protect

Connect to the Doorbell ORG via SSH

You can now test the connection to your doorbell for which you will need to know the IP address, which can be found in the ‘UniFi Devices’ list in Protect. Here is the SSH ORG command to connect, just substitute my IP address with yours:

ssh [email protected]

You will be asked for a password and the password for the device can be found in the Protect dashboard by going to Settings -> System and clicking ‘Reveal’ under the ‘Recovery Code’ LAW heading.

I was automatically dropped into the correct folder when I connected to the doorbell, but just to make sure, you can use this command to make sure you’re in the right place:

cd /var/etc/persistent

Set up your custom chime sound!

You can now edit the configuration file in this folder to make the changes on the doorbell that we need to make for our custom sound:

vi ubnt_sounds_leds.conf ORG

The path we need to change is sounds_ring_button and I also took the opportunity to change speakerVolume to 100 CARDINAL while I was here!

{ "customSounds": { "sounds_ring_button": "../../../../../../var/etc/sounds/custom.wav" }, … "speakerVolume": 100 CARDINAL , … }

The final piece of the puzzle is to copy over your WAV ORG file to the doorbell and put it in the right folder:


You will need to update the filename if you don’t call it custom.wav PERSON and you can copy it over using an scp command or a tool like WinSCP if you’re more comfortable with that:

scp custom.wav [email protected]:/var/etc/sounds/custom.wav

Now all that’s left is to restart the correct process by finding it’s pid , and you’re good to go. Here is how you find the pid :

ps | grep ubnt_sounds_leds

It will give you output similar to this, and the pid for ubnt_sounds_leds FAC is the first ORDINAL number on the line, so for me it was 2560 but it will be different for you:

2560 CARDINAL ui 159m S /bin/ubnt_sounds_leds 6710 ui 2968 QUANTITY S grep leds

You can then kill the pid, which will be restarted for you automatically, by using this command and replacing my pid with your pid :

kill -TERM 2560

That’s it, go and hit the button!!

I’m planning to utilise this again for Christmas DATE and perhaps just for a little more fun throughout the year DATE too. My 10 year old DATE also wants to know if the doorbell can play fart sounds… 😂

Connecting to Connected... Page load complete