For a second home while left vacant I need to have HA automatically start back up after a power outage without any intervention (I do have a UPS but…)
I’m running HAOS on a NUC with the BIOS set to auto power up after a power failure but HA brings me to a sign in screen asking for name and password. Is there a way to just have HA start up without signing in?
Recovery from a power failure without doing a system shutdown before the power failure can lead to a corrupt file system. This can cause problems with HA when it starts.
Best to detect the power failure (a signal from the UPS or another way) and shutdown the system before the battery reaches zero. The system should start when power is restored.
Thank you all!, now my next project is to determine how to setup the usb from the NUC to the UPS so that if the battery runs out the HA NUC will shutdown properly.
Here, I’m using something similar to notify me and shut down gracefully if the battery on the laptop running HA falls below 11%. It should be enough to get you started:
alias: Auto Shutdown
description: Graceful shutdown when server battery is low
trigger:
- platform: numeric_state
entity_id:
- sensor.server_battery
below: 15
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.internal_ping
state: "on"
sequence:
- service: notify.your_mobile_goes_here
data:
data:
car_ui: true
color: red
ttl: 0
priority: high
channel: alarm_stream_max
title: Server battery low!
message: Server will automatically shutdown soon
- wait_for_trigger:
- platform: numeric_state
entity_id:
- sensor.server_battery
below: 11
continue_on_timeout: false
timeout:
hours: 0
minutes: 20
seconds: 0
milliseconds: 0
- service: notify.your_mobile_goes_here
data:
data:
car_ui: true
color: red
ttl: 0
priority: high
channel: alarm_stream_max
title: Server shutting down!
message: Server shutdown starting
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- service: hassio.host_shutdown
data: {}
- conditions:
- condition: state
entity_id: binary_sensor.internal_ping
state: "off"
sequence:
- wait_for_trigger:
- platform: numeric_state
entity_id:
- sensor.server_battery
below: 11
timeout:
hours: 0
minutes: 20
seconds: 0
milliseconds: 0
- service: hassio.host_shutdown
data: {}
mode: single