Announcement

Collapse
No announcement yet.

Plex information

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plex information

    I did some snooping on how plex devices communicate.
    This is purely informational, perhaps someone is interested in creating a PI in the future.
    Given the protocol is completely proprietary, I don't see a way to add it to the MediaController PI.

    User Kideon found this link
    https://forums.plex.tv/index.php/top...documentation/

    Here are my Wireshark traces and some explanation

    Discovery appears to be a broadcast to UDP dest ports 32414 and 32412
    192.168.1.128 255.255.255.255 UDP 65 Source port: 32415 Destination port: 32414
    M-SEARCH * HTTP/1.1
    192.168.1.128 255.255.255.255 UDP 65 Source port: 32413 Destination port: 32412
    M-SEARCH * HTTP/1.1
    192.168.1.117 192.168.1.128 UDP 296 Source port: 59013 Destination port: 32413

    With response
    HELLO * HTTP/1.0
    Name: Roku 3500X
    Port: 8324
    Product: Plex for Roku
    Content-Type: plex/media-player
    Protocol: plex
    Protocol-Version: 1
    Protocol-Capabilities: timeline,playback,navigation
    Version: 2.8.4
    Resource-Identifier: 2L543E046394
    Device-Class: stb

    So now the port is know to be 8324, now TCP GETs and POSTs to dest port 8324. The XPLEX client identifier looks like a UPNP UDN. Note that the Target CLient indentifier needs to be added to the header!
    192.168.1.128 192.168.1.117 TCP 454 64313 > 8324
    GET /player/timeline/subscribe?port=32400&commandID=0 HTTP/1.1
    Host: 192.168.1.117:8324
    Accept-Encoding: gzip, deflate
    X-Plex-Target-Client-Identifier: 2L543E046394
    Accept-Language: en-us
    X-Plex-Device-Name: Dirk's iPhone
    Accept: */*
    Connection: keep-alive
    X-Plex-Client-Identifier: 085DA3BE-8E9F-4B13-954F-560D4E1D0067
    User-Agent: Plex/3.4.2 CFNetwork/672.1.15 Darwin/14.0.0


    Response

    HTTP/1.1 200 OK
    Date: Sun, 27 JUL 2014 16:52:28 GMT
    Server: Plex
    Connection: close
    Content-Length: 0
    Content-Type: text/html
    Accept-Ranges: bytes



    192.168.1.128 192.168.1.117 TCP 66 [TCP Window Update] 32400 > 36996
    POST /:/timeline HTTP/1.1
    User-Agent: Roku/DVP-5.5 (095.05E02025A)
    Host: 192.168.1.128:32400
    Accept: */*
    Accept-Encoding: deflate, gzip
    Content-Type: application/x-www-form-urlencoded
    X-Plex-Platform: Roku
    X-Plex-Version: 2.8.4
    X-Plex-Client-Identifier: 2L543E046394
    X-Plex-Platform-Version: 5.5 build 2025
    X-Plex-Product: Plex for Roku
    X-Plex-Device: Roku 3500X
    X-Plex-Device-Name: Roku 3500X
    X-Plex-Username: dcorsus
    Content-Type: application/xml
    Content-Length: 384



    <MediaContainer location="navigation" commandID="0"><Timeline state="stopped" controllable="stop,stepBack,stepForward,seekTo,playPause" type="video" /><Timeline state="stopped" shuffle="0" controllable="stop,stepBack,stepForward,seekTo,playPause,shu ffle,repeat" repeat="0" type="music" /><Timeline state="stopped" controllable="stop,playPause,shuffle" type="photo" /></MediaContainer>HTTP/1.1 200 OK
    Access-Control-Allow-Origin: *
    Content-Length: 0
    Connection: keep-alive
    Date: Sun, 27 Jul 2014 16:52:29 GMT
    Access-Control-Allow-Methods: OPTIONS,HEAD,GET,POST,DELETE,PUT
    Accept-Ranges: bytes
    Access-Control-Max-Age: 1209600




    Periodic Hellos
    192.168.1.117 192.168.1.128 UDP 296 Source port: 46016 Destination port: 32413
    HELLO * HTTP/1.0
    Name: Roku 3500X
    Port: 8324
    Product: Plex for Roku
    Content-Type: plex/media-player
    Protocol: plex
    Protocol-Version: 1
    Protocol-Capabilities: timeline,playback,navigation
    Version: 2.8.4
    Resource-Identifier: 2L543E046394
    Device-Class: stb

    #2
    Anyone feel like writing something for plex?

    Comment


      #3
      Plex information

      To do what? There is already a plugin in the updater, I've tried it, but Dirk's PI is way better and works just fine with Plex.
      Edit:
      I re-read your posts on the media controller thread, you should be able to do the lights automation. I've had my setup doing this for a while. I only have to leave the room and it pauses, brings the lights up, and puts some music on
      Last edited by Skinnez; August 18, 2014, 01:51 PM.

      Comment


        #4
        There is already a dlna plugin that control my lights when I start a movie while my projectionscreen is on. Plex can be controlled and homeseer can control device with this dlna plugin.

        Comment


          #5
          I'm using dirks plugin on hs3 and running plex on my rokus and htpc it doesn't show up

          Comment


            #6
            What version is on the htpc?

            Comment


              #7
              Whatever the latest version is I just updated it. Roku's too, they update automatically.

              Comment


                #8
                I was meaning windows or linux?
                I have the windows version installed on server 2008 r2 and it streams to my tv fine.
                Might be some network, router or firewall thing blocking it if it's windows, can't say for he linux version as I don't have it.

                Comment


                  #9
                  Oh I meant the client I run it on my htpc and rokus

                  Comment


                    #10
                    Ah control of the Plex client not the Plex server, got ya

                    Comment


                      #11
                      Is there a way to have events if the plex server is playing to a specific client?

                      Comment


                        #12
                        Mmmm I see, not sure. I'm streaming from Plex server to a philips tv. I can select a film to play using the PI and send it to the tv. So it's the dmr that sends play, pause, stop not the Plex server.

                        Comment

                        Working...
                        X