You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if anyone could point me in the right direction here. I have 4 devices that I'm using pssh to connect to an run the same python script. This script is used to run object detection on cameras connected to each device. What I need is to print the data from the cameras to the terminal of the host PC (this data is updated every frame from the cameras as the tracking is meant to happen in real-time). If possible I would like to be able to see the live video from each camera on the host PC (similar to the -Y argument when sshing to a device). I've been trying to follow the docs on this.
If anyone could point me in the right direction that would be great.
Code:
from pssh.clients import ParallelSSHClient
from pssh.exceptions import Timeout
hosts = ['xx', 'xx', 'xx', 'xx'] #IPs for devices to connect to
client = ParallelSSHClient(hosts, user='xx', password='xx') #Connect and log into each device
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm wondering if anyone could point me in the right direction here. I have 4 devices that I'm using pssh to connect to an run the same python script. This script is used to run object detection on cameras connected to each device. What I need is to print the data from the cameras to the terminal of the host PC (this data is updated every frame from the cameras as the tracking is meant to happen in real-time). If possible I would like to be able to see the live video from each camera on the host PC (similar to the -Y argument when sshing to a device). I've been trying to follow the docs on this.
If anyone could point me in the right direction that would be great.
Code:
from pssh.clients import ParallelSSHClient
from pssh.exceptions import Timeout
hosts = ['xx', 'xx', 'xx', 'xx'] #IPs for devices to connect to
client = ParallelSSHClient(hosts, user='xx', password='xx') #Connect and log into each device
cmd = 'python PiSmartHangar/YoloTestCode.py'
output = client.run_command(cmd, use_pty=True, read_timeout=10)
stdout = []
for host_out in output:
try:
for line in host_out.stdout:
stdout.append(line)
print(stdout)
except Timeout:
pass
for host_out in output:
host_out.client.close_channel(host_out.channel)
client.join(output)
rest_of_stdout = list(output[0].stdout)
Thanks,
Luke
Beta Was this translation helpful? Give feedback.
All reactions