How to reboot hassio?

Hi, i’ve noticed that my deconz appears to completely crash after a couple of days operation. a complete reboot (well, at that point, yanking the power cable) helps to restore functionality.

so i attempted to create a simple automation so i don’t have to manually restart my raspberry pi when it happens:

shell_command:
  reboot_host: ha host reboot

with an automation like:

- alias: Reboot HASS
  trigger:
  - platform: time
    at: "19:00:00"
  action:
  - service: shell_command.reboot_host

It triggers fine, however, the follow error shows up in the logs:

Logger: homeassistant.components.shell_command
Source: /usr/src/homeassistant/homeassistant/components/shell_command/__init__.py:111
Integration: Shell Command (documentation, issues)
First occurred: 19:00:00 (1 occurrences)
Last logged: 19:00:00

Error running command: `ha host reboot`, return code: 127
NoneType: None

what is the correct command i should use to reboot the entire raspberry pi?

cheers!

I would suggest using the service call built for this: hassio.host_reboot

In an automation action, it would look like this:

  action:
  - service: hassio.host_reboot
    data: {}
2 Likes

of course! much simpler :slight_smile: thanks @Silicon_Avatar!

1 Like