If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[REL] MythTV plug-in

13468920

Comments

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @djwhyte, tgourley:

    No, unfortunately the new Android client didn't fix the playback issue for me either - I also tried doing a fresh sync of a show that hadn't been synced before (to make sure there wasn't any garbage left over from the previous version), but no luck.

    @sammyjayuk

    Re deleted recordings: thanks for the help - I haven't upgraded MythTV to 0.27 (which I believe introduced this new behaviour?), so I haven't gotten around to this.

    Re. multiple audio streams: do you have a pointer to how I can get hold of the "proper" HLS streams? I've been looking around a bit, but I can't figure out how to go from the metadata provided by the services API to HLS streams.

  • annikajayukannikajayuk Posts: 8Members
    schaumburg wrote on May 2 2014, 5:47 AM: »

    Re. multiple audio streams: do you have a pointer to how I can get hold of the "proper" HLS streams? I've been looking around a bit, but I can't figure out how to go from the metadata provided by the services API to HLS streams.


    It looks like you call /Content/AddRecordingLiveStream with ChanId and StartTime, which starts the transcode and returns LiveStreamInfo, inside which is, amongst other things, RelativeURL which points to the HLS playlist. Looking at the API, though, it doesn't seem like the current HLS API is the best thing to be using here—it doesn't manage the deletion of streams and transcoded files itself, it expects the client to be able to call /Content/StopLiveStream and /Content/RemoveLiveStream. A Plex channel isn't going to know when to do that.

    Sam
  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @sammyjayuk

    I have made the change you suggested (for ignoring deleted files on MythTV 0.27) - thanks for the hint!

    As I haven't upgraded to 0.27 yet, I haven't been able to test is effectiveness - so I won't tag it as a release until someone with 0.27 has verified it from the master branch in github (https://github.com/tschaumburg/MythRecordings.bundle).

    If anyone with 0.27 gets around to testing it, let me know the results!

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @sammyjayuk

    I have also introduced the change you suggested for GetFile/GetRecording. I have tested locally, and it seems to work.

    However, as I only have a single backend I can only test if the channel uses the correct GetFile/GetRecording call - not if it works as expected in a multi-backend environment.

    So again, I'l going to have to rely on you (or others out there?) to test it before I release it.

    Let me know

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    Update regarding in-progress recordings:

    Now the channel detects in-progress recordings, and marks them in the user interface (pretty much in-your-face: a "STILL RECORDING" is added to the recording title)

    It also sets the duration of in-progress recordings based on the scheduled end, not the actual end (which is now). This should allow you to do "time-shift playback", i.e. start watching a recording 5 minutes after it started, rather than waiting until the recording is complete.

    Unfortunately, the MythTV backend doesn't seem to play nice - it stops the playback after 5 minutes (in the scenario above).

    I've checked this into the Master branch in github (at least the "STILL RECORDING" mark is set on a recording, which is useful).

    And maybe someone can figure out a way to make MythTV play back an in-progress recording without cutting it short?

  • cofulesecofulese Posts: 3Members, Plex Pass Plex Pass
    edited May 2014

    Hi

    Thanks for the info about Deleted. I added the same for LiveTV too.

    I added the below after both instances of 'for recording in recordings:'

                    if recording.find('Recording/RecGroup').text == 'Deleted':

                            continue

                    if recording.find('Recording/RecGroup').text == 'LiveTV':

                            continue

    Works well for me (single 0.27 backend)

    Cheers!

  • annikajayukannikajayuk Posts: 8Members
    It appears that Plex expects originally_available_at to be in local time, but MythTV, since 0.26, uses UTC. These changes work for me:

    Top of __init__.py:
    from dateutil import tz
    inside def Recording(recording):
    	tzUtc = tz.tzutc()
    	tzLocal = tz.tzlocal()
    
    	shouldStart = datetime.datetime.strptime(programStart,"%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=tzUtc)
    	didStart = datetime.datetime.strptime(recordingStart,"%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=tzUtc)
    	shouldEnd = datetime.datetime.strptime(programEnd,"%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=tzUtc)
    	didEnd = datetime.datetime.strptime(recordingEnd,"%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=tzUtc)

    And replace
    		originally_available_at = airdate,
    in return VideoClipObject() at the bottom of Recording(recording) with
    		originally_available_at = airdate.astimezone(tzLocal),
    Sorry for these snippets, but I've made several other changes that are specific to my modified copy of the Roku client. I hope you can make sense of them :)

    Sam
  • sixysixy Posts: 1Members, Plex Pass Plex Pass
    edited May 2014

    I seem to be having an issue connecting to the Services API from Plex. My Plex server is on a different machine, and it appears that my Services API only responds to 127.0.0.1 from my MythTV box.

    I'm testing using this URL:

    http://127.0.0.1:6544/Myth/SendMessage?Message=Hello

    If I use the actual IP (192.168.1.103) from that box, or any other machine in my network, it refuses the connection. Does anyone know how to enable it to listen to other addresses?

    (Running Mythbuntu 12.04, MythTV v0.26)

    Thanks!

    EDIT:

    Nevermind, I figured it out!
     
    If anyone else runs into this, I had the backend IP set to 127.0.0.1. 
     
    Enter the IP address of this (backend) machine. Use an externally accessible address if you are going to be running a frontend or Slave Backend on a different machine than this one. (ie, not 127.0.0.1)
  • annikajayukannikajayuk Posts: 8Members
    edited May 2014
    If anyone's interested, I've put my changes to the channel on GitHub. If you're on a Roku, it requires my fork of the Roku channel, which is linked to on GitHub.

    Sam
  • wasperswaspers Posts: 6Members

    Has anyone gotten this working on newer (current) samsung smart tvs?

    I installed the plugin and it works via web browser and android phone, so it appears to be functioning correctly. On my tv I see the channel and can browse to the recording but when I play one I just get a continuous loading circle animation. 

    thanks!

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @waspers

    No, I haven't tried the Samsung client (my Samsung TV is too old & feeble to manage without a Roku:-).

    But while we wait for someone who has, I'll try with a few pointers. If I understand you correctly, you can browse the channel OK - the problem doesn't appear until you actually press the "play" button.

    If that's correct, I suspect the wait may simply be the Plex server transcoding the recording into something the Samsung client likes - if your server is an older machine (or a NAS) that may take ages, given the wrong combination of source and target formats,

    Maybe you could have a look at the server log files (https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files), and post anything interesting you find?

    :-) thomas

  • wasperswaspers Posts: 6Members
    schaumburg wrote on May 19 2014, 5:39 AM: »

    @waspers

    No, I haven't tried the Samsung client (my Samsung TV is too old & feeble to manage without a Roku:-).

    But while we wait for someone who has, I'll try with a few pointers. If I understand you correctly, you can browse the channel OK - the problem doesn't appear until you actually press the "play" button.

    If that's correct, I suspect the wait may simply be the Plex server transcoding the recording into something the Samsung client likes - if your server is an older machine (or a NAS) that may take ages, given the wrong combination of source and target formats,

    Maybe you could have a look at the server log files (https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files), and post anything interesting you find?

    :-) thomas

    Thanks! I'll take a look sometime soon. The backend is quite powerful and should be able to handle it rather rapidly. 

  • wasperswaspers Posts: 6Members
    schaumburg wrote on May 19 2014, 5:39 AM: »

    @waspers

    No, I haven't tried the Samsung client (my Samsung TV is too old & feeble to manage without a Roku:-).

    But while we wait for someone who has, I'll try with a few pointers. If I understand you correctly, you can browse the channel OK - the problem doesn't appear until you actually press the "play" button.

    If that's correct, I suspect the wait may simply be the Plex server transcoding the recording into something the Samsung client likes - if your server is an older machine (or a NAS) that may take ages, given the wrong combination of source and target formats,

    Maybe you could have a look at the server log files (https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files), and post anything interesting you find?

    :-) thomas

    Back again!

    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG -  * filterKeyName => Title
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG -  * filterKeyValue => All in the Family
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG -  * sortKeyName => StartTime
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG -  * X-Plex-Container-Start => 0
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG -  * X-Plex-Container-Size => 1
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG -  * X-Plex-Token => xxxxxxxxxxxxxxxxxxxx
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG - Came in with a super-token, authorization succeeded.
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG - Plug-in dk.schaumburg-it.plexapp.mythrecordings has been used 79 times.
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG - [dk.schaumburg-it.plexapp.mythrecordings] Sending command over HTTP (GET): /video/mythrecordings/GetRecordingList?filterKeyName=Title&filterKeyValue=All+in+the+Family&sortKeyName=StartTime
    May 20, 2014 21:10:19 [0x7ff3fa7fc700] DEBUG - [dk.schaumburg-it.plexapp.mythrecordings] HTTP reply status 304, with 0 bytes of content.
     
     
    looks like plex is telling the tv to connect to 127......
    I've configured in the channel the ip of 192.168.1.3, where it should be getting the data from, so I don't know why its trying the localhost ip...
  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass
    edited May 2014

    OK, I'm not yet sure what's going on here, but here's a little background and some thoughts that might help:

    IP addresses 

    There are 3 distinct IP addresses involved in a Plex/Mythrecordings setup: the Plex client (in this case your Samsung TV), the Plex server and the MythTV backend:

    Client (Samsung TV)  <---->  Plex server (PMS)  <---->  MythTV backend

     (IP 192.168.1.?)            (IP 192.168.1.?)          (IP 192.168.1.3)

    In the mythrecordings channel setup, you specify how the Plex server should contact the MythTV backend. The client discovers the Plex server through Bonjour magic (I believe).

    The fact that your Samsung client can successfully browse your recordings, just not play them back (that's correctly understood, right?) proves that the three entities above are connected correctly, and are on speaking terms.

    The log:

    Now to the log excerpt above (from the Plex server log, I'm assuming): it shows that some client is accessing the Plex server on IP 127.0.0.1:59736 - which doesn't make sense in a number of ways:

    First of all, the client seems to be talking to the server on port 59736, where the usual (in my default setup, at least) is port 32400.

    Secondly, the client (successfully!) connects to the Plex server using the local loopback address of 127.0.0.1 - which seems to indicate that the Plex server and the Samsung client runs on the same machine. Überweird.

    Did you do a non-standard Plex server install (a non-standard port number would explain the 59736)? Did you at some point run a client - eg. the Web client - locally on the machine running the Plex server (which would explain the 127.0.0.1 in the log entries)?

    I hope this helps a little...

    Th

  • schaumburg01schaumburg01 Posts: 136Members, Plex Pass Plex Pass

    @sammyjayuk

    Your Roku client screenshots look great!

    What are the chances that we'll see the Roku client updates in an official Roku client release?

    I know I could install from sources, but I'd like at least some of my setup to remain unhacked - my home is approaching Wallace & Gromit levels as it is.

    :-)

  • wasperswaspers Posts: 6Members
    schaumburg wrote on May 21 2014, 7:18 AM: »

    OK, I'm not yet sure what's going on here, but here's a little background and some thoughts that might help:

    IP addresses 

    There are 3 distinct IP addresses involved in a Plex/Mythrecordings setup: the Plex client (in this case your Samsung TV), the Plex server and the MythTV backend:

    Client (Samsung TV)  <---->  Plex server (PMS)  <---->  MythTV backend

     (IP 192.168.1.?)            (IP 192.168.1.?)          (IP 192.168.1.3)

    In the mythrecordings channel setup, you specify how the Plex server should contact the MythTV backend. The client discovers the Plex server through Bonjour magic (I believe).

    The fact that your Samsung client can successfully browse your recordings, just not play them back (that's correctly understood, right?) proves that the three entities above are connected correctly, and are on speaking terms.

    The log:

    Now to the log excerpt above (from the Plex server log, I'm assuming): it shows that some client is accessing the Plex server on IP 127.0.0.1:59736 - which doesn't make sense in a number of ways:

    First of all, the client seems to be talking to the server on port 59736, where the usual (in my default setup, at least) is port 32400.

    Secondly, the client (successfully!) connects to the Plex server using the local loopback address of 127.0.0.1 - which seems to indicate that the Plex server and the Samsung client runs on the same machine. Überweird.

    Did you do a non-standard Plex server install (a non-standard port number would explain the 59736)? Did you at some point run a client - eg. the Web client - locally on the machine running the Plex server (which would explain the 127.0.0.1 in the log entries)?

    I hope this helps a little...

    Th

    STandard plex install. PMS is installed on the mythbuntu box. (both, 192.168.1.3). I was tailing the PMS log and only captured what happened when I hit play. Not even the foggiest idea where its pulling 127 from. I've correctly configured the channel ip to be ...1.3 and it works fine via Android local and away. I'll fix the port, not sure why it wasn't on 32400 and do some additional testing.

  • annikajayukannikajayuk Posts: 8Members
    waspers wrote on May 21 2014, 8:18 PM: »

    STandard plex install. PMS is installed on the mythbuntu box. (both, 192.168.1.3). I was tailing the PMS log and only captured what happened when I hit play. Not even the foggiest idea where its pulling 127 from. I've correctly configured the channel ip to be ...1.3 and it works fine via Android local and away. I'll fix the port, not sure why it wasn't on 32400 and do some additional testing.


    It doesn't really help much, sorry, but I think the “DEBUG - HTTP requesting to: http://127.0.0.1” lines may be red herrings (i.e. misleading and irrelevant)—I've looked at my logs here, and I get them during normal operation.

    Sam
  • annikajayukannikajayuk Posts: 8Members
    schaumburg wrote on May 21 2014, 7:27 AM: »

    @sammyjayuk
     
    Your Roku client screenshots look great!
     
    What are the chances that we'll see the Roku client updates in an official Roku client release?

    Thanks!

    Well, I'm not sure how interested the Plex devs are in moving the state of their plugin system forward—the documentation is… incomplete, as is the implementation. That's one thing. The other is how interested they are in moving the Roku channel forward.

    There seems to be very little scope for Plex plugins to change their view on the Roku. I tried everything I could think of before realising that I was going to have to modify the Roku channel. The way it's coded made it very easy for me to add Roku screen types specifically for the MythRecordings plugin, but that's obviously not something that could be done for all Plex plugins—going forward Plex would need to implement a way for the plugin to request that kind of view (you couldn't just make all plugins display in a grid because, amongst other things, a top level PrefsObject breaks the Roku channel) but my gut feeling is that the Plex devs just aren't interested.
     
    schaumburg wrote on May 21 2014, 7:27 AM: »

    I know I could install from sources, but I'd like at least some of my setup to remain unhacked - my home is approaching Wallace & Gromit levels as it is.
     
    :-)

    Ha! I think I know how you feel—you scratch one itch, then another, and another, then before you know it you've turned into your grandfather and your better half is telling you that “it worked perfectly well before” and asking “why can't you just leave it alone?”. Or perhaps that's just me…

    Sam
  • sip03dssip03ds Posts: 12Members, Plex Pass Plex Pass
    edited May 2014

    schaumburg

    Congradulations - great plugin - great work

    @waspers

    Hi, I have tried the plugin with the following confiugration:

    1) PMS & Mytv Backend (0.27) running on Fedora 20 - same system

    2) Samsung UE8000 wiht plex app

    3) iPad mini with plex app (wireless)

    4) iMAC using plex app 

    5) Windows 7 using IE (wireless)

    • I have configured MythTV's backend to accept remote connections (private IP of the LAN and not localhost)
    • I have configured MySQL/MariaDB to accept remote connections for mythtv user to allow remote connections

    The plugin works without any problems.

    +1 vote for Live TV (I have not checked the MythTV API)

  • sip03dssip03ds Posts: 12Members, Plex Pass Plex Pass

    Hi again,

    schaumburg

    Just checked the latest Mythtv 0.27, the latest API,

    under content service, the following APIs are offered:

    - GetLiveStreamList

    - AddLiveStream

    - AddRecordingLiveStream

    Is there a chance using these services in order to implement streaming Live TV?

13468920
Sign In or Register to comment.