I have used that exact UPS. It works with NUT.
It will run for at least an hour with a 37W load.
I have used that exact UPS. It works with NUT.
It will run for at least an hour with a 37W load.
HA supports all UPSes supported by NUT. NUT supports HID UPSes.
Thanks Tom. I got one myself now on Amazon Prime day. I struggled a bit with the “Network UP Tools (NUT)” until I found it was both an Add-On AND an Integration and I needed both!
I’ve got 5 entities available (Battery charge, Load,Voltage, Status and Status Data) and 15 not available.
So whilst I can monitor the voltage, say, and shutdown HA gracefully if it starts looking low, if the mains power comes back on before the UPS actually cuts out HA will not reboot. I have the BIOS set to boot on power-up.
It seems to me that I’m better off doing nothing and letting HA die with the UPS; then at least it will come back on again. Not very graceful.
Thoughts?
SoC (state of charge) will be a better sensor to monitor than voltage.
For your very small load I’d disable the shutdown command and automate shutting down home assistant at SoC = 10%. That way you would be unlucky if the power came back before the UPS shutdown, but yeah it could still happen. Not sure how to get around that.
Is there a recommendation which UPS to purchase when the task is „only“ to keep alive the HA machine (NanoPi running at 5V 4W) and the Internet AP (FritzBox running at 12V 5W) for something like 1h and integrating into HA? My first idea was one of those 18650-UPS-boxes sold for cheap but presumably they will not broadcast their status in any way
Yes. the boxes for cheap were my go-to solution and, yes. they have no monitoring of the status of the “UPS”. They are just big battery banks with low voltage output. Think of it as an electronics project waiting to happen.
To separate the low-voltage battery packs from the mains voltage “big” UPSes I have created a new thread for those solutions: Low-voltage UPS array with at least outage notification? - #4 by Cabletwister
Fully aware of the drawbacks of those solutions.
You can activate a bunch more diagnostic entities in any NUT device. Go to the device page and see the hidden disabled entities then enable them.
I can see the realtime load and power factor! So nice.
After three power losses in ten minutes toasted my raid and being a true to form home assistant cheapskate, I came up with a way of monitoring power status i.e if there is mains power or not.
If anyone is interested in getting a cheap UPS (not monitored) solution to shutdown in the event of a power failure, then here’s my WIP
It’s hardly enterprise grade but it will shutdown (once I write that bit) after a predetermined time. This is paired with the cheapest POS UPS I could find online, 800VA with a 80 watt load =~ 6-8 mins, so the shutdown script will run after five minutes if the plug status goes unavailable and will cancel if the state changes from unavailable to anything else i.e. on/off.
The way it works:
HA script uses button.press
to ping a zigbee plug every minute, automations monitor this state and trigger the shutdown or cancel shutdown scripts. I prefer using automations to trigger scripts rather than automations alone since (unless this has changed recently), a step failing in an automation breaks the rest of the automation, scripts will run if a step fails.
automation.yaml
# Ping Zigbee plug every minute
- id: 'mains_power_plug_ping'
alias: mains power ping power plug
description: Ping Z-Wave power plug every minute
trigger:
- platform: time_pattern
minutes: "/1"
condition: []
action:
- service: button.press
target:
entity_id: button.heater_ping
data: {}
mode: single
# Trigger shutdown script if power lost
- id: 'mains_power_lost'
alias: Mains Power Lost
description: Shutdown after 5 mins if power is lost
trigger:
- platform: state
entity_id:
- switch.heater
to: unavailable
for:
hours: 0
minutes: 1
seconds: 0
condition: []
action:
- service: script.mains_power_lost_script
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.mains_power
data: {}
mode: single
# Cancel shutdown script if power restored
- id: 'mains_power_restored'
alias: Mains Power Restored
description: Reset Input Boolean cancel Shutdown
trigger:
- platform: state
entity_id:
- switch.heater
from: unavailable
for:
hours: 0
minutes: 3
seconds: 0
condition: []
action:
- service: script.mains_power_restored_script
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.mains_power
data: {}
The scripts called by the automations:
scripts.yaml
mains_power_lost_script:
alias: "Mains Power Lost Script"
sequence:
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.mains_power
- variables:
start: 5
end: 0
step: -1
- repeat:
until:
- condition: template
value_template: >-
{{
(step == 0) or ((step < 0) and
(start + step * ( repeat.index - 1)) <= end) or
((step > 0) and
(start + step * ( repeat.index - 1)) >= end)
}}
sequence:
- variables:
current: '{{ start + step * ( repeat.index - 1 ) }}'
- service: logbook.log
data:
name: countdown.test
message: "Power lost {{current}} minutes until system shutdown"
- service: system_log.write
data:
logger: countdown.test
level: warning
message: >-
{{ 'Loop %d, val=%d, step=%d, test=%d' % (repeat.index, current,
step, (step==0) or ((step < 0) and current < end) or ((step > 0)
and current > end) ) }}
- service: notify.alexa_media_desk
metadata: {}
data:
message: "Power lost {{current}} minutes until system shutdown"
title: '!!! POWER ALERT !!!'
- service: notify.mobile_app_cph2025
metadata: {}
data:
message: "Power lost {{current}} minutes until system shutdown"
title: "!!!! POWER LOST !!!!"
# - service: notify.rods_join
# data:
# message: "Power has been lost - system will shutdown in {{current}} minutes"
# title: "!!!! POWER LOST !!!!"
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 500
- service: system_log.write
data:
logger: countdown.test
level: warning
message: "SHUTDOWN STARTED"
- service: notify.alexa_media_desk
metadata: {}
data:
message: "SHUTDOWN STARTED Power has been lost"
title: 'Shutdown NOW !!! POWER ALERT !!!'
- service: notify.mobile_app_cph2025
metadata: {}
data:
message: "SHUTDOWN STARTED Power has been lost"
title: "Shutdown NOW !!!! POWER LOST !!!!"
mode: restart
mains_power_restored_script:
alias: "Mains Power Restored Script"
sequence:
- service: script.turn_off
target:
entity_id:
- script.mains_power_lost_script
data: {}
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.mains_power
data: {}
- service: notify.alexa_media_desk
metadata: {}
data:
message: "Power RESTORED"
title: '!!! POWER RESTORED !!!'
- service: notify.mobile_app_cph2025
metadata: {}
data:
message: "Power RESTORED"
title: "!!!! POWER RESTORED !!!!"
- service: notify.rods_join
metadata: {}
data:
message: "Power RESTORED"
title: "!!!! POWER RESTORED !!!!"
- service: system_log.write
data:
message: "Power Restored\n Shutdown Cancelled"
level: info
I have the same UPS and want to monitor this via HA. at the moment its connected to my PC but i’m going to move it too the loft where all the switches etc are. I have ReadyNas 2024 up there with a USB port. How did you get HA to monitor it via the NAS?
I make use of the in-built functionality of my Synology NAS to act as a UPS server. It has the ability to monitor a UPS via a serial cable connected to a UPS port and also act as a server to make this information available to other devices on the network e.g. HA. The reason for doing it this way is so that the Synology is able to automatically shutdown when the battery low threshold is reached.
This is how the configuration screen looks in the Synology:
The IP address under “Permitted Diskstation Devices” is for my HA instance.
In HA I added the NUT device to poll the Synology for the UPS information, the IP address highlighted is for the Synology:
This then makes the following entities available in HA:
I think you will need to investigate how to get the NUT server software running on your ReadyNAS if possible (sorry but I have no idea about that).
While looking into this I did notice that there is a NUT Integration and also a NUT Add-on although I do not know what the difference is between the two.
So i moved the UPS to my loft lastnight and plugged it into the rear port on the readynas, suprisingly the NAS detected it and knew exactly what it was. This was then passed by it over snmp to HA! So all sorted thanks for the help
I am new to NUT but thanks to community notes here I have the plugin and integration working and my windows / Linux NUT clients communicate as expected; reporting correct UPS device and status.
Devices:
HAOS (RaspberryPi4 running NUT plugin all updated to latest)
Buffalo TeraStation NAS models: TS3410D / TS3420D
UPS: Tripp Lite (Eaton) SmartLCD using the usbhid-ups driver as recommended by NUT
I am trying to integrate with my Buffalo TeraStation NAS devices, connecting them as clients. I have confirmed some level of com’s by attempting “UPS sync” via the NAS web GUI resulting with:
Before opening port 3493 = no coms, NAS gui errors out as expected
After opening port 3493 = Gui reports: Sync confirmed → E10 UPS running on battery warning → Gui now says UPS Sync “can not confirm status”. There is very little in the NAS or HAOS/CORE/NUT logs indicating why NUT coms fail or report incorrect status.
NUT documentation indicates that Buffalo NAS TeraStation includes native NUT (re: Network UPS Tools - Related projects )
Is there a known device ID or UID/PWD I am missing (similar to the Synology UID/PWD posted elsewhere here?), or is this combination known to be incompatible?
Any help would be appreciated.
Thanks!