Skip to content
/ nut-ntfy Public

Send ntfy notification when your UPS is disconnected

Notifications You must be signed in to change notification settings

seb1k/nut-ntfy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

nut-ntfy

Send ntfy notification when your UPS is disconnected - and reconnected

screenshot

The script is tested on an EATON UPS

/etc/ups.conf :

[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 :

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

 /etc/nut/send_ntfy

4 - modify script

By default, the script will send a notification when the UPS reaches the % below, change as you wish !

alert_at=(25 50 75 85 90 95 98)

4 - Star me :)

About

Send ntfy notification when your UPS is disconnected

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages