Plex binding for OH3 | Will it be ported?

I got it all working now! Thank you to all that have helped me.

1 Like

You can either do one of 2 things. You can manually get your token(then then you don’t need a username and password), or you can enter your username and password and the binding will fetch the token for you. (or of course you can enter all 3 for fun if you want).

Once that is done you’ll get a bridge device that is Online and you can go from there.

So it seems to be all working now, except for the scanning.
I manually added all my players and they all came online after a few hours

I did had to clear all my cache, as I was getting ‘handler disposed’ errors.

Thanks again @bhomeyer for the binding, good stuff.

Yea, the players will only come online once they are seen playing something. They will show “unknown” until plex shows they are doing something. I’m guessing maybe I should change that and assume since the bridge is up they would be working though not quite sure there.

I’m surprised that the scanning doesn’t work for you, though I have a feeling it would if it was done while one of the players was actively playing something.

I know, I am not sure why either. I am thinking it maybe has to do with my docker being on a LAN and all my players connecting through wifi, but I can’t check as I don’t have wifi on my server. Not that I know that much about networking to make this an funded assumption lol.
That being said, are there any log files I can send you that might help you out?

I’m going to setup a second plex server in a docker here and play a bit. You got it working so that’s the main goal, but I’d like to work perfectly in everyone’s environments if possible. Thanks for the heads up on the docker. I know that most docker installs have a lan setup for them, so I’m thinking that Plex is grabbing that IP as it’s own and thinking that the players are not actually local when they are.

I was going to allow all to be scanned, but I feared that some people may have a bunch of remote users that will also show up, so that would have been a bit annoying.

No, absolutely
it’s working perfectly. Just going to play a bit with the progress value and end time to see if I can get a nice progress bar out.

Anyway, let me know if I can test something, I am more than happy to help you in any way I can.

1 Like

Hello @bhomeyer

I’ve discovered a few minor issues with Cover art channel (thumb). I’m not sure, but I think someone already mentioned those before.

The first issue is URL of cover image - it doesn’t contain http/https at the beginning, but it starts with ://. Here’s the example of string item value I get when Plex Player is playing something:

://192.168.0.1:32400/library/metadata/12105/thumb/1611613805?X-Plex-Token\u003d

Also, as you can see in the example above, it doesn’t include token, so it always returns " 400 Bad Request". I was using token in Plex binding settings, but switched to using username and password, since token (for some reason) changes pretty often.

The other thing, that someone already mentioned, is Cover art for TV Shows. The URL that Plex binding returns is URL of one frame of the episode playing (it is displayed in Plex when you’re browsing one season). My opinion is (and it would be good to hear from others too) that it would be better to display Season’s or TV Show’s poster. Season’s poster URL is contained within XML property “parentThumb”, while TV Show’s poster is contained within XML property “grandparentThumb”. As far as I’m aware, movies don’t have parent and/or grandparent values at all.

Anyway, these are my observations.

Thank you for the great binding.

Best regards,
Davor

Yes, I have already raised this in my earlier post; let’s see what happens when @bhomeyer comes back from holiday :slight_smile:

Hello!

I was pretty sure someone already mentioned this, but I was too lazy to look for it :slight_smile:

I have one more strange behaviour regarding token. Even if I set token instead of username and password, that part of URL looks like

?X-Plex-Token\u003xxxxx

instead of

?X-Plex-Token=xxxxx

For some reason, in my case = gets replaced by \u003 (I guess it’s some unicode character replacement).

Best regards,
Davor

Yea, I think that has something to do with the changes that plex made a couple weeks ago. Jumped a few plex servers here in various networking environments and I’ll be testing through things a bit more this coming week. I’ll be updating early this next week that should cover a bunch of these issues.

Thanks for the reports, appreciate it!

What do people do in regards to automation specifically with Plex?

I turn lights on/off with start and pause events, sometimes announce “Enjoy your movie”, I have a few rules that turn the TV’s off and such, but only if they aren’t playing a movie, blinds will close on their own if a movie is started, ambient light in the room is above a threshold, etc
 Probably more that I am not remembering, but all sorts of stuff.

1 Like

Just a quick update to fix the Image Urls : Release OH3 PLEX Binding · bigbasec/openhab-addons · GitHub

I will be adding in the parent/grandparent images, have a bigger “release” that’ll be out this next week, then I’ll finally submit for a PR on this. I wouldn’t expect this to get added to the distribution anytime soon, the devs are all pretty busy but I will keep this updated on the side as things move forward.

1 Like

Hooray! Thanks, @bhomeyer , that’s fixed the display issue (see screenshot below) and the image is now displaying on Habpanel! So just waiting for your next release that shows the Series image instead of the horrible auto-generated episode image, and maybe the series name as well as the episode name in the title? Keep up the great work :slight_smile:

Those 2 items should be fixed here : Release OH3 PLEX Binding · bigbasec/openhab-addons · GitHub

2 Likes

Thank you so much! This works and gives exactly what I need to finally migrate from OH2. As you can see by the screenshot, all is good, and I’ve updated to the latest QNAP Plex version and it is working fine.

@Hendrik_Nielsen The binding now displays the Series name as well as the Episode name.
@davorf The binding now displays the Series poster instead of the episode screen-grab

@bhomeyer Thank you for your hard work :slight_smile:

Wasn’t that hard, but glad it’s all working for you! Just noticed that I used a “:” between the series title and the title name where the original used a “-”, I’ll update that in the next release.

1 Like

@bhomeyer

Any chance you might help with my bridge going offline as soon as plex is queried (for more details see post I’m responding to)? If you need more info just let me know and I’ll provide whatever necessary.

2021-02-22 19:14:18.882 [WARN ] [x.internal.handler.PlexServerHandler] - An exception occurred while polling the PLEX Server: 'null'

What does the debug log look like?