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.
Any body has try tool chain for android ?
(2014-07-15, 19:36)janbar Wrote: [ -> ]
(2014-07-15, 05:27)mcgski Wrote: [ -> ]
(2014-06-28, 13:52)janbar Wrote: [ -> ]Hi,

Since MythTV 0.26 the backend provides a new API to monitor and control the PVR. Today with MythTV 0.27 and future 0.28, this web service API supports most of the functions we need in the add-on. So at the begining of this year i am starting the design of a new library interoperates with it and finally i forked the new add-on "pvr.mythtv" to replace the old based on a fork of "cmyth". So I don't want maintain any more "cmyth" because by the way it will be obsolete.
Using the new API it easier to keep the addon supported.

The development branch is available at https://github.com/janbar/xbmc-pvr-addons.
Ubuntu user can install it from my ppa: ppa:jlbarriere68/ppa https://launchpad.net/~jlbarriere68/+archive/ppa

Have a nice day !

Note: To enable the API service of your backend, you have to run mythtv-setup and set the security pin as "0000".

Silly questions from a noob. I know enough about apt-get and git to be dangerous but wanted to make sure I'm following the correct directions.

I'm using the guide here (http://wiki.xbmc.org/index.php?title=Myt...FromSource) to build from source and have the following questions:

1. Do I really need to build and install XBMC just to build the addons (first 2 steps) or could I start with the "Install build utilities/libraries" step?
2. What's the exact git line I'd need to get your new addon to build? I'm thinking it's:
Code:
git clone git://github.com/janbar/xbmc-pvr-addons.git

BTW, I'm running this on a Raspberry Pi using the OpenELEC distro.

Thanks!

1: No you don't. You can start from "Install build utilities/libraries" step
2: True. And if your are a man in a hurry you can compile only the new addon using:

cd xbmc-pvr-addons
./bootstrap
./configure
make clean
make -C lib/cppmyth
make -C addons/pvr.mythtv zip

Now the zip file can be found at addons/pvr.mythtv-....zip
Also prefer unzip it directly in the addons folder of XBMC ($HOME/.xbmc/addons/) instead using the UI.

Janbar, thanks! I built per your instructions and installed through the GUI to see how far I got. Seems there's an error with starting the addon. Here's what the error is in xbmc.log:

Quote:16:27:58 T:2909021264 ERROR: Unable to load /storage/.xbmc/addons/pvr.mythtv/XBMC_MythTV.pvr, reason: /storage/.xbmc/addons/pvr.mythtv/XBMC_MythTV.pvr: wrong ELF class: ELFCLASS64

Seems it's built for 64-bit but Pi is running a 32-bit kernel. What options do I need to scale it back to 32-bit?
(2014-07-16, 00:11)mcgski Wrote: [ -> ]Janbar, thanks! I built per your instructions and installed through the GUI to see how far I got. Seems there's an error with starting the addon. Here's what the error is in xbmc.log:

Quote:16:27:58 T:2909021264 ERROR: Unable to load /storage/.xbmc/addons/pvr.mythtv/XBMC_MythTV.pvr, reason: /storage/.xbmc/addons/pvr.mythtv/XBMC_MythTV.pvr: wrong ELF class: ELFCLASS64

Seems it's built for 64-bit but Pi is running a 32-bit kernel. What options do I need to scale it back to 32-bit?

OK, so I figured the best way to get a 32-bit build is to build it on a 32-bit install of Ubuntu. Fired up a VM and now have a build that doesn't get the error above.

Rebuilt and currently getting an error in the log no matter which way I install (GUI or unzip in .xbmc/addons directory) of:

Quote:15:06:20 T:2908976208 ERROR: Unable to load /storage/.xbmc/addons/pvr.mythtv/XBMC_MythTV.pvr, reason: /storage/.xbmc/addons/pvr.mythtv/XBMC_MythTV.pvr: cannot open shared object file: No such file or directory
18:28:48 T:2766140496 WARNING: UpdateAndInitialiseClients - failed to create add-on MythTV PVR Client, status = 6
18:28:48 T:2766140496 WARNING: UpdateAndInitialiseClients - failed to load the dll for add-on MythTV PVR Client, disabling it

I checked the pvr.mythtv directory and the file was there so I'm not sure what is causing the error.

Stay tuned...

EDIT: So I tried two things to see if it could be resolved. First I started from the beta 4.1.1 of OpenELEC and second, I rebuilt again. Still no joy with the same error messages. My last attempt will be install all of XBMC in my VM to see if there is some wild dependency there. From the look of it, it's likely something to do with that file that is in error. Maybe it's not set up as a DLL for this distro correctly?

EDIT: So nothing I've been able to do to get this build of the addon to work with OpenELEC. Next stop, Raspbmc per Robert's suggestion.

EDIT: Final edit on this post. I've tried this under Raspbmc and I get the exact same error. It must be how I'm building it. I'll review earlier posts to see if there's something in the build process that needs to change.
OK, so I'm back to Raspbmc and Robert's ARM build from a few posts ago.

I'm functionally not seeing any difference in the LiveTV functionality than I was seeing with the cmyth addon. It installs but when trying to select a live TV channel, I get the "Channel Unavailable".

Here's the log entries:

Code:
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
08:57:45 T:2763572288   ERROR: Previous line repeats 6 times.
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
08:57:45 T:2763572288   ERROR: COMXPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/14.pvr]

Seems like similar errors as before. Any thoughts?
(2014-07-17, 15:06)mcgski Wrote: [ -> ]OK, so I'm back to Raspbmc and Robert's ARM build from a few posts ago.

I'm functionally not seeing any difference in the LiveTV functionality than I was seeing with the cmyth addon. It installs but when trying to select a live TV channel, I get the "Channel Unavailable".

Here's the log entries:

Code:
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
08:57:45 T:2763572288   ERROR: Previous line repeats 6 times.
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
08:57:45 T:2763572288   ERROR: COMXPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/14.pvr]

Seems like similar errors as before. Any thoughts?

My build is a few days old. Let me update the build. Updated to the latest build from git on 7/15/2014.
https://dl.dropboxusercontent.com/u/4031...ux-arm.zip

As for fuctionalty it looks like as of right now the only major changes deal with scheduling and of curse switching to the "mythtv" official way to talking to 3rd party products. In theory this should be a more stable interface for handling newer version of mythtv.

Thanks
Robert
(2014-07-17, 15:41)rmiddle Wrote: [ -> ]
(2014-07-17, 15:06)mcgski Wrote: [ -> ]OK, so I'm back to Raspbmc and Robert's ARM build from a few posts ago.

I'm functionally not seeing any difference in the LiveTV functionality than I was seeing with the cmyth addon. It installs but when trying to select a live TV channel, I get the "Channel Unavailable".

Here's the log entries:

Code:
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
08:57:45 T:2763572288   ERROR: Previous line repeats 6 times.
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
08:57:45 T:2763572288   ERROR: COMXPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/14.pvr]

Seems like similar errors as before. Any thoughts?

My build is a few days old. Let me update the build. Updated to the latest build from git on 7/15/2014.
https://dl.dropboxusercontent.com/u/4031...ux-arm.zip

As for fuctionalty it looks like as of right now the only major changes deal with scheduling and of curse switching to the "mythtv" official way to talking to 3rd party products. In theory this should be a more stable interface for handling newer version of mythtv.

Thanks
Robert

You da man! Big Grin

I've actually started the "short" build per janbar's instructions on my Pi as well mostly so that I can learn some of this stuff and maybe help some others out in the future. I got a link error and am trying it one more time before going with the "full" xbmc build as you suggest.

Bottom line seems to be you need to build it on the machine you're using it on. Make sense now, but being the noob that I am, I'm a little thick and stuborn when it comes to figuring this stuff out.

I am seeing a lot of the following warnings though:

Code:
/tmp/ccFoaeFj.s:13644: Warning: swp{b} use is deprecated for this architecture

Might be a dependency on the Rasparian distro and it's toolchain that needs to change. I'm guessing a warning now is OK though.

Mark G.
OK, so the "short" build worked and received a new .zip file. Uninstalled the old one and installed this one via the GUI.

Trying to access a LiveTV channel and now I'm getting the following error:

Code:
12:28:29 T:2715808832   ERROR: AddOnLog: MythTV PVR Client: OpenFile: Failed to create cache file: /home/pi/.xbmc/userdata/addon_data/pvr.mythtv/cache/channels/1097

Good news is the "channel unavailable" is gone. Note that the error on screen is blank so there's no real clue about the underlying problem.

EDIT: Did a quick check of that location and these files are in fact there. Here's the result of the "ls -l" command:

Code:
-rw-r--r-- 1 pi pi 0 Jul 17 12:28 1097

Possible access control issue?
(2014-07-17, 17:57)mcgski Wrote: [ -> ]
(2014-07-17, 15:41)rmiddle Wrote: [ -> ]
(2014-07-17, 15:06)mcgski Wrote: [ -> ]OK, so I'm back to Raspbmc and Robert's ARM build from a few posts ago.

I'm functionally not seeing any difference in the LiveTV functionality than I was seeing with the cmyth addon. It installs but when trying to select a live TV channel, I get the "Channel Unavailable".

Here's the log entries:

Code:
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
08:57:45 T:2763572288   ERROR: Previous line repeats 6 times.
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
08:57:45 T:2763572288   ERROR: COMXPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/14.pvr]

Seems like similar errors as before. Any thoughts?

My build is a few days old. Let me update the build. Updated to the latest build from git on 7/15/2014.
https://dl.dropboxusercontent.com/u/4031...ux-arm.zip

As for fuctionalty it looks like as of right now the only major changes deal with scheduling and of curse switching to the "mythtv" official way to talking to 3rd party products. In theory this should be a more stable interface for handling newer version of mythtv.

Thanks
Robert

You da man! Big Grin

I've actually started the "short" build per janbar's instructions on my Pi as well mostly so that I can learn some of this stuff and maybe help some others out in the future. I got a link error and am trying it one more time before going with the "full" xbmc build as you suggest.

Bottom line seems to be you need to build it on the machine you're using it on. Make sense now, but being the noob that I am, I'm a little thick and stuborn when it comes to figuring this stuff out.

I am seeing a lot of the following warnings though:

Code:
/tmp/ccFoaeFj.s:13644: Warning: swp{b} use is deprecated for this architecture

Might be a dependency on the Rasparian distro and it's toolchain that needs to change. I'm guessing a warning now is OK though.

Mark G.

I get those as well. Not sure if it is something related to my build envoirment or the plugin.

Thanks
Robert
(2014-07-17, 15:41)rmiddle Wrote: [ -> ]
(2014-07-17, 15:06)mcgski Wrote: [ -> ]OK, so I'm back to Raspbmc and Robert's ARM build from a few posts ago.

I'm functionally not seeing any difference in the LiveTV functionality than I was seeing with the cmyth addon. It installs but when trying to select a live TV channel, I get the "Channel Unavailable".

Here's the log entries:

Code:
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22)
08:57:45 T:2763572288   ERROR: Previous line repeats 6 times.
08:57:45 T:2763572288   ERROR: AddOnLog: MythTV PVR Client: OpenLiveStream: Failed to open live stream
08:57:45 T:2763572288   ERROR: COMXPlayer::OpenInputStream - error opening [pvr://channels/tv/All TV channels/14.pvr]

Seems like similar errors as before. Any thoughts?

My build is a few days old. Let me update the build. Updated to the latest build from git on 7/15/2014.
https://dl.dropboxusercontent.com/u/4031...ux-arm.zip

As for fuctionalty it looks like as of right now the only major changes deal with scheduling and of curse switching to the "mythtv" official way to talking to 3rd party products. In theory this should be a more stable interface for handling newer version of mythtv.

Thanks
Robert

Really weird.This error is returned from sub-system on "connect" to the backend. I never see it on my systems and i tried few one: ubuntu atom(x86), ubuntu i3(x64), osx 10.9(x64), windows8(win32). Have you network trouble ? or maybe the network stack was not initialized at time ?
(2014-07-17, 18:34)mcgski Wrote: [ -> ]OK, so the "short" build worked and received a new .zip file. Uninstalled the old one and installed this one via the GUI.

Trying to access a LiveTV channel and now I'm getting the following error:

Code:
12:28:29 T:2715808832   ERROR: AddOnLog: MythTV PVR Client: OpenFile: Failed to create cache file: /home/pi/.xbmc/userdata/addon_data/pvr.mythtv/cache/channels/1097

Good news is the "channel unavailable" is gone. Note that the error on screen is blank so there's no real clue about the underlying problem.

EDIT: Did a quick check of that location and these files are in fact there. Here's the result of the "ls -l" command:

Code:
-rw-r--r-- 1 pi pi 0 Jul 17 12:28 1097

Possible access control issue?

Caused by "OpenFileForWrite". Have you access control and enougth space ?
(2014-07-18, 01:27)janbar Wrote: [ -> ]
(2014-07-17, 18:34)mcgski Wrote: [ -> ]OK, so the "short" build worked and received a new .zip file. Uninstalled the old one and installed this one via the GUI.

Trying to access a LiveTV channel and now I'm getting the following error:

Code:
12:28:29 T:2715808832   ERROR: AddOnLog: MythTV PVR Client: OpenFile: Failed to create cache file: /home/pi/.xbmc/userdata/addon_data/pvr.mythtv/cache/channels/1097

Good news is the "channel unavailable" is gone. Note that the error on screen is blank so there's no real clue about the underlying problem.

EDIT: Did a quick check of that location and these files are in fact there. Here's the result of the "ls -l" command:

Code:
-rw-r--r-- 1 pi pi 0 Jul 17 12:28 1097

Possible access control issue?

Caused by "OpenFileForWrite". Have you access control and enougth space ?

I have a 16gb card in the Pi so I don't know about space. I have well over 90% available. If it's trying to load all channel streams at one time, then I'm guessing no. For one channel though, I suspect 14-15gb should be enough.

I haven't tried to manually set read/write/execute priv. on those directories. Shouldn't the code set those up with correct ACL authorization? I'll give it a try and let you know how that turns out. In this case, I'm (90%) pretty sure on Raspbmc "pi" is the same as "root". That would be a "chown" command, right?
(2014-07-18, 06:14)mcgski Wrote: [ -> ]
(2014-07-18, 01:27)janbar Wrote: [ -> ]
(2014-07-17, 18:34)mcgski Wrote: [ -> ]OK, so the "short" build worked and received a new .zip file. Uninstalled the old one and installed this one via the GUI.

Trying to access a LiveTV channel and now I'm getting the following error:

Code:
12:28:29 T:2715808832   ERROR: AddOnLog: MythTV PVR Client: OpenFile: Failed to create cache file: /home/pi/.xbmc/userdata/addon_data/pvr.mythtv/cache/channels/1097

Good news is the "channel unavailable" is gone. Note that the error on screen is blank so there's no real clue about the underlying problem.

EDIT: Did a quick check of that location and these files are in fact there. Here's the result of the "ls -l" command:

Code:
-rw-r--r-- 1 pi pi 0 Jul 17 12:28 1097

Possible access control issue?

Caused by "OpenFileForWrite". Have you access control and enougth space ?

I have a 16gb card in the Pi so I don't know about space. I have well over 90% available. If it's trying to load all channel streams at one time, then I'm guessing no. For one channel though, I suspect 14-15gb should be enough.

I haven't tried to manually set read/write/execute priv. on those directories. Shouldn't the code set those up with correct ACL authorization? I'll give it a try and let you know how that turns out. In this case, I'm (90%) pretty sure on Raspbmc "pi" is the same as "root". That would be a "chown" command, right?

The code doesn't set privileges. Created folders and files get privileges from user env: for posix see "umask". With the user "pi" type "umask". It could return "0002" meaning rwx-rwx-rx.

EDIT: But if you have launched xbmc with root before, then all folder and files are owned by root now. Now launching with a normal user you could have this problem.
(2014-07-18, 22:39)janbar Wrote: [ -> ]
(2014-07-18, 06:14)mcgski Wrote: [ -> ]
(2014-07-18, 01:27)janbar Wrote: [ -> ]Caused by "OpenFileForWrite". Have you access control and enougth space ?

I have a 16gb card in the Pi so I don't know about space. I have well over 90% available. If it's trying to load all channel streams at one time, then I'm guessing no. For one channel though, I suspect 14-15gb should be enough.

I haven't tried to manually set read/write/execute priv. on those directories. Shouldn't the code set those up with correct ACL authorization? I'll give it a try and let you know how that turns out. In this case, I'm (90%) pretty sure on Raspbmc "pi" is the same as "root". That would be a "chown" command, right?

The code doesn't set privileges. Created folders and files get privileges from user env: for posix see "umask". With the user "pi" type "umask". It could return "0002" meaning rwx-rwx-rx.

EDIT: But if you have launched xbmc with root before, then all folder and files are owned by root now. Now launching with a normal user you could have this problem.

OK, I'll have to do a little more research on unmask. I believe "pi" is the default root for this distro of XBMC (Raspbmc). I'd think that an install by XBMC of an addon would do it with root privileges. Let me do some digging and see what I come up with. Stay tuned...

EDIT: Here's a thought; what if I installed from the GUI and the zip file originated in the home directory? That might take the privileges of that directory. Hmmm......
(2014-07-19, 01:46)mcgski Wrote: [ -> ]
(2014-07-18, 22:39)janbar Wrote: [ -> ]
(2014-07-18, 06:14)mcgski Wrote: [ -> ]I have a 16gb card in the Pi so I don't know about space. I have well over 90% available. If it's trying to load all channel streams at one time, then I'm guessing no. For one channel though, I suspect 14-15gb should be enough.

I haven't tried to manually set read/write/execute priv. on those directories. Shouldn't the code set those up with correct ACL authorization? I'll give it a try and let you know how that turns out. In this case, I'm (90%) pretty sure on Raspbmc "pi" is the same as "root". That would be a "chown" command, right?

The code doesn't set privileges. Created folders and files get privileges from user env: for posix see "umask". With the user "pi" type "umask". It could return "0002" meaning rwx-rwx-rx.

EDIT: But if you have launched xbmc with root before, then all folder and files are owned by root now. Now launching with a normal user you could have this problem.

OK, I'll have to do a little more research on unmask. I believe "pi" is the default root for this distro of XBMC (Raspbmc). I'd think that an install by XBMC of an addon would do it with root privileges. Let me do some digging and see what I come up with. Stay tuned...

EDIT: Here's a thought; what if I installed from the GUI and the zip file originated in the home directory? That might take the privileges of that directory. Hmmm......

root != pi . pi is a regular users that is also in the sudo list also likely in a few hardware based groups as well but I have never checked. To run something in root you have to run the command starting with sudo. If the folder is owned by root the PI user will likely not be able to read / write to the folder.

Thanks
Robert
(2014-07-19, 04:35)rmiddle Wrote: [ -> ]
(2014-07-19, 01:46)mcgski Wrote: [ -> ]
(2014-07-18, 22:39)janbar Wrote: [ -> ]The code doesn't set privileges. Created folders and files get privileges from user env: for posix see "umask". With the user "pi" type "umask". It could return "0002" meaning rwx-rwx-rx.

EDIT: But if you have launched xbmc with root before, then all folder and files are owned by root now. Now launching with a normal user you could have this problem.

OK, I'll have to do a little more research on unmask. I believe "pi" is the default root for this distro of XBMC (Raspbmc). I'd think that an install by XBMC of an addon would do it with root privileges. Let me do some digging and see what I come up with. Stay tuned...

EDIT: Here's a thought; what if I installed from the GUI and the zip file originated in the home directory? That might take the privileges of that directory. Hmmm......

root != pi . pi is a regular users that is also in the sudo list also likely in a few hardware based groups as well but I have never checked. To run something in root you have to run the command starting with sudo. If the folder is owned by root the PI user will likely not be able to read / write to the folder.

Thanks
Robert

Got it. I did change ownership and priveliges for those folders/files and still no joy.

As you found, OpenELEC doesn't allow apt-get so building on that distro is a non-starter. I'm back to Raspbmc and trying to rebuild the component from scratch. Were you able to get LiveTV working?