Core: Hassio addon services do no work

Created on 27 Feb 2020  路  7Comments  路  Source: home-assistant/core

The problem

Services hassio.addon_start and hassio.addon_stop do not start or stop the addon

Environment

  • Home Assistant release with the issue: 0.106
  • Last working Home Assistant release (if known):
  • Operating environment (Hass.io/Docker/Windows/etc.): Hassio on Raspbian using Hassio-Installer script (raspberry pi 3)
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

Following script does not stop the addon with slug "addon_slug"

addon_stop:
  sequence:
    - service: hassio.addon_stop
      data:
        addon: addon_slug

Traceback/Error logs

Nothing appears in the logs

Additional information

hassio

All 7 comments

+1 for this bug. Also restart isnt working. i have 0.106.2 installed. I tried restart first and as it didnt seem to work I tried stop.
The automation I have written is:

  • id: '1583084200366'
    alias: Restart Node Red
    description: ''
    trigger:

    • entity_id: input_boolean.restart_node_red

      from: 'off'

      platform: state

      to: 'on'

      action:

    • delay:

      seconds: 5

    • service: input_boolean.turn_off

      data:

      entity_id: input_boolean.restart_node_red

    • service: hassio.addon_stop

      data:

      addon: a0d7b954_nodered

Hey there @home-assistant/hass-io, mind taking a look at this issue as its been labeled with a integration (hassio) you are listed as a codeowner for? Thanks!

I would like to add that buttons for start and stop the addon work well in supervisor GUI.
But doing it by calling the service does not.

+1 for this bug. Also restart isnt working. i have 0.106.2 installed. I tried restart first and as it didnt seem to work I tried stop.
The automation I have written is:

  • id: '1583084200366'
    alias: Restart Node Red
    description: ''
    trigger:

    • entity_id: input_boolean.restart_node_red
      from: 'off'
      platform: state
      to: 'on'
      action:

    • delay:
      seconds: 5

    • service: input_boolean.turn_off
      data:
      entity_id: input_boolean.restart_node_red
    • service: hassio.addon_stop
      data:
      addon: a0d7b954_nodered

My workaround is to use SSH & Web Terminal Addon from community to launch a shell script with the command:
docker start addon_container_name or docker stop addon_container_name

SSH & Web Terminal exposes the following service to launch a script:

- service: hassio.addon_stdin
  data:
    addon: a0d7b954_ssh
    input: "/config/shell_scripts/stop_addon.sh"

I can not replicate this, can you try it with the current beta?
image
This did stop the addon.

@ludeeus I have just tested on the latest beta (0.108.0b3) and it is now working :) Also tested, stop, start and restart and all calls are working as expected.

@fedebruni84 can you have a test also to see if its working fine for you?

Works on my end as well.
That makes it 3 confirmations now. So let's close this issue.

Was this page helpful?
0 / 5 - 0 ratings