News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - tony

#1
I just wanted to share my remote solution for the Raspberry Pi vomp client without using CEC/HDMI.

As the Raspberry version of vomp also provides the UDP Port 2000 to accept remote commands like the old MVP vomp does, this is quite an elegant solution if you need to contol your device via network and cannot or do not want to use CEC.

In my scenario I already used openremote.org with the corresponding client apps on iOS to control all my Audio/Video. As openremote can directly send UDP commands, you don't need anything else, you can directly control vomp with openremote.

So all you need to do is to create your needed commands, then define these by connecting to your RasPi's IP address via UDP on Port 2000 and send the corresponding Code.
To get the full List of codes, the best resource is the source code's remote.h on git.vomp.tv:
http://git.vomp.tv/gitweb/?p=vompclient-marten.git;a=blob;f=remote.h
As an example, if you want to simulate a Direction Up key, this is simply code 20 to send via UDP. The digits are as they are, 0 = 0, 1 = 1, etc...

You can also use the approach from Yaris, this is quite cool to do a first test or a quick and dirty solution when connected via SSH to your raspi: http://www.russle.net/vomp/misc/remoteMVP

I used some PHP code in the past - if this is put on an internal web server, you can even control your MVP via HTTP (there's no GUI, but with the approach you could easily create your own web based layout that launches the needed commends, be it for your mobile device or any other browser). with the approaches, I think it would also be quite easy to write some python based code which can directly run on the raspi to create a simple REST API remote. Here the PHP code:

<?php
/***************
 * PHP VDR vomp Remote Control
 *
 * remote control idea from shell remote control from Yaris, HondaNSX@Gmx.de:
 * http://www.russle.net/vomp/misc/remoteMVP
 *
 */

// change to your VOMPs IP/Hostname:
$fp fsockopen("udp://192.168.0.101"2000$errno$errstr);
if (!
$fp) {
echo "ERROR: $errno - $errstr<br />\n";
} else {
echo "Socket opened...";
switch($_GET[cmd]) {
    case "0"$cmd "0"; break;
    case "1"$cmd "1"; break;
    case "2"$cmd "2"; break;
    case "3"$cmd "3"; break;
    case "4"$cmd "4"; break;
    case "5"$cmd "5"; break;
    case "6"$cmd "6"; break;
    case "7"$cmd "7"; break;
    case "8"$cmd "8"; break;
    case "9"$cmd "9"; break;
    case "0"$cmd "0"; break;

    case "Up"$cmd "20"; break;
    case "Down"$cmd "21"; break;
    case "Left"$cmd "22"; break;
    case "Right"$cmd "23"; break;
    case "OK"$cmd "37"; break;
    case "Guide"$cmd "27"; break;
    case "Go"$cmd "59"; break;
    case "Back"$cmd "31"; break;
    case "Menu"$cmd "15"; break;
    case "ChUp"$cmd "32"; break;
    case "ChDown"$cmd "33"; break;
    case "Rec"$cmd "13"; break;
    case "Stop"$cmd "54"; break;
    case "Rewind"$cmd "50"; break;
    case "Forward"$cmd "52"; break;
    case "Play"$cmd "53"; break;
    case "Replay"$cmd "36"; break;
    case "Skip"$cmd "30"; break;
    case "Pause"$cmd "48"; break;
    case "Red"$cmd "11"; break;
    case "Green"$cmd "46"; break;
    case "Yellow"$cmd "56"; break;
    case "Blue"$cmd "41"; break;
    case "Power"$cmd "61"; break;

    default:
            echo "no command...";
            break;
}

fwrite($fp$cmd);
echo "Command ".$_GET[cmd]." sent as $cmd";

fclose($fp);
}
?>



you can then simply call this script via a link like e.g. http://yourserver/vompremote.php?cmd=Pause