Skip to content

Instantly share code, notes, and snippets.

@HomeFlix
HomeFlix / bellchange.sh
Last active December 31, 2025 18:48
Auto replace of default chime.wav with custom.wav for Unifi G4 Doorbell Pro
#!/bin/bash
clear
if [ "$1" = "" ]
then
echo "Usage: $0 <Custom wav filename in current dir to use>"
ls *.wav
exit 1
fi
echo "Step 1 ..."
sshpass -p<Unifi-Protect-Password> ssh root@<Unifi-Protect-IP> << EOF

UPS Shutdown Scripts

Setting up the proper shutdown scripts was a lot of config. This documents everything I needed to do to get it running.

The Synology NAS is the NUT server as the UPS USB cable is plugged into it. It's set to alert any clients subscribed to it when the UPS connected to it is in low battery. This all applies regardless of what machine you have a NUT server on, does not have to be Synology.

The UDM Pro does not have the ability to listen to a NUT server, so I've setup the Proxmox server to initiate the shutdown command to the UDM. I was able to do that by:

  • Installing the NUT client on Proxmox
  • Enabling SSH on the UDM Pro