Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Switch command_line SSH to Host

$
0
0

@imaNuS wrote:

Hello everybody,

I would like to ask for help, because I have no ideas where to go and I know that this is the ideal place to solve these problems :slight_smile:

I use hassbian installed in a docker container on an Ubuntu machine and I am trying to create a command_line switch to send a command by ssh to the host machine.

If I run the command from the terminal on the host machine, it works, if I run the command from the docker container (HA) terminal it works … The problem is that I can’t get it to work via the command_line Switch.

switch:
- platform: command_line
  switches:
    record_uvc_sala:
      command_on: "ssh username@192.168.XX.XX 'python /usr/share/hassio/homeassistant/python_scripts/REC.py'"
      command_off: "ssh username@192.168.XX.XX 'python /usr/share/hassio/homeassistant/python_scripts/NOTREC.py'"
      friendly_name: Gravação

And yes, I added the ssh keys to be able to access without entering a password.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>