Using iRule to control Rasplex via IP

Hi all,

I’ve set up a Rasplex and it is working just fine. I am able to control it via my Android Plex app no problem, however I would like to use my normal Home Theater remote to control Rasplex. I use iRule currently. I searched the forums, but I haven’t found a clear answer, or if there is one, I missed it. At any rate, is there built in IP control functionality in Raplex and if so where can I find documentation on it. I can always fall back to IR control using the MSL IR Board if I have to, but I would much rather run IP control if possible.

Thanks,

Rasplex does not have IP control, sorry.

Regards

@NedtheNerd said:
Rasplex does not have IP control, sorry.

Regards

Ned,

Thanks for the answer, I had read some information that eluded to that, but then I also had seen folks talking about using XBMC JSON controls that seemed to work, but no real documentation of what works and doesn’t. Looks like I’ll be buying the MSL IR Board.

Thanks

Done some research, apparently it may work, have a look at this https://irule.desk.com/customer/portal/questions/1045397-xbmc-http-control

Rasplex uses OpenELEC and PHT (Kodi/XBMC), a lot of the core code is Frodo, but has a fair amount converted to Isengard for certain functions.

Let us know if you get anywhere with this.

Regards

Ned,

I was actually just noticed the other night that the settings of Rasplex do have “Enable HTTP Control” in them, so I was thinking there might be some way. I’ll do some digging and if I get it to work will post up with how.

Thanks again,

So I got this to work, using the link that Ned sent and then the work over at http://errorfreeit.com.au/blog/2014/1/4/free-online-rasplex-remote I was able to figure everything out and have my iRule control Rasplex from inside the iRule remote.

You can also control Rasplex from a standard web browser by enabling HTTP control and then putting in commands like

http://x1.x1.x1.x1:32400/system/players/x2.x2.x2.x2/navigation/moveUp

x1.x1.x1.x1 is the IP address of the Plex Media Server your Rasplex is attached to and x2.x2.x2.x2 is the IP address of your Rasplex.

You can find a list of commands by going to the Github for the free online remote I linked above. The Github address is https://github.com/Error-freeIT/Simple-RasPlex-Remote/blob/master/remote.html

Finally in iRule I had to set up a new http gateway using port 32400 that pointed to my plex media server then I created a new device using the “system/players/x2.x2.x2.x2/navigation/moveUp” portion of the http controls.

At any rate, it works and works amazing. If anyone has questions let me know.

Thanks

Thanks for the feedback.

Regards

I’ve seen this example and tried to make it work. However for me it doesnt work. Update both my server and rasplex to the most recent version, without succes.

The exact thing i paste in Chrome is:
http://192.168.178.20:32400/system/players/192.168.178.28/navigation/moveDown

I would love some help to get this working :slight_smile: Thanks in advance!

@wouterverduin said:
I’ve seen this example and tried to make it work. However for me it doesnt work. Update both my server and rasplex to the most recent version, without succes.

The exact thing i paste in Chrome is:
http://192.168.178.20:32400/system/players/192.168.178.28/navigation/moveDown

I would love some help to get this working :slight_smile: Thanks in advance!

Did you remember to enable HTTP control in preferences?

Regards

Jup, even double checked it :slight_smile:

@wouterverduin said:
Jup, even double checked it :slight_smile:

I’ve noticed http control stopped as well, both in iRule and in the online remote app. I’m troubleshooting it now to see if I can figure out what changed and what needs adjusted to work again. I’ll let you know if i find anything.

Hopefully you can find some clue to get it working! Would love to have this working through a webpage.

Keep me posted mate :slight_smile: If there is anything i can assist with, let me know! :slight_smile:

@wouterverduin said:
Hopefully you can find some clue to get it working! Would love to have this working through a webpage.

Keep me posted mate :slight_smile: If there is anything i can assist with, let me know! :slight_smile:

So, I had a RemotePi board laying around and after not being able to get http control working, I installed it. The good news is it works great out of the box with Rapslex. The even better news is that I got HTTP control working again. The only thing I can think of, is my IP of my Plex Server recently changed and I forgot to update it. Also when I re-configured my new Plex Server, I didn’t have the port mapped to always use 32400 like I did with my previous set up. My new PMS is set to use random ports outside of my network. So, if you are trying to control something from outside of the network your plex media server is on, you might have to change the :32400 to what your PMS is using outside of your network. You can find that by opening your PMS, then go to server, then settings, make sure advanced is on, then look at remote access. If you don’t have “manually specify public port” checked or you don’t have it set to 32400 then you have to change that part of the command to match your port number.

I’m inside of my network that my PMS is on, so the port didn’t mess me up, but the IP change did. Make sure the IP’s of both the Plex Server and Rasplex are correct, make sure that HTTP control is turned on in RasPlex and then try the online remote. If you can get that working then you should be able to get it to work using the HTTP commands.

@dbs179 Sounds great. Awesome that you got it working again! I was trying to figure out if i can get it on the road for me aswell; however it didnt work… Below is what i tried and the results it gave me. Any suggestions on how to proceed to get it fixed. I noticed my plex server isnt on the most recent version but doubt that will be causing the problem, will upgrade later on just to make sure.

This is what i noticed:

http://192.168.178.20:32400/system/players/192.168.178.28/navigation/MoveUp shows no error
http://192.168.178.20:32400/system/players/192.168.178.28/navigation/moveup Shows error with some xml

http://x.x.x.x:23073/system/players/192.168.178.28/navigation/MoveUp with using my public IP logically grants me this error: “401 Unauthorized”.

http://192.168.178.20:23073/system/players/192.168.178.28/navigation/moveup (same port; local IP shows website not available.

So somehow it reacts to the signals i am sending, something gives me the feeling the rasplex isnt receiving/handling the requests.

Anyone with good suggestions? :slight_smile:

@dbs179 Unfortunately no succes after updating and restarting both…

Would love some clues :smiley:

@wouterverduin have you tried the free online remote located here

http://errorfreeit.com.au/blog/2014/1/4/free-online-rasplex-remote

Also, are you sure the IP’s are correct, can you ping them from a Command Prompt? I know that is very basic stuff, but since IP’s were what caught me out, figured I would ask.

@dbs179 Thanks for the reply! :slight_smile:

Yeah the IP’s are correct for sure. This is confirmed even more because if i mix up an IP or gate number it provides me with an error. However when i seemingly got it right, the webpage in my browser (or the applet on the link you provided) stays blank or doesnt give any results.

Anyone with tips/suggestions? :slight_smile: Would be really welcome since i love to get this working :slight_smile: When i got it figured i am going to create a PHP/html page to control rasplex which i can share for the people who are interested :slight_smile:

I am figuring, since i checked the settings of rasplex/PMS several times that maybe the problem is in my routers/network configuration. Anyone got any clue what should be turned on/off to pass through the signal or get this working?
Are there any additional ports that need to be allowed forwarded on the PMS server side i am missing/not aware about since i run a firewall on my server computer which runs PMS?

@wouterverduin Nothing I can think of network wise should need to be configured. From looking at your IP’s you’ve listed I would guess you are on a single router or integrated router/modem, if that is the case, nothing should need to be set up to communicate between devices on the same network.

As for the software firewall on your PMS Computer, if your computer running PMS is windows you can check the Windows Firewall and ensure that PMS isn’t being blocked at all. I’m running my PMS on UnRaid in a Docker, so I can’t give you screenshot, but it should list several columns next to the name of the application. You want to be sure that Action is Allow, and Local Address is set to “Any”. That should allow any local IP to communicate with your PMS. If you are on Windows and PM me a screenshot of your PMS rules I can take a look at it for you.

Another thing to check is if you can control your Rasplex using the Plex App on a smartphone? If that isn’t working it might point you to an issue with your installation of Rasplex. Since it is fairly easy to reconfigure, maybe try to totally format the SD card and set up Rasplex from scratch?

Sorry I don’t have more or better input… :frowning:

@dbs179 Thanks for your reply once again :wink:

There are multiple routers on the network that are connected to my modem. Server is running through a different router than my rasplex. Luckily if i connect to the app using the ‘chromecast’ icon the remote control works leading me to believe that indeed the rasplex settings are in order.

At the current time i am running ubuntu on my server as operating system. Took a look at unraid which looks pretty interesting as a server OS system. Docker is of course a safer method to run applications. Will take a further look if it is something that fits my needs:)
Your suggestion however leads me to believe that maybe the ubuntu firewall (ufw) is causing problems. Is there detailed information which ports plex uses besides the ones mentioned for ‘remote acces’ since i forward as less ports as possible :slight_smile:

Edit: Curiousity usually kills my work productivity :wink: Went to google and found this: support.plex.tv/hc/en-us/articles/201543147-What-network-ports-do-I-need-to-allow-through-my-firewall- Will attempt it this weekend with some more port forwarding/disableing ufw alltogether to check if this is the root of my problems :slight_smile: Will keep you guys updated!

@wouterverduin said:
@dbs179 Thanks for your reply once again :wink:

There are multiple routers on the network that are connected to my modem. Server is running through a different router than my rasplex. Luckily if i connect to the app using the ‘chromecast’ icon the remote control works leading me to believe that indeed the rasplex settings are in order.

At the current time i am running ubuntu on my server as operating system. Took a look at unraid which looks pretty interesting as a server OS system. Docker is of course a safer method to run applications. Will take a further look if it is something that fits my needs:)
Your suggestion however leads me to believe that maybe the ubuntu firewall (ufw) is causing problems. Is there detailed information which ports plex uses besides the ones mentioned for ‘remote acces’ since i forward as less ports as possible :slight_smile:

Edit: Curiousity usually kills my work productivity :wink: Went to google and found this: support.plex.tv/hc/en-us/articles/201543147-What-network-ports-do-I-need-to-allow-through-my-firewall- Will attempt it this weekend with some more port forwarding/disableing ufw alltogether to check if this is the root of my problems :slight_smile: Will keep you guys updated!

Great find. I would bet it is something in the UFW that is blocking it. Just as an FYI, I did some testing on my setup to give you an idea of what it looks like when it works. I’m telnet-ing from a Windows PC to my UnRaid PMS Docker for the first set of results then to my Rasplex on a Pi-2b. You might want to also try testing from your Ubuntu machine to your Rasplex. Hope this helps and you get it sorted out.

UnRaid - PMS
Port 32400 - Connection Success
Port 1900 - Failed
Port 3005 - Failed
Port 5353 - Failed
Port 8324 - Failed
Port 32410 - Failed
Port 32412 - Failed
Port 32413 - Failed
Port 32414 - Failed
Port 32469 - Failed

Rasplex
Port 32400 - Failed
Port 1900 - Failed
Port 3005 - Connection Success
Port 5353 - Failed
Port 8324 - Failed
Port 32410 - Failed
Port 32412 - Failed
Port 32413 - Failed
Port 32414 - Failed
Port 32469 - Failed