Raspbian Hassio Run Kodi Automation

Guys, is there any possibility to make automation that will call a command to run a Kodi from Raspbian? I tried several options in last week and nothing unfortunatelly work.


So after a month trying and spamming this forum (sorry) I got it figured out. For Hassio on Raspbian guide as follows:

  1. Open https://pimylifeup.com/raspberry-pi-ssh-keys/ and use following parts:
  • Generating SSH Keys on Linux based systems
  • Copying the Public Keys Manually
  1. Copy private key to the Hassio config directory which shoud be /usr/share/hassio/homeassistant/
  2. Add below to configuration.yaml in Hassio:
  runwhateveryouwant: ssh -i /config/ssh_key -o 'StrictHostKeyChecking=no' user@host program_you_want_to_run
  • Replace ssh_key by the filename of your private key
  • If you are using Raspbian the default user should be pi
  • Host is your ip or hostname
  • -o ‘StrictHostKeyChecking=no’ command is used thanks to Tinkerer Shell Command SSH and I used if after figuring out this commands works in SSH addon of Hassio but not as shell_command component.
  1. Now you just call the service shell_command.runwhateveryouwant

Much more simple method:

From hass.io addon store install OpenSSH set ssh port for ex 22222

  1. Connect to hass.io by SSH create the folder for ssh keys -> mkdir /config/.ssh
  2. ssh-keygen -> enter path to save /config/.ssh/id_rsa ( without password )
  3. copy keys to primary system for. ex. raspbian
    ssh-copy-id -i /config/.ssh/id_rsa pi@raspbian_ip

gammu: ssh -i /config/.ssh/id_rsa -o “StrictHostKeyChecking=no” pi@raspbian_ip gammu sendsms TEXT “123456789” -text “test”

Works after reboot, no errors !