{"action":"closed","issue":{"url":"https://api.github.com/repos/hassio-addons/addon-ssh/issues/43","repository_url":"https://api.github.com/repos/hassio-addons/addon-ssh","labels_url":"https://api.github.com/repos/hassio-addons/addon-ssh/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/hassio-addons/addon-ssh/issues/43/comments","events_url":"https://api.github.com/repos/hassio-addons/addon-ssh/issues/43/events","html_url":"https://github.com/hassio-addons/addon-ssh/issues/43","id":381805725,"node_id":"MDU6SXNzdWUzODE4MDU3MjU=","number":43,"title":"Feature Request: add possibility to call scripts from within home assistant automations and scripts","user":{"login":"quarcko","id":31532153,"node_id":"MDQ6VXNlcjMxNTMyMTUz","avatar_url":"https://avatars3.githubusercontent.com/u/31532153?v=4","gravatar_id":"","url":"https://api.github.com/users/quarcko","html_url":"https://github.com/quarcko","followers_url":"https://api.github.com/users/quarcko/followers","following_url":"https://api.github.com/users/quarcko/following{/other_user}","gists_url":"https://api.github.com/users/quarcko/gists{/gist_id}","starred_url":"https://api.github.com/users/quarcko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quarcko/subscriptions","organizations_url":"https://api.github.com/users/quarcko/orgs","repos_url":"https://api.github.com/users/quarcko/repos","events_url":"https://api.github.com/users/quarcko/events{/privacy}","received_events_url":"https://api.github.com/users/quarcko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-17T00:25:42Z","updated_at":"2018-11-19T22:53:56Z","closed_at":"2018-11-19T22:53:55Z","author_association":"NONE","body":"# Problem/Motivation\r\nI am running home assistant in default hass.io environment.\r\nGenerally i'm happy with this docker-container setup for the most part.\r\nBut recently i hit a brick wall with such simple things that needs to be done...\r\n\r\nThing 1)\r\nI have and UPS, and i can monitor it's state.\r\nI can make an automation that triggers when UPS battery goes down to (lets say) 10%.\r\nAfter hitting this i want to issue a command 'hassio host shutdown';\r\ni can do it via SSH addon... but i cannot do it inside a automation....\r\n\r\nThing 2)\r\nMy whole setup runs on 4G router. Some times (once a week or so)\r\nMy 4G just breaks and i need to restart the router, so...\r\ni can add a 'ping' sensor to home assistant, to ping some known host.\r\ni can add an automation that checks if ping was OK...\r\nbut i cannot issue a command like:\r\n'ssh root@router.local 'reboot''; (but i can do it via SSH plugin itself...)\r\n\r\n> (Why the issue was filed)\r\nJust thinking for expanding functionality, as these features seem\r\nso obvious and useful to anybody, who\r\n1) want to protect their setup from data corruption on power outage\r\n2) want to restart their router without \"calling wife to go and power-cycle router, damn we are talking about a AUTOMATIC home system........\"\r\n\r\n## Expected behavior\r\nThese things to work...\r\n> (What you expected to happen)\r\n\r\n## Actual behavior\r\n\r\n> (What actually happened)\r\n\r\n## Steps to reproduce\r\n\r\n> (How can someone else make/see it happen)\r\n\r\n## Proposed changes\r\nMaybe there is possibility to create a home assitant component\r\nthat can interact with SSH addon?\r\nFor example:\r\n\r\n1) create some scripts in predefined directory of SSH container (that's already possible)\r\n2) have a component that can be configured via 'configuration.yaml':\r\nssh_component:\r\n  command1:\r\n  - path: /config/restart_router.sh\r\n  command2:\r\n  - path: /config/shutdown_hassio.sh\r\n\r\nand then just use service: ssh_component.command1 in automation!!! :)\r\n\r\n> (If you have a proposed change, workaround or fix,\r\n> describe the rationale behind it)\r\n\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/66283432-feature-request-add-possibility-to-call-scripts-from-within-home-assistant-automations-and-scripts?utm_campaign=plugin&utm_content=tracker%2F70731444&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F70731444&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}
{"actor":{"display_login":"frenck"}}