How to auto start HA after power outage for unmanned remote location?

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?

Any help would be appreciated, thanks.

HA is running that just sounds like the login screen to get into the browser to see everything.

think

does the auto login

HAOS will start automagically when the machine is powered up. You should use a web browser from another PC to access it via its web interface.

HA runs “headless” … that is it doesn’t need a keyboard/mouse or screen connected - in fact better not to have them on your HA machine.

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.

1 Like

Ok so you are saying, after power restore HA will automatically startup and still run my automations even without anyone having to sign in, correct?

Yep. The sign in is just for the ui. Everything will work without anyone ever looking at the UI after start up.

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
2 Likes