This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Homey Plex application - main discussion thread

191012141525

Comments

  • I'm not pulling ports out if thin air :-)

    Can you paste the entire node for me? If you prefer, you can also PM me with it?
  • edited June 2016
    <MediaContainer friendlyName="myPlex" identifier="com.plexapp.plugins.myplex" machineIdentifier="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" size="1">
    <Server name="micro2" address="aa.bbb.ccc.ddd" port="21458" version="0.9.16.6.1993-5089475" scheme="http" host="aa.bbb.ccc.ddd"localAddresses="192.168.1.xxx" machineIdentifier="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" createdAt="1408231287" updatedAt="1464726623" owned="1"synced="0"/>
    </MediaContainer>
  • Okay thanks, that is perfect. Now what happens (exactly) when you open:

    1) http://192.168.1.xxx:21458 (your local IP) compared to:
    2) http://77.250.127.13:21458
    3) http://192.168.1.xxx:32400

    Please provide exact responses to all three scenarios

  • edited June 2016
    MikeOne said:
    Okay thanks, that is perfect. Now what happens (exactly) when you open:

    1) http://192.168.1.xxx:21458 ;(your local IP) compared to:
    2) http://aa.bbb.ccc.ddd:21458
    3) http://192.168.1.xxx:32400

    Please provide exact responses to all three scenarios

    1) connection refused  (ERR_CONNECTION_REFUSED)
    2) 401 Unauthorized (but with /web i get plex login)
    3) same as 2



  • Bingo! 

    Thanks Plex. Not. This is a plex issue, I just don't encounter it with my setup.

    You have been a great help so far, thanks very much!

    Are you okay with checking one more thing in a few minutes?
  • MikeOne said:
    Bingo! 

    Thanks Plex. Not. This is a plex issue, I just don't encounter it with my setup.

    You have been a great help so far, thanks very much!

    Are you okay with checking one more thing in a few minutes?
    Sure, but i am trying stuff out myself. I manually changed the port to the same port as internally.
    But i guess i have to reregister.
  • edited June 2016
    @MikeOne ;

    Updating media cache.........
    Unregistering media triggers done
    Getting settings
    Found xx On Deck items
    Adding ondeck items to cache.......Found xx media items of type: episode
    Adding episode to cache.......Found xx Recent items
    Adding recent items to cache.......Found xxx media items of type: movie
    Adding movie to cache.......Media Cache Updated
    Registering media triggers done
    Plex ready for commands..
  • edited June 2016
    @MikeOne So manually setting the port and add a PAT/NAT on the router fixed it.
    But that is not the way you want it to work. The port internally is 32400 by default right? 

    So if you set 32400 as default and a setting to override that.. 

  • Okay, looking at the answers of your 3 tests, I'm actually seeing something unexpected (and also something that explain the weird port I think)

    1) localip:21458 - connection refused. This is what I was fearing I guess. Plex.tv only provides the port for the external (77) address, but not the port for the local IP. This sucks slightly, but I think I know a way around this.
    2) 401 is expected here
    3) a 401 here is NOT expected. I can, from my local network access this URL without a login or anything. However, this might not be an issue as the Homey Plex app (if it uses that IP/port, which right now it doesn't for you) also sends an auth header with token.

    The issue is (it seems) that plex returns (with the /pms/servers.xml URL) just the port for the external connection (scenario 2), however, it seems in your setup, the external port is different than the internal port (default: 32400). 
    If, in remote access in plex, you would actually change your remote port to 32400 ("Manually specify public port"), if not already the case, and re-pair with plex.tv, you might actually have a work-around.

    But before you try that, please try this:

    with a loggedin plex.tv session visit https://plex.tv/devices.xml

    This is a larger xml, but it should also contain your server (provides="server"). If so, the <Device> node for your server, also contains child nodes named <Connection>. Mine looks like this:

    <Connection uri="http://77.163.33.192:32400"/>
    <Connection uri="http://192.168.2.12:32400"/>
    <Connection uri="http://192.168.2.33:32400"/>

    What does yours look like (all connection children please).
  • @MikeOne ;

    Updating media cache.........
    Unregistering media triggers done
    Getting settings
    Found xx On Deck items
    Adding ondeck items to cache.......Found xx media items of type: episode
    Adding episode to cache.......Found xx Recent items
    Adding recent items to cache.......Found xxx media items of type: movie
    Adding movie to cache.......Media Cache Updated
    Registering media triggers done
    Plex ready for commands..
    Whey hey, you hardcoded the port? Or what did you do?
  • MikeOne said:
    @MikeOne ;

    Updating media cache.........
    Unregistering media triggers done
    Getting settings
    Found xx On Deck items
    Adding ondeck items to cache.......Found xx media items of type: episode
    Adding episode to cache.......Found xx Recent items
    Adding recent items to cache.......Found xxx media items of type: movie
    Adding movie to cache.......Media Cache Updated
    Registering media triggers done
    Plex ready for commands..
    Whey hey, you hardcoded the port? Or what did you do?
    I set the external port to 32400 in PMS and repaired 
  • edited June 2016
    So yes I manually entered the external port number in the PMS server settings and opened the port on my router and forwarded the port to my pms
  • Okay - that was exactly the work-around I suggested indeed. So it seems to be working for you now right? 

    I'd still need to come up with a solid fix for non-default ports, so if you could please run the test I provided three posts up I would be grateful!
  • Oh wait... you changed the custom port :-) Never mind, I can test it myself!
  • MikeOne said:
    Oh wait... you changed the custom port :-) Never mind, I can test it myself!
    I can help test. The media items are back next step is to get the movies playing on my chromecast. That was not working (just a progress bar and then nothing). 

    But I guess you have to add a setting to manually adjust the local port PMS is listening on when  it is not the default 32400.

    Anyway let me know if you want me to test something. Right now it is good night. 
  • Great, thanks for your help so far man, really helped!
  • But I guess you have to add a setting to manually adjust the local port PMS is listening on when  it is not the default 32400.
    I think I can fix it so it will still do it automatically (but picking up the correct one). 

    But the bottom line is - plex.tv only returns the external port on the call I'm currently using. So that screws things up as if you have setup a custom port, it will use that on the local IP as well. I'd still like to be able to support external access as well so I will code up something that picks up the correct port from a different XML endpoint.
  • MikeOne said:
    But I guess you have to add a setting to manually adjust the local port PMS is listening on when  it is not the default 32400.
    I think I can fix it so it will still do it automatically (but picking up the correct one). 

    But the bottom line is - plex.tv only returns the external port on the call I'm currently using. So that screws things up as if you have setup a custom port, it will use that on the local IP as well. I'd still like to be able to support external access as well so I will code up something that picks up the correct port from a different XML endpoint.
    See pm. result of the devices.xml (well the pms part of the result)
  • Yep, thanks!

    I will need to parse that one I guess..
  • MikeOne said:
    Okay, looking at the answers of your 3 tests, I'm actually seeing something unexpected (and also something that explain the weird port I think)

    1) localip:21458 - connection refused. This is what I was fearing I guess. Plex.tv only provides the port for the external (77) address, but not the port for the local IP. This sucks slightly, but I think I know a way around this.
    2) 401 is expected here
    3) a 401 here is NOT expected. I can, from my local network access this URL without a login or anything. However, this might not be an issue as the Homey Plex app (if it uses that IP/port, which right now it doesn't for you) also sends an auth header with token.



    Regarding 3, i enforce authentication on my local network. So it is logical that there is a 401 on my local adress. I do not want my daughter to watch a horror movie by accident (then i will not get any sleep)
  • Makes sense. The fact it is finding media now means that the Homey plex app can access the URL.
  • @MikeOne ;
    Just to let you know, my chromecast 2 is working great now also.
  • Yeah cool! Thanks for letting me know.
  • Hi All,

    Just received my Homey! WooHoo, so far loving it, had issues with the voice and all but all good now but for some reason I can establish the connection during the PIN process but the PMS server is not showing up!.

    I am running Plex Server on QNAP NAS but it's saying "you need to register plex media server first go to settings page", just wondering what am i doing wrong? and if anyone else had this issue?

    Thanks in Advance,

    Regards,

    from DownUnder!
  • Hey @Brinny_NZ ; Hmm.. Is your PMS server actually loggedIn with your plex account and are remote connections allowed in your PMS settings?
  • The app still crashes after some time for me on the latest firmware :(
  • I'll have to take this up with @Emile as this sounds like an internal Homey issue. Are you on .36?
  • Yup!
  • MarkSwiftMarkSwift Member
    edited June 2016
    @MikeOne I have the app installed, and it correctly seems to find my media and player (Rasplex). The issue is it doesn't seem to trigger on either Plex started playing, or Plex stopped playing? Watching the debug when starting / stopping a movie, nothing seems to show in the log?

    I'd still like to be able to trigger on Player start / stop also, so I can use it to trigger my lights and blinds in a certain room, is this possible?
  • phbphb Member
    @MikeOne here  app  installed  correctly ,but  homey  says  no apps  found? 



Sign In or Register to comment.