Hi, this service is no more : hassio.addon_stdin
How can i do it as an easy workaround? i cant do it from a shellcommand, since the tool “docker” is not present in the HA container, it only works in the SSH container
I need the command below:
docker exec -it addon_some_addon bash -c 'python3 mycommand.py
It fires a script present in another add-on
service: hassio.addon_stdin
data:
addon: a0d7b954_ssh
input: "docker exec -it addon_some_addon bash -c 'python3 mycommand.py'"
petro
(Petro)
March 7, 2022, 5:20pm
2
I’m running next months dev build, still exists. Was it an announced deprecation?
Hi, seems the service still exist, but not possible anymore for the ssh addon?
## What’s changed
👋 Hi there! Time for a big update, **v10.0.0**
⚠️ Please read this carefully, as this release comes with a bunch of breaking changes.
The add-on has upgraded to Alpine 3.15, which means all tools are now running the latest versions.
The `homeassistant_cli` has been removed. This (third-party) CLI has some upstream updates, which broke add-on compatibility.
It, therefore, has now been removed. One can still install it using the `command_init` option if wanted, however, is no longer part of the default distribution.
The Have I Been Pwned checks have been removed from the add-on, as this is a built-in feature of the Supervisor nowadays. This means the `i_like_to_be_pwned` option has been removed from the add-on configuration. If you have this option set, you will need to remove this from your add-on options.
Lastly, the `addon.stdin` service has been removed. And I want to explain a little about the reasoning behind it.
The `addon.stdin` service allowed to run commands on this add-on, which could be helpful. However, I got contacted about this service as it has the potential to be used as an attack surface in combination with social engineering. Quite a lot of social engineering, as this is not a one-click accept kinda attack. It requires a lot of steps.
For this matter, me (@frenck) and the reporting person didn't agree on the type of issue this imposes. A CVE has been requested at MITRE by the reporter, however, I do not recognize it and do not agree on the vulnerability. For that reason, this person and the CVE are also not listed in these release notes.
The service has not been removed because I think it is a vulnerability (as a matter of fact, I don't agree it is), but the service is removed as I think we should protect users, even against possible complex social engineering; if this helps, I think we should do that.
This file has been truncated. show original
1 Like
petro
(Petro)
March 7, 2022, 5:46pm
4
it has the replacement service in that blurb.
Yes, but not sure how I can do that
petro
(Petro)
March 7, 2022, 5:58pm
6
are you just trying to run a python file? If yes, do it through shell command
huh? i’m overlooking it?
no, i need to run a python file thats inside an custom addon , so i cant do it from a shellcommand
actually this command:
"docker exec -it addon_some_addon bash -c 'python3 mycommand.py'"
but only works from ssh addon, not from a shellcommand, since there is no “docker” command in the homeassistant container
petro
(Petro)
March 7, 2022, 6:04pm
8
What does the python file do? Why is it only in the container?
it opens a door , using an SDK , that runs a service, needs to be in another addon, since needs to be build on debian
we are trying to make it better offcourse , but for now we need to run a seperate python file
petro
(Petro)
March 7, 2022, 6:07pm
11
I’m not sure if there will be a replacement then. If there is a way, I cannot help as it’s outside my abilities to help.
petro
(Petro)
March 7, 2022, 6:08pm
12
Personally, I’d try to make it run in a way where you can connect to it via a websocket through a custom integration.
no problem, thnx as always!
Hi there, did you managed to find a solution? I’m kind of stuck with the same issue…
Yes, but using my own custom addon , not the ssh one
And will it be possible for you to please share your solution?
its a custom written python code, not sure what you want todo ?
i just use
import sys
for line in sys.stdin:
do what you want …
ok thank you, I get the idea
Fido
(Fido)
March 24, 2023, 3:25pm
19
Hello,
please can you help me. I used mentioned calling for copy files from folder /backup. If I try my script file in SSH terminal everything works perfectly. When I use sell_command in my Automation it can not see folder /backup, because script do everything in destination folder, but it can not find files in /backup. Do you have any idea how can I allow read this folder for automation or how to call SSH terminal from automation?
Thank you for your responses.