Plex MythTV LiveTV Channel/Plugin

Never mind… I have it working locally. I guess I have to fix my firewall rules

FYI: I added basic support for mythtv channel groups.

To have given channel group in list, You need to provide this channel group numeric ID in plugin config.

To determine channel group ID, best is look in mythtv DB into table ‘channelgroupnames’.

Alternative method (without usig DB access) is just adding list of all known IDs and see in displayed groups which group ID has desired channel set…

In next steep I’ll add support to declare Channel Groups by name.

Happy watching!

FYI: I added by name mythtv channels group support.
Now You can simply declare in plugin config mythtv channels groups as comma separated list of names used in mythtv config.

Hi,

I’m having some problem with your plugin and I would like to understand what’s wrong, so i’ll try to give you all the needed information,

I’m using mythv v 0.29 on a ubuntu box and the lastest version of plex server installed on another ubuntu box, mythtv is configured to accept connection from all frontends

HDhomerun is working as expcted since using it with the hdhomeviewer plugin i can watch live tv in plex
mythtv seems to work fine since i’m recording stuff with him

Your plugin seem to be finely installed since it gets from the mythtv the channel list with the running show

Strangely, on the mythtv server I can’t find any log related to the stream.php file, i think i’m searching for this /var/log/plex-livetv-feeder.log

So what I got is this:

Logs attached

What do you need to help me out with this?

@aegrimisu

Pls look on description how to test plex-livetv-proxy.php
You can find description i.e. on plugin git readme (main page on project git).
In case of any issues with proxy script - pls provide me /var/log/plex-livetv-proxy.log

@“warpme@o2.pl” said:
@aegrimisu

Pls look on description how to test plex-livetv-proxy.php
You can find description i.e. on plugin git readme (main page on project git).
In case of any issues with proxy script - pls provide me /var/log/plex-livetv-proxy.log

Thanks for the help,

it seems that I have been using an older version of the plugin that I have found here, on the forum.

So I have isntalled the latest version from git but new problem rised up. Firstly the plugin on the plex server side is not responding. With the older version of the plugin at least this part worked. Please find the logs attached.

The second problem, usign curl the stream is downloaded and playing it with Media player or VLC works, but playing the live stream diretly with VLC looks like in the lower screenshot, just like the codec is not correct or the stream is corrupt. (Anyway if the test.mpg plays well i think i’m fine.

Anyway, on the mythtv box where the php and the msg stuff were installed in /var/www/html no log is generated. So no /var/log/plex-livetv-proxy.log file and I don’t know why is that.

Hi,
In v3.0 (current) just added capability for support multiple tuners pools where every pool is offering given TV channel subset. Now tuner selection intelligence is comparable with native mythtv frontend I think. This enhancement also makes Ignore Source List ID obsolete (so it was removed from code and settings).

Happy Watching

I have updated to the latest version but i’m having the same issue.

@aegrimisu said:
I have updated to the latest version but i’m having the same issue.

Well - without logs from plugin and proxy php script I can’t help You…

@“warpme@o2.pl” said:

@aegrimisu said:
I have updated to the latest version but i’m having the same issue.

Well - without logs from plugin and proxy php script I can’t help You…

Hi again,

I have allready done that, please check the my upper post. The only thing is that using the plugin I can’t get to the page of the channels cause as soon as I click on All chanles i get that the plugin is not responding. Regarding the php log I’m still not sure that the log is created when i use VLC or wget to test it. Please read my upper post, I have all explained with screenshots/logs and let me know if you need anything else.

Thanks

@aegrimisu said:

I have allready done that, please check the my upper post.

Thanks
Then may You pls explain me where is log from proxy script?

I> @“warpme@o2.pl” said:

@aegrimisu said:

I have allready done that, please check the my upper post.

Thanks
Then may You pls explain me where is log from proxy script?

Dear warpme,

In my post was mentioned that the proxy log is not generated in /var/logs , since the plugin has an issue can you confirm that the log should be generated even whent testing the stream with vlc/curl? If it should get generated do you think it might be do a permission issue, what user should write the log, www-data (ubuntu) or the mythtv user?



aegrimisu,

I see test.mpg plays - so proxy script works I think.
Lack of log probably is because of access rights. Script is executed with the same rights like http server. I think You may see it looking on list of running processes…

Anyway looking on plugin log I see:

2018-02-16 22:37:44,360 (7fcad2ffd700) :  DEBUG (networking:166) - Requesting 'http://172.16.36.158:6544/Guide/GetProgramGuide?StartTime=2018-02-16T20:37:41&EndTime=2018-02-16T20:38:41&Details=true'
2018-02-16 22:37:45,021 (7fcad2ffd700) :  CRITICAL (runtime:889) - Exception (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-482972920/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
    result = f(**d)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythLive.bundle/Contents/Code/__init__.py", line 242, in AllChannelsSection
    sourcetitle="";
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-482972920/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'ChannelGroups'

plugin fails after receiving guide data from mythtv.
what version of MythTV are You using?

plugin I’m developing is for MythTV master.
I not tested it under v29 - it may not work with this version.
With 0.28 it will not work.

Hi,

Ok, modified the php to write the log to /tmp and figured out that the proxy php is using the www-data to write logs and /var/logs is restricted to write logs for the www-data user, the standard apache logs on my ubuntu box are written in the /var/log/apache2 folder with the root user.

back to my problem. Attached the proxy log.

I’m using v 0.29 of mythtv

You are right, I have allready checked the log and saw that this error. " KeyError: ‘ChannelGroups’ " but i didn’t know what this means. Anyway, do you have some limitations in your plugin, maybe some timeout somewhere? My epg data is customly made from a sitename cinemagia.ro with an app called webgrabplus that converts the data found on webpages into xmltv files. This file inludes epg data for 11 days for around 120 channels. The xmltv file size is around 10MB. The epg containt romania, hungarian, czech character but the xmltv file is stored it UTF-8 and i don’t believe it fails because of it.

Just for your information the old mythplex plugin that can be downloaded on the first page was working so it is something with your plugin that is differently using thing, I don’t say your’s wrong, I say it is diffenrent.

What would you want me to do? shall I start by deleting the epg data and keep only for 2 days or do you have a different approach?

Ok - looking on proxy script log - all looks OK. Your issue is myth version. You have v29 while I wrote and tested LiveTV plugin on current mythtv master. Is it possible to upgrade Your backend to current master?

@“warpme@o2.pl” said:
Ok - looking on proxy script log - all looks OK. Your issue is myth version. You have v29 while I wrote and tested LiveTV plugin on current mythtv master. Is it possible to upgrade Your backend to current master?

I could do that, still i’m not sure what do you mean by master version, could you point me to that version and i’ll update and report back tu you.

I’m referring to major version of MythTV. Current stable is v29. Previous version was 0.28. Saying master I’ referring to current development version which is referred as “master”. When it will be released it become v30 - but now it is under development and it is commonly referred as “master”. I’m not using ubuntu so can’t advise You what package You need to install to get current master. Probably google is Your friend here.

BTW: development version is usually quickly changing with having sometimes some instabilities - but usually they are quickly resolved. For me is pretty stable and I’m using it in home ‘production’ network.

@aegrimisu said:

@“warpme@o2.pl” said:
Ok - looking on proxy script log - all looks OK. Your issue is myth version. You have v29 while I wrote and tested LiveTV plugin on current mythtv master. Is it possible to upgrade Your backend to current master?

I could do that, still i’m not sure what do you mean by master version, could you point me to that version and i’ll update and report back tu you.

Judging by the information on MythTV Official Wiki , Current Stable Release: 29.0 on 01-February-2017. So I think i’m using the latest stable release.

@“warpme@o2.pl” said:
I’m referring to major version of MythTV. Current stable is v29. Previous version was 0.28. Saying master I’ referring to current development version which is referred as “master”. When it will be released it become v30 - but now it is under development and it is commonly referred as “master”. I’m not using ubuntu so can’t advise You what package You need to install to get current master. Probably google is Your friend here.

BTW: development version is usually quickly changing with having sometimes some instabilities - but usually they are quickly resolved. For me is pretty stable and I’m using it in home ‘production’ network.

ok, so your talking about pre v30. I’ll innstall it and let you know. Thanks

exactly. Now it is pre30 as is in development. After release per30 become v30.