Send Remote-Commands via Terminal

Hello, 

 

is it possible to send the commands to RasPlex via Terminal?

 

For example:

My phone is ringing, the pi starts the file pause.sh:

#!/bin/bash

send?command KEY_PAUSE

Or to control RasPlex from the Computer via ssh, or make my own Remote with NetIO, ...

 

Hope someone can help me.

 

Thanks, Simon

You could but thats not a valid bash script:

 

root@RasPlex:~# send?command KEY_PAUSE

-bash: send?command: command not found

 

Here is a post on a script that would work: http://superuser.com/questions/585398/bash-sending-simulated-keystrokes

 

You need to mount your flash drive to read/write in order to save the script.  You should use a RSA key for your SSH authentication to avoid the remote client from needing a password.

Thanks for your Answer.

Of course, send?command is not a valid command, it`s only to show what i`m searching for.

So i have to install "xdotool" on a flash drive? That sounds really not easy... i don`t know how i can do that. 

And then it is only possible to send keyboard-inputs? Not the commands from lirc? (KEY_PAUSE, KEY_PLAY, KEY_UP, ...)

Does someone know a way to use the lirc commands?

Thanks for your Answer.

Of course, send?command is not a valid command, it`s only to show what i`m searching for.

So i have to install "xdotool" on a flash drive? That sounds really not easy... i don`t know how i can do that.
And then it is only possible to send keyboard-inputs? Not the commands from lirc? (KEY_PAUSE, KEY_PLAY, KEY_UP, ...)

Does someone know a way to use the lirc commands?

Why aren't you using CEC and your TV remote. You seem to be over complicating pressing a pause button on a remote?

Why aren't you using CEC and your TV remote. You seem to be over complicating pressing a pause button on a remote?

I agree with you on this, but I believe he wants to make it fully automated.

So whenever he gets an incoming call to his phone it would automatically send a 'pause' command to RasPlex, without any human intervention. (Or maybe trigger it by the act of accepting the call, but still sending the command automatically.)

However, this kind of automation carries several risks with it, such as confusing RasPlex by sending spurious 'pause' commands when no playback is in progress (and other scenarios for other commands).

As for the command transfer methods discussed, if someone really wants to do this it should be better to use the 'http remote' approach, just as other remote control apps do, except that it would be done under control by scripts on the phone.

Perhaps 'Tasker' could be useful for this kind of thing, since it specializes in event-triggered script execution.

Best regards: dlanor

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.