New user here
Loaded Hassio yesterday onto a RPI3(b) and installed openssh addon.
I would like to shutdown the PI via an SSH command but a lot of the hassio commands appear not to work
Using Putty Plink on a windows 10 machine
plink -pw XXXXX [email protected] hassio sn new
hassio ho shutdown or hassio ha check all produce the following error
Error decoding json invalid character â:â after top-level value: 401: Unauthorized
If I ssh in and issue the commands in the CLI they work
BTW. From the ssh server page it has a Note
âThis add-on will not enable you to install packages or do anything as root. This is not allowed with Hass.ioâ
Is this the cause ?
The reason I need to shutdown the PI is that we get 20-30 thunder storms a year where the PIâs (I have 4 of them NAS/Media playersâŚetc) have to be shutdown quickly.
Iâve already had to rebuild the sd card as it got corrupted as the PSU got unplugged (2 hours work lost )
I have an Android app with buttons that send various ssh commands to the PIâs and they shutdown. This is great so that my wife can shut all the PIâs down easily.
Searched all the ssh shutdown messages and it appears you should be able to do it but Iâm not
I have the same problem. All commands (i.e. hassio ha restart) work if I first ssh in.
The only remote commands that appear to work are hassio global options (i.e. hassio help). All others return Error decoding json invalid character â:â after top-level value: 401: Unauthorized
Anyone find or have a solution to this problem?
No replies - I think its because HASSIO is enclosed in a Docker.
Iâve seen somewhere you can login to the actual OS (Resio ?)
I may have to go to hassbien or rasbian+hass or (rasbian+docker+hassio) ?? if I cant find a solution
For the moment the problem is lower on my to do list - Trying to get Sonoffs talking to my MQTT correctly at the moment
If I ssh and type halt, connection to my RPi is lost immediately and Iâm no longer able to reconnect (Connection refused), BUT the RPi still running and I can access HAâs GUI. Actually, it halts the SSH server as it shows Stopped in Add-on details and I can start it to get ssh access back. Definitely not a shutdown alternative.
Speaking about /sbin/restart, in my case I have HA run on RPi3 and issuing restart in ssh results in`
core-ssh:~# restart -bash: restart: command not found
Under hass.io I think the ssh runs under it own docker so if I ssh into hass.io and issue a halt or poweroff command it only shuts down the ssh (part/docker/demon)? and not the whole PI.
After login via Putty (root), in the ssh cmd window you type âhassio helpâ and the help shows commands âhost, ho reboot, shutdownâ
so âhassio host shutdownâ causes the PI to shutdown.
Now try the same via plink (used all sorts for flags) I still get the json error
So still unable to do a remote shutdown.
Dashboard shown Iâm up to date with the ssh add-on, running HA 0.82.1
This problem is new. I know I used to be able to âhassio homeassistant stop hassio host shutdownâ. Not anymore
As for updating the (dashboard) add-on. I followed the suggestions displayed by the old shh/terminal addon to replace it with the new community add-on SSH and Terminal but I cant get it running at all. Each time I start it I get FATAL: The configured certfile is not found
No idea what this file is and where it should be located.