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

145791025

Comments

  • MikeOneMikeOne Member
    You might have found an issue actually.. I need to investigate this further as it *should* be using the local address. 

    I might contact you over the next few days to provide some more detailed information if you don't mind okay?
  • MikeOneMikeOne Member
    ... And to answer your question, you can' change that just like that (I have considered putting a manual input on the settings page), the code depends on what plex.tv gives back as local address.. 
  • phbphb Member
    @MikeOne  same  here  no  local  ip  adres
  • MikeOneMikeOne Member
    Okay, must be a bug I think. But yours is connecting though @phb right?
  • phbphb Member
    App makes  a  connection  with  the chromecast, button doesn't  play the movie
  • MikeOneMikeOne Member
    That makes sense.. The chromecast probably won't be able to connect with the external IP
  • MikeOneMikeOne Member
    Okay, I will look at this with priority. 
  • question, the ip problem is because the plex server is showing the external ip adres right? if so then i have the same issue. the ip adress shown next to my pms name, is my external ip adress. in fact if you use the ip addres you receive from plex.tv, it will always be an external adress.
  • MikeOneMikeOne Member
    You're right, I see the same. I need to dig a bit deeper. Initially I only had a virtual (internet based) Homey so it needed the external IP to work. I suspect some roque code maybe..
  • MikeOneMikeOne Member
    Okay, I found the issue I think. Looking at the logic though, Chromecast is already using the local IP, so if you have media items indexed, but it doesn't want to cast to chromecast, it is probably something else (video transcoding maybe). However, if you can't see any media either (check with the player flowcart, there is an autocomplete function in there that should show results from you media player while typing) - than the issue I found might be causing trouble.

    Just testing a fix now that forces the local IP for your PMS. If it works I'll publish a new release to the App Store.
  • phbphb Member
    @MikeOne  thx
  • MikeOneMikeOne Member
    Okay, I have made some changes that assures it takes the (first) local IP instead of the remote IP. This is a fairly quick fix for now, the whole settings page needs work to make the selection procedure more flexible (i.e. let the user choose the IP). There might be more local IP's available (one for WiFi and one for wired) - so the user really needs the choice to select the best connection.

    The Github version is up-to-date (1.0.2) - I have submitted the update to the App store but that might take a while to be approved.

    When you install the new version (or when Homey auto-updates it for you), you need to re-pair the server by going through the PIN procedure again:

    On the Plex Setting page in Homey:

    1) Reset settings
    2) Re-pair with Plex.tv
    3) Start Pin Process

    Than it should show the local IP.
  • I just tested the latest GIT version. It now shows my local ip, however after pairing this happens:

    Updating media cache.........
    Unregistering media triggers done
    { [Error: socket hang up] code: 'ECONNRESET' }
    { [Error: socket hang up] code: 'ECONNRESET' }
    { [Error: socket hang up] code: 'ECONNRESET' }
    { [Error: socket hang up] code: 'ECONNRESET' }
    Media Cache Updated
    Registering media triggers done
    Plex ready for commands..

    And after this there is no media available. Also when restarting the app my original issue is appearing again:

    Could not connect to Plex Media Server: Error: socket hang up
    Plex server is NOT available

  • MikeOneMikeOne Member
    I wonder if this is not actually Homey related.. @Emile what could cause these hangups? 

    What are you using as PMS machine? Is it windows?
  • phbphb Member
    @MikeOne  Had a issue  homey telling me  3 Times that  he couldn't  tell  me  the  time or  dat.   After removing  the  plex app  everything  worked  normal  again.
  • MikeOneMikeOne Member
    Those 2 things should be completely unrelated. Unless of course Homey hears something in your voice command that would trigger the Plex App.
  • MikeOneMikeOne Member
    @DennieDeGroot, from another machine on the same network (not the PMS machine) - can you actually open a browser window and go to http://PMS.ip.addr.ess:32400/  (where PMS IP address is the same as the one showing on the settings page) ? You should see a page with some XML on it. If not, you have something on your network or on your PMS machine that prevents connections to that port.
  • DennieDeGrootDennieDeGroot Member
    edited May 2016
    @MikeOne yes it is accessible and generates an XML. Maybe it is easier to communicate via Athom Slack?
  • MikeOneMikeOne Member
    Yes that might be easier. No time for the rest of the day though, I'll ping you this evening hopefully!
  • PandaPanda Member
    edited May 2016
    Homey cannot find my Plex media server, it is on the same network so that shouldn't be an issue. Plex HT and Media server both run on my Mac Mini.

    Did a cli run this was the output.

    However it finds the PHT under devices.

    Plex app doesn't have any setup yet..Visit the settings page on your Homey!PHT Driver init
    players installed 0
    players []
    Chromecast driver init []
    Getting Plex servers
    Getting settings
    Failed to get servers from Plex.tv
    getPin
    Checking for token...
    pinId XXXXXX
    checkPlexPin XXXXXX
    Plex token not found (yet)................
    Checking for token...
    pinId XXXXXX
    checkPlexPin XXXXXXX
    Plex token not found (yet)................
    Checking for token...
    pinId XXXXXX
    checkPlexPin XXXXXX
    Plex token not found (yet)................
    Checking for token...
    pinId XXXXXX
    checkPlexPin XXXXXX
    TOKEN FOUND XXXXXXX
    Found valid plex.tv token XXXXXXXX
    Getting Plex servers
    Getting settings
  • MikeOneMikeOne Member
    The interesting bit is what comes after this @Panda .. Ones it reaches this, you should see the server on the settings screen, hit select and it should index your plex media..
  • MikeOneMikeOne Member
    Okay, for everyone that is seeing socket hangups or ECONNREFUSED errors, make sure that 

    1) Your server is fully accessible from the outside (green checkmark next to remote access in Plex Server settings on plex.tv)
    2) You server does NOT REQUIRE https (plex.tv -> settings -> server -> network) - set it to preferred and not required.

    The only way I can reproduce hangups and connection refused errors is to set these settings incorrectly...
    Also, make sure you follow the installation steps (first post in this thread).
  • @MikeOne disabling the "required secure connections" option did the trick! This is not documented "yet" in first post. Thanks for your quick support and amazing app!
  • MikeOneMikeOne Member
    Ah cool! I really hoped that was (at least part of) the problem!

    I'll update the installation steps to reflect that setting!
  • PandaPanda Member
    @MikeOne  Problem was that plex wasn't reachable from the WAN, didn't know this was a requirement.
  • Panda said:
    @MikeOne  Problem was that plex wasn't reachable from the WAN, didn't know this was a requirement.
    Would it be possible to avoid PMS to be accessible from WAN?
    Most clients / apps accept setting a manual IP address and connect without external access..
  • MikeOneMikeOne Member
    technically, only the players need to be accesible locally for Homey. With Plex remote access enabled, the PMS can also be somewhere on the internet. Although remote access has now been disabled until I get a chance to make the settings page better. If that is done, I can start to think about also enabling shared servers :-)
  • MikeOneMikeOne Member
    @TedTolboom , I guess it is probably technically possible, however, not very easy to do. Plex is pretty picky on what players it allows to connect. It does that by pairing players with PMS's through plex.tv using access tokens. I'm sure it can be done somehow without enabling plex remote access, but it is not going to be easy to code, and the setup procedure would become pretty difficult for the average user.

    I might consider introducing a die-hard mode though at a later stage if there is enough interest for it..
  • posthokposthok Member
    Running plex media server on a synology diskstation the homey plex app is running very well.
  • MikeOneMikeOne Member
    Good to hear!
Sign In or Register to comment.