I’ve searched the forum and still not quite finding what I want so I’ll put the question to the experts
I’m running this -> Ambient TV lights
It works rather well by the way The problem I have is this:
I run them through home assistant to turn on the TV and lights [ambient light system] but I do not want to just push the button and cold turn it off as it runs off a raspberry pi and I don’t want to just turn it off I’d like to have the pi shut down first then turn off the lights.
The question I have is how can I send the ssh command to an ip address login with user ‘pi’ and password 'raspberry ’ then send this command ‘sudo shutdown -h now’?
Any help would be really appreciated, Thank you all!!
Yes, Google "passwordless ssh", then pick your preferred web site to explain
how it is done.
Essentially, you will need to log into your HA box, generate a pair of keys
(ssh-keygen) and copy the HA public (.pub) key to your destination box. Neither
box (HA nor destination) will need a reboot.
No passwords are involved.
It is actually fairly simple, despite carrying an aura of geeky trickiness.