Kodi Community Forum

Full Version: pvr.mythtv add-on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2014-07-22, 10:23)janbar Wrote: [ -> ]
(2014-07-21, 03:24)mcgski Wrote: [ -> ]nickr, got it. Thanks!

janbar, the logs are pasted into http://www.xbmclogs.com/show.php?id=250980

It's the same log file from the previous post with another example of the same again near the end of the file.

Let me know if there's anything you need me to do.

Debug mode was not enabled Sad . It is like reading only title of news Undecided

Uggh! I could have sworn this was turned on in the addon. It's one of the first things I do. Am I looking at the wrong log? I'm looking under ~/.xbmc/temp/xbmc.log

EDIT:

OK. Noob mistake on my part. I had the addon debugging enabled but not overall debugging enabled. Sorry!

Here's an updated log file: http://www.xbmclogs.com/show.php?id=251941
(2014-07-22, 05:07)aboredguy Wrote: [ -> ]Ok, so I'm running OpenELEC 4.0.7 (which is current stable) on a RaspberryPi. I finally got the toolchain stuff setup and good to go. My MythTV Backend is 0.27-193-g8ee257c and is fully functional from the local frontend.

I compiled at version 1.9.17...

aboredguy, I'm looking at your post and had a few questions/comments:

1. I wasn't able to get a toolchain working on OpenELEC as it said it wouldn't allow apt-get or git. I was only able to do this on Raspbmc and began building the addon on my Pi using that distro. Did you find instructions somewhere on how to do a build on OpenELEC for Pi?

2. I have basically the same setup except Raspbmc which should be functionally the same if installing the addon. How did you build and install the addon? I'm building using the XBMC build-from-source for addons and substituting the new git repository. I'm also building from the "pi" account but using sudo in all of my build commands. I'm installing the addon from the GUI "Install from zip file".

Sorry for the questions but I'm feeling I'm missing something that is obvious and I can't see it. Thanks!
(2014-07-22, 23:00)mcgski Wrote: [ -> ]
(2014-07-22, 05:07)aboredguy Wrote: [ -> ]Ok, so I'm running OpenELEC 4.0.7 (which is current stable) on a RaspberryPi. I finally got the toolchain stuff setup and good to go. My MythTV Backend is 0.27-193-g8ee257c and is fully functional from the local frontend.

I compiled at version 1.9.17...

aboredguy, I'm looking at your post and had a few questions/comments:

1. I wasn't able to get a toolchain working on OpenELEC as it said it wouldn't allow apt-get or git. I was only able to do this on Raspbmc and began building the addon on my Pi using that distro. Did you find instructions somewhere on how to do a build on OpenELEC for Pi?

2. I have basically the same setup except Raspbmc which should be functionally the same if installing the addon. How did you build and install the addon? I'm building using the XBMC build-from-source for addons and substituting the new git repository. I'm also building from the "pi" account but using sudo in all of my build commands. I'm installing the addon from the GUI "Install from zip file".

Sorry for the questions but I'm feeling I'm missing something that is obvious and I can't see it. Thanks!

OpenELEC isn't done like your regular Linux. It is a slimmed down system and the build system is totally separate. We do XenServer at work and it is pretty similarly done where if you need to build a driver, they have an entire VM created just for that. I think the fear is that the build tools being installed add a vector for exploitation or that people might jack up the system doing "make install"s wrong...

My steps might be the hard way, but here were all my steps to build the update .tar for OpenELEC:
1. I created a VirtualBox VM with Ubuntu 12.04 and fully updated. I gave it 1 vCPU, a 20GB VHD, and 512MB RAM.
2. I followed this guide: Compile from source - OpenELEC - I followed the 12.04 section, then the Perl XML:Tonguearser section, the Download from GIT section, !! run this command here: git checkout f2efba3 !! (this is the 4.0.7 bump), and finally the Start Compiling section. This literally took 60 hours to complete in my setup. But you should let it build first without any additions at first.
3. I followed this guide next: Myth PVR/BuildFromSource - XBMC - I skipped down to the OpenELEC section. In the script, you will need to change the 3rd line (starts with "source") from "/meta" to "/package.mk". Also, alter the wget line to reflect janbar's git repo ("https://github.com/janbar/xbmc-pvr-addons/archive/master.zip"). I then added a line after the "tar" line that reads "cp $PKG_NAME-$PKG_VERSION.tar.xz /var/www/4.0.7/". Finally I altered the echo line to read "http://127.0.0.1/$PKG_NAME-$PKG_VERSION.tar.xz". More on this apache stuff in a moment...
4. sudo apt-get install apache2 - There is a point in the build process where it reaches out to the openelec.tv server to grab what it feels the sources should be. I don't know enough about the scripts and how much trouble it will be to simply change it. When the build process fails being unable to down the files, I changed my /etc/hosts file with "127.0.0.1 sources.openelec.tv". After it is done downloading, I change the hosts file back and subsequent builds don't require changes to the hosts file.
5. Edit ./packages/mediacenter/xbmc-pvr-addons/package.mk - adjust the PKG_VERSION to the git version (7 digit) and adjust the PKG_SITE to janbar's git directory.
6. Finally, I ran "PROJECT=RPi ARCH=arm make release" and worked through all the misplaced source files. I attempted to blindly copy all files from the obvious source dir to the better dir, but then the build errors got strange. So instead, I just copied the files as they were presented. My pattern was: wait for build error, find . |grep "name of missing file", and then cp to the expected location.
*There was a patch file that I had to correct one of the assumed lines, but I haven't had to adjust it since 7cd8de9 so maybe it is fixed for real in janbar's git.

The last piece of the puzzle is how to get the new version into your Pi! The build process creates a .tar file in ~/OpenELEC.tv/target/ . Open a SMB share on your OpenELEC Pi named Update and copy the .tar over. Then politely reboot the Pi from the XBMC screen. Upon reboot, it notices the tar and moves the files to their proper place and reboots again.

If it is of any help to anyone, I have also saved my entire bash history for my two screens here. You'll see a lot of trial and error in there, but nothing too painful.

Concerning my problems, I will get the debug logging enabled everywhere (also newbie stuff), I will get their clocks synced, and I will put the Pi and Mythtv backend on a cross over cable! :-) We will see what happens!

Thanks all!
aboredguy, thanks for the details on that. I'm going to hold off on OpenELEC until I can get at least Raspbmc running. 60h is more than I want to invest until I hear from janbar if he's found anything from my logs.
I don't know if some of the source changed, but now I'm getting a "Dependencies not met. Please contact addon author." when trying to install from the GUI. Loggs show the following:

Code:
13:39:57 T:3037029152   DEBUG: GetZipList - Processing zip://%2fhome%2fpi%2fxbmc-pvr-addons%2faddons%2fpvr.mythtv-linux-arm.zip/
13:39:57 T:3037029152   DEBUG: Addon pvr.mythtv requires xbmc.pvr version 1.9.1 which is not available

I was able to unzip the package into the .xbmc/addons folder and reboot to get the addon to start though it took some time. I'd post the logs but I'm getting an error message from the xbmclogs.com on a paste that says my paste contains a phase that has been censored!! pastebin.com has a limit on size. Any suggestions?
(2014-07-22, 22:37)mcgski Wrote: [ -> ]
(2014-07-22, 10:23)janbar Wrote: [ -> ]
(2014-07-21, 03:24)mcgski Wrote: [ -> ]nickr, got it. Thanks!

janbar, the logs are pasted into http://www.xbmclogs.com/show.php?id=250980

It's the same log file from the previous post with another example of the same again near the end of the file.

Let me know if there's anything you need me to do.

Debug mode was not enabled Sad . It is like reading only title of news Undecided

Uggh! I could have sworn this was turned on in the addon. It's one of the first things I do. Am I looking at the wrong log? I'm looking under ~/.xbmc/temp/xbmc.log

EDIT:

OK. Noob mistake on my part. I had the addon debugging enabled but not overall debugging enabled. Sorry!

Here's an updated log file: http://www.xbmclogs.com/show.php?id=251941

Okay, i suspect this:

Host": "FE80:Big Grin250:99FF:FE26:FCC3"

Have you set your backend IP6 in myth-setup ? If yes then addon received IP6 as host to connect recorder ! But can RPI use IP6 ? To check that i add a commit to log the recorder host.

So to resolve your issue you can do:

1 - remove the IP6 address from mythtv-setup and restart the backend: Using only IP v4 supported by your remote clients.
2 - retry the addon. Is it run now ?
3 - Not run yet: rebuild the addon from the last master containing the commit "[cppmyth] Add debug log", then retry with debug mode enabled. Now we could see in log the host used to connect recorder.

(2014-07-23, 20:13)mcgski Wrote: [ -> ]I don't know if some of the source changed, but now I'm getting a "Dependencies not met. Please contact addon author." when trying to install from the GUI. Loggs show the following:

Code:
13:39:57 T:3037029152   DEBUG: GetZipList - Processing zip://%2fhome%2fpi%2fxbmc-pvr-addons%2faddons%2fpvr.mythtv-linux-arm.zip/
13:39:57 T:3037029152   DEBUG: Addon pvr.mythtv requires xbmc.pvr version 1.9.1 which is not available

I was able to unzip the package into the .xbmc/addons folder and reboot to get the addon to start though it took some time. I'd post the logs but I'm getting an error message from the xbmclogs.com on a paste that says my paste contains a phase that has been censored!! pastebin.com has a limit on size. Any suggestions?

Yes, since 2 days the xbmc.pvr version is set to 1.9.1 ! I have to build a new branch for Gotham using 1.9.0.
I let you know in few minutes , just the time to push a Gotham branch

Also you can update manually the file pvr.mythtv/addon.xml and set the version to 1.9.0 instead 1.9.1
So, i reverted the master to use xbmc.pvr version 1.9.0 (Gotham). A new branch "Helix" is created to use with xbmc 14.0.

@mcgski, for instance I prefered revert the master to 1.9.0 which is compatible with Gotham. Also it will be more simple for all to test the addon because lot use Gotham. The new branch name "Helix" contains changes to be compatible with the master of xbmc. Guys want to try it (with xbmc helix nightly build) have to use this branch by command: git checkout Helix.
Your new build can run with Gotham by updating the file addon.xml (update 1.9.1 to 1.9.0).
(2014-07-23, 22:08)janbar Wrote: [ -> ]3 - Not run yet: rebuild the addon from the last master containing the commit "[cppmyth] Add debug log", then retry with debug mode enabled. Now we could see in log the host used to connect recorder.

janbar, thanks! I'm about to test the backend now but had a question about #3. What part of the build process do I use the "[cppmyth] Add debug log"? Not sure what you mean by "...last master containing the commit" means as well. Sorry, still learning.

Will let you know in a bit if my existing addon works with the backend changes. Stay tuned....

EDIT:

Removing IP6 config from the MythTV backend did the trick! Thanks Janbar. I'm now able to get LiveTV, though it's terribly with pixel fragments. If anyone has a suggestion on reducing/eliminating the pixelation on a Raspberry Pi, I'm all ears. I suspect it's part of running on such a platform though.

One thing that still likely needs some looking into is the channels don't match up with the channels on the backend.

I'm going to be watching a movie or two this evening to see if anything else pops up.
Does your pi have the mpeg2 codec installed? You need to buy this from the rpi foundation (cost=minimal). Most tv is broadcast in mpeg2.

Other than that it is probably a reception problem.
(2014-07-24, 02:49)nickr Wrote: [ -> ]Does your pi have the mpeg2 codec installed? You need to buy this from the rpi foundation (cost=minimal). Most tv is broadcast in mpeg2.

Other than that it is probably a reception problem.

Yes. The Pi has the MPEG2 codec keys installed otherwise I'd not get any picture.

I'm thinking it's a buffering/processor thing. The mythfrontend on the same box as the backend runs Live TV flawlessly. My VM running XBMC is also fragmented which makes sense as it doesn't have a dedicated GPU even though it's running on a tricked out Macbook Pro.

I have a Hummingboard from Solid Run (solid-run.com) that pumps up the Pi specs with 2 cores and 1gig on a SoC. I'm going to try to get this working on that as well and will report back.
(2014-07-23, 05:40)aboredguy Wrote: [ -> ]My steps might be the hard way, but here were all my steps to build the update .tar for OpenELEC:

aboredguy,

Nice write up on the steps. I wrote that entry on the xbmc wiki with build instructions a while back, sorry I hadn't updated it when OpenELEC changed their build system. I just went and updated it with the few changes needed. I also switched it from fetzerch to janbar version. Anyway, building should boil down to simply this once you have a machine with all the dependancies:

Code:
# grab soruce
git clone https://github.com/OpenELEC/OpenELEC.tv.git

# go into source directory
cd OpenELEC.tv

# checkout version you want
git checkout 4.1.2

#run script from http://wiki.xbmc.org/index.php?title=MythTV_PVR/BuildFromSource#Build_MythTV_git_into_OpenELEC
~/update-xbmc-pvr-addons.sh

# build project - come back tomorrow
PROJECT=Generic ARCH=x86_64 make release

No need for apache or anything extra like that. Obviously change PROJECT and ARCH as desired, also may want to change Generic in script (although I doubt it'd matter). If you're going to be building semi-frequently it's worthwhile to keep the "source" directory around between builds as it'll save having to redownload all the source files every single time.

Apnar,
Very cool! I'll use that at Janbar's next version bump!

Janbar,
I evidently had other issues at hand... After finding that everything worked perfectly on a crossover cable, I eventually discovered the issue (playing for 4 minutes and then dying for exactly 30) must stem from an upstream Asus RTN16 router. Craziest thing I've seen a router do in a while! And it wasn't even directly connected to either device (I have a Trendnet Gigabit switch between the backend and XBMC).

But I can attest that it everything is working as it appears it should. Maybe now I can be a little more productive towards the goal since I got that out of the way! :-)
This plugin rocks, so awesome.

I had a bug with the other plugin on my sons laptop. Soon as I installed this one bug was gone.

Also it was going to be a pain to use mythtv-setup as I don't even have a keyboard and mouse on my htpc, so I found out what settings too change directly in phpymadmin for the pin:

update settings set data = '1' where value = 'SetupPinCodeRequired'
update settings set data = '0000' where value = 'SecurityPin'

And then a reload of mythtv-backend and all was well.
FYI and update on running this addon with a Raspberry Pi. I was able to watch a few recordings with no problems (glitches or pixelation). LiveTV is still a problem though. I suspect if recordings work than it might have to do with a timing issue with requesting data from the backend vs. how quickly the backend can serve it up. As I mentioned, I get the same on a VM on a Mac Pro so I'm not sure it's a Myth issue. I may try running mythfrontend from a VM on the Mac Pro to see if I get LiveTV with similar issues.

Janbar, I had a few questions on your build comments earlier. Not sure if I should be doing anything differently or I'm good for now. I got the impression you may have updated the make file to use the right version of dependencies on the build. Let me know otherwise.
Have been using this for the past couple weeks in Gotham on Ubuntu and Arch. Most things seem to be working as well as the cmyth add-on. However, skipping forward / back seem completely broken for both LiveTV (was never totally reliable with cmyth, but mostly works) and for completed recordings (always reliable with cmyth). With this new add-on, if I try to skip forward into a recording, it just dumps me out to the recordings list. If I skip backwards it freezes the video and the audio plays from the start of the recording. This is true for both SmallStep & BigStep functions.

Am I alone in this, or is it known?