New Plex Remote

A new and better remote control for Plex
Hi!
I would like to announce a new and better remote control for Plex, simply called Plex Remote.
It feels quite complete, but it would be wonderful to get some feed back from you!

Here comes a small description of the remote and its features:
Most of the remotes on the Android market today is either not working, has a counter intuitive user interface or lacks
functionality. With this in mind this remote was developed while looking at existing remotes and their flaws, to make this one perfect.

The biggest difference is the bounjour auto discovery feature, which removes the need of
manual input of IP addresses. The remote finds the server and client for you.

Another feature which makes this remote different from others is the ability to press and hold buttons
to scroll faster through the menus. It can be quite tiresome to repeatedly press a button 60 times.

To change the volume, just press the volume keys on the side of the phone.
Buttons for On Screen Display (OSD) and context menu also exist.
The back button on the phone has the same behavior as pressing the escape key on the computer.

Here is the link to get the application:
[https://market.android.com/details?id=com.appealingworks.plexremote](https://market.android.com/details?id=com.appealingworks.plexremote)
And the QR-code:

http://micke.stockman.se/images/plex/plexremote_QrCode.png




And here are some screenshots:

http://micke.stockman.se/images/plex/screenshot_remoteview_small.png

http://micke.stockman.se/images/plex/screenshot_autofind_small.png

http://micke.stockman.se/images/plex/screenshot_manual_small.png




For the moment this remote only exist for Android, but it will also be published for windows phone as well.
Unfortunately the bonjour feature will not be available for WP7.

One thing which I could not get to work is the sendKey command, which i was hoping you guys could help me with.
Keyboard is a highly requested feature so it would be nice if I could get it to work.
Here is the problem:
The plex server receives the sendkey command and returns a 200 OK code, but then nothing else happens. However
the escape-key and the delete-key works fine to send, which is used for the back key. Is this a known problem, or should it actually work?
I have tried ascii codes for both upper and lower case letters, in hexadecimal form and normal form.

Another issue is the bonjour feature which does not work on phones like HTC Desire and HTC bravo due to a bug in the phone.

Looking forward to hear from all of you, and what you think!!

Very cool, thanks for writing it, it looks very cool.



In terms of the keyboard, I don’t know the answer offhand, I would recommend you try the iOS app if possible and see what commands it sends. If you don’t have access to one, let me know and I’ll ask around.



As far as Bonjour goes, we’re phasing it out in favor of a simpler replacement called GDM (G’Day Mate).



Here’s some sample code (it supports multicast and broadcast, but we highly recommend using broadcast):



<br />
<br />
#include <stdlib.h><br />
#include <unistd.h><br />
#include <string.h><br />
#include <sys/select.h><br />
#include <sys/time.h><br />
#include <sys/socket.h><br />
#include <netinet/in.h><br />
#include <arpa/inet.h><br />
#include <netdb.h><br />
#include <stdio.h><br />
 <br />
#define RESPONSE_BUFFER_LEN 4096<br />
#define SSDP_MULTICAST      "10.0.0.255"<br />
#define SSDP_PORT           32414<br />
 <br />
int main(int argc, char *argv[])<br />
{<br />
  // Get the host name and address.<br />
  char host[256];<br />
  gethostname(host, 256);<br />
  <br />
  // Try using the multicast address as the destination.<br />
  struct hostent* he = gethostbyname(SSDP_MULTICAST);<br />
  printf("Using group %s and hostname: %s
", SSDP_MULTICAST, host);<br />
  <br />
  // Make a socket.<br />
  int sockfd = socket(AF_INET, SOCK_DGRAM, 0);<br />
<br />
  // If that doesn't work, enable broadcast.<br />
  int broadcast = 1;<br />
  setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof broadcast);<br />
<br />
  // Set up the destination.<br />
  struct sockaddr_in their_addr;<br />
  their_addr.sin_family = AF_INET;<br />
  their_addr.sin_port = htons(SSDP_PORT);<br />
  their_addr.sin_addr = *((struct in_addr *)he->h_addr);<br />
  memset(their_addr.sin_zero, '\0', sizeof their_addr.sin_zero);<br />
<br />
  // Send broadcast packet.<br />
  char data[] = "M-SEARCH * HTTP/1.1

";<br />
  sendto(sockfd, data, strlen(data), 0, (struct sockaddr *)&their_addr, sizeof their_addr);<br />
  <br />
  int n = 0;<br />
  for (;;)<br />
  {<br />
    printf("Waiting 10 seconds for replies.

");<br />
<br />
    // Get response.<br />
    fd_set fds;<br />
    FD_ZERO(&fds);<br />
    FD_SET(sockfd, &fds);<br />
    <br />
    struct timeval timeout;<br />
    timeout.tv_sec =  1;<br />
    timeout.tv_usec = 0;<br />
    <br />
    // Wait for data.<br />
    if (select(sockfd+1, &fds, NULL, NULL, &timeout) > 0)<br />
    {<br />
      char buffer[RESPONSE_BUFFER_LEN];<br />
      unsigned int len = RESPONSE_BUFFER_LEN;<br />
<br />
      if (FD_ISSET(sockfd, &fds))<br />
      {<br />
        // Read packet.<br />
        struct sockaddr_in clientsock;<br />
        unsigned int socklen = sizeof(clientsock);<br />
        len = recvfrom(sockfd, buffer, len, 0, (struct sockaddr* )&clientsock, &socklen);<br />
        buffer[len]='\0';<br />
        <br />
        char* address = inet_ntoa(clientsock.sin_addr);<br />
        printf("====> FROM %s
", address);<br />
        printf(buffer);<br />
      }<br />
    }<br />
    else<br />
    {<br />
      // Timed out.<br />
      exit(0);<br />
    }<br />
  }<br />
}<br />


Thank you very much for the nice answer!

GDM indeed looks nice. The best part is that it supports broadcast, which would eliminate the multicast bug that exist on some HTC phones.

Is there anywhere i can read more about GDM? I have searched quit a lot but could not find much about it.



Now back to the sendKey problem:

Just for clarity, here is how i use the sendKey. 192.168.1.37 is the server, and 192.168.1.7 is the client.


http://192.168.1.37:32400/system/players/192.168.1.7/application/sendKey?code=97



If I go to the search page in the plex client and then send the letter 'a', is that letter supposed to appear in the search field?
If not, then everything is fine and I have just misunderstood the use of sendKey.

One more thing i have not been able to find an answer to is what the difference is between
sendKey and sendVirtualKey.

My server is running on ubuntu 10.10 and the client on windows 7.


GDM is our own invention, and there is no public information about it yet. However, using the sample code above, you should be able to detect servers on the network, which will reply with a message like this:


<br />
HTTP/1.0 200 OK<br />
Content-Type: plex/media-server<br />
Resource-Identifier: 546684a3d18ac5c39037360ec9ce900b7af9cc36<br />
Name: The Office<br />
Port: 32400<br />
Updated-At: 1329722081<br />
Version: 0.9.6-c117627<br />
Content-Length: 2293<br />
<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<PlexMediaServer><br />
<Library><br />
...<br />






Unfortunately, I don't know much about this part of the protocol, which is why I suggested "eavesdropping" an iOS or Android Plex client :)

Yes getting GDM to work was really easy, and the new version (not released yet) successfully finds the servers using GMD and broadcast.

Today there was a new review which makes me a little puzzled.
"Limited manual setup Too focus on making it idiot-proof, forgot about those of us in the geek realm. Not even an option to manually setup a client, only the server."

As i understand it, he wants to manually specify IP address and port number for the client he wants to control. I have not seen this in any other remote and don't really see when it would be useful. Would anyone else want this feature, and why?

Nice app, just tried it and it seems to work best out of all the android plex remote apps.

Hi again!

I have been working on the new version of the remote for quite some time now, and I am happy to say that it is finally released.

The major difference is how the servers are found, which as suggested earlier now is done using GDM.

Using GDM brings two important improvements:

First of all the discovery is much faster than before. The servers are more or less already found when the first

activity becomes visible.

Secondly the bug on some HTC phones which prevented them from receiving multicast messages does not affect the

app anymore.



Other than that any big changes has not been made… just one or two small fixes.



I hope you all will enjoy it!

Here is the link:

https://play.google.com/store/apps/details?id=com.appealingworks.plexremote

Thanks for the new updates

Hi again!



I have been working a while on porting this app to windows phone and

it is more or less finished by now. However I don’t have access to

a windows phone, so if anyone of you have a one and is interested

to try out the remote, check that things work as expected and so on,

you would make me a big favor.



For that I need your live IDs and add you to the beta testers group.

My favorite thing about PLEX are the preset timeline navigation controls. Sadly no remote has them. Why is this? When I’m watching an episode right arrow should move forward 30s, left should back 15s, up should move forward 10 minutes, down backwards 10 minutes. Is there some functionality limitation here? The lack of this feature is the #1 reason I don’t use any soft remotes and prefer to use a IR one instead.

Hello again!

Just want to tell you guys with windows phones that the plex remote is now available on the marketplace.

Not sure how well it works since i have only been able to debug it in the emulator. Hope you will enjoy it!!

oh yes, here’s the link:

http://www.windowsphone.com/en-US/apps/4e6f726b-8455-485d-9200-9a8d07194e5a

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