Unable to restart addon via homeassistant.addon_restart in automation

hi there.

HA 103.6 on ubuntu 18 via docker

I’ve an automation that calls homeassistant.addon_restart to restart autossh addon

- id: autosshrestart
  alias: V 02 Autossh restart
  trigger:
  - minutes: /30
    platform: time_pattern
    seconds: '0'
  action:
  - data:
      addon: "3351470_autossh"
    service: hassio.addon_restart

it’s used to work in the past, but I found it isn’t working anymore.
If I call the same service via developer tools with the same data, the addon is correctly restarted.
Tied to call the same service in a script, it doesn’t work.
no error evidence in logs, my configuration looks ok (no error if I check it)

any hints?
TIA

found any update?

unfortunately no
I’m thinking about creating a shell command to restart the docker container, but I’d like to have some advices before doing so

Bummer. Your comment helped me though. I didn’t know you needed the addon name plus the string that comes before it. So I used that. Then it worked in developer tools but still not in NodeRed. Then I added "hassio_api": true to the config file of the addon. Then I was able to successfully call hassio.addon_restart from nodered. So I don’t know if this helps you a bit or not…

1 Like

well… added “hassio_api”: true to the addon’s config, restarted
it doesn’t work, I know because I’m away from home and I “closed” myself outside :smiley:
anyway, thank you for your hint :slight_smile:

good luck anyways!

well, in this case (the fact I closed myself outside) it’s an error on my side… I stopped the addon, lost connection, then called a script from telegram… but the script first stop the addon and then try to restart… maybe trying stopping something is already stopped doesn’t work either :slight_smile:
will check later
thank you

well… I found the issue… it’s a PEBKAC one…
the addon’s slug was missing a 0
I feel so … (fill the blanks as you prefer) :smiley: