Thanks Phil, much appreciated that got the shell command showing in my services. I triggered it and no error on screen but got a return code 127 NoneType: None in the logs. Any idea what that is about? Comes up as an Error running command. Not sure if I need to full path the path to shutdown.sh or not. I have a scripts folder at the same level as my shell_commands folder but maybe that’s not what that error is saying.
Edit: Full path didn’t help. Tried /usr/share/hassio/homeassistant/scripts/shutdown.sh and no joy
Nope, same deal. Not sure if /config is a valid path for my instance but maybe it’s virtual. Oddly if I put in a totally bogus path I still get the same thing so at that point it’s not even running the script. I did /config/scriptss/shutdown.sh with two s in scripts.
Also if I run the script manually on the Linux box as the homeassistant user it reboots the PC.
For hassio I’m led to understand that /config is the path to the folder that contains configuration.yaml. So if shutdown.sh is in a subdirectory of that named scripts, then it should be like I said, /config/scripts/shutdown.sh. Why would you make it scriptss???
Because I am testing. So if the “right” path is giving an error, what would the wrong path give? No one say’s it’s a path issue may be something in the shell script. So by making sure the path is wrong and the error is the same, shows it’s not my code. Or not yet since it doesn’t even look like it’s getting to it.
SSH was the answer. Took some work to figure out but had to generate some certs and the like.
That said, I am finding there are certain circumstances where WOL will work and others where I need to run a script to turn something back on. Like if it’s a virtual it’s not listening so need to trigger it by script. I would like one nice interface though that is for all computers. Some would be turned on by WOL, others by scripts. i assume I would probably either need to abandon the WOL platform or split things up where the direct computers use WOL and the virtuals maybe do something where I have to ping them to see if they are on and if you flip a switch SSH into my Windows machine running VMware workstation and run a batch to turn on the selected virtual?
SSH = Secure SHell Protocal. I believe regardless if the server has a password, the application(ssh) requires authentication. HA also runs in a container separate from ssh so the key is needed for HA to run a command in another container.