Hi !
I’m trying for few days to launch a python command on a remote raspberry pi.
It keeps not working.
This is my both configuration I tried
shell_command:
matrix_led_demo: ssh -o StrictHostKeyChecking=no [email protected] 'python3 /home/pi/luma.led_matrix/examples/matrix_demo.py'
and
switch:
- platform: command_line
switches:
matrix_led:
command_on: ssh -o StrictHostKeyChecking=no [email protected] 'python3 /home/pi/luma.led_matrix/examples/matrix_demo.py'
I tried many explanation found in different topics, but it keeps failing
I am attempting to run a shell command to raise/lower the volume on my HTPC.
shell_command:
volume_up: ssh [email protected] pactl – set-sink-volume 0 +5%
The command works as expect when executed from the terminal, but does not when used as a script in home assistant.
I’m assuming it has something to to with being logged in as root while in the terminal, but the web interface using a different user.
I’m not sure of the user name, or how I can log in as that user in the terminal to add t…
Do you have any idea ?
Thanks !
Andy
(excuse my english, I’m french).
nickrout
(Nick Rout)
October 31, 2020, 9:18pm
2
Does the command work on the remote pi?
Yes it does!
It also does remotely from the shell of HA
nickrout
(Nick Rout)
November 1, 2020, 12:09am
4
Anything in the HA log, or the receiving pi ssh log?
Did you copy the public SSH keys to the remote machine?
Sorry guys,
It took me a long time to answer the question : I did have a lot of work because of the pandemic
Meanwhile, the pi crashed out and I have to reinstall it.
So, I’ll be back to you when it’s time.
Thank you by the way for your answers.
Andy