https://github.com/seb1k/nut-ntfy
Send ntfy notification when your UPS is disconnected
https://github.com/seb1k/nut-ntfy
ntfy nut
Last synced: about 2 months ago
JSON representation
Send ntfy notification when your UPS is disconnected
- Host: GitHub
- URL: https://github.com/seb1k/nut-ntfy
- Owner: seb1k
- Created: 2024-04-04T03:02:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-13T23:53:34.000Z (8 months ago)
- Last Synced: 2025-11-14T01:16:48.767Z (8 months ago)
- Topics: ntfy, nut
- Language: Shell
- Homepage:
- Size: 51.8 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nut-ntfy
Send ntfy notification when your UPS is disconnected - and reconnected

The script is tested on an EATON UPS
/etc/ups.conf :
```console
[EATON]
driver = usbhid-ups
port = auto
desc = "EATON usb driver"
```
## 1 - Install
Copy the file send_ntfy to /etc/nut/
Set the permission on the file :
```console
chown root:nut /etc/nut/send_ntfy
chmod 774 /etc/nut/send_ntfy
```
## 2 - Configure
Edit the file /etc/nut/upsmon.conf and set the script location to NOTIFYCMD line
NOTIFYCMD "/etc/nut/send_ntfy"
Edit the file /etc/nut/send_ntfy
- Line 3 : replace line YOUR_NTFY_TOPIC by your ntfy.sh topic
- Line 4 : Add your UPS name on : UPS_name="YOUR_UPS_NAME" (You can find it with "upsc -l")
## 3 - Test
Send a test message to your ntfy.sh topic with this command
```console
/etc/nut/send_ntfy test
```
## 4 - modify script
By default, the script will send a notification when the UPS reaches the % below, change as you wish !
```console
alert_at=(25 50 75 85 90 95 98)
```
## 4 - Star me :)