Kodi Community Forum
[RELEASE] MythBox for XBMC - a MythTV Front-end Python Script for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] MythBox for XBMC - a MythTV Front-end Python Script for XBMC (/showthread.php?tid=43115)



- ubuntuaddicted - 2011-12-04

AbMagFab Wrote:Okay, got this working pretty quickly on pre-Eden, with 24+fixes.

Some immediate feedback:
- it needs to support playback groups. This is a big issue when you have deleted items going to a deleted group, since MythBox shows all items in all groups, including the deleted group.
- it needs to sticky the sort order. My whole amply prefers groups by title, but you keep reverting to date.
- the left nav is buggy. It keeps getting stuck or something, and doesn't allow a down-arrow, and sometimes doesn't allow an up arrow.
- the skin needs improving. Maybe side-by-side or something? Need a lot more rows for the now playing list. Maybe adopt a more TiVo model where it's got the now playing list as the main screen, and then programs as a second screen?

Will test some more and post results.

Thanks for all the hard work!
WOW, thanks for the feedback. I am still stumped as to why I can get just even recording playback runniing what I posted above. Could you "ATTMEPT" to spend 5 minutes to read my post and MAYBE helpHuh? PLEASE. LOL I would owe you big time.


- fiveisalive - 2011-12-04

mazda01 Wrote:I haven't looked into it but I am not sure if myth-frontend can be installed in OSX on the apple tv (version 1). I have no problems at all connecting to the headless mythtv backend from various frontends in the house. I can clearly see when I launch Mythbox that it's showing me recorded shows data and a lot of info, it just won't play recordings. Here's some snapshots (from iphone, I dont know how to take a xbmc screenshot in OSX XBMC, only on original xbox. lol)
MySQL Settings are ok acccording to Mythbox

....
Here's the latest error log of mythbox.
http://pastebin.com/E6PEvNkH
and here's the xbmc log
http://pastebin.com/6PtTPntH

Looking at the logs I can see the error is when it attempts to invoke the playback of this URL:

Code:
myth://mythconverg:[email protected]:6543/recordings/1058_20111202191000.mpg

Quote:Nope, for some reason I can't locate any failure in xbmc log file related to trying to use the myth:// protocol. Here's my sources.xml file (note the password was changed, lol)
http://pastebin.com/U3QQsQnX

So you're saying that you *can't* get playback via myth:// protocol either? If so, that means the problem is general XBMC-related not MythBox-specific. You might have better luck in a general myth:// protocol thread, rather than MythBox specifically, because as the above URL shows, MythBox just hands off the playback to myth://

Again, do you have the streaming option selected in the mythbox settings? If the streaming option is set, then the recordings directory should be greyed-out. Another possible workaround (untested) might be to export the directory using SMB (as you mentioned you have done previously). Then disable "streaming" and set the recordings directory to use the SMB-exported directory.

Quote:Any help would be appreciated. I am desperately trying to use the free apple tv 1 to access recordings (mpeg files). Don't even care so much about Live TV.

My original xbox hacked with XBMC on it still accesses the mythbackend just fine so obviously something in the mythbox coding isn't right for my setup.

I would try and help more, but since I don't run OSX and I only run XBMC on the same machine as my mythbackend, I'm limited in what advice I can give. Your best bet for help is somebody with close to the identical setup as yours.


Apple TV 1 access mythtv backend, myth:// OR mythbox - ubuntuaddicted - 2011-12-05

fiveisalive Wrote:Looking at the logs I can see the error is when it attempts to invoke the playback of this URL:

Code:
myth://mythconverg:[email protected]:6543/recordings/1058_20111202191000.mpg
I missed that entry, the problem I see there is it's referring to user mythconverg when it should be user mythtv IF my understanding of how the myth:// protocol works. I'll look into that but I know for sure my sources.xml file has the correct line. OH WAIT, it actually has the following:
Code:
myth://mythtv:[email protected]/
which is wrong, it should 192.168.0.5. HMMM, ok, just checked and now the playback of recordings works for myth:// protocol. Back to seeing if mythbox works at all but as a fallback, at least I can watch recordings using myth:// protocol for now. Live tv still doesn't work with myth:// protocol but we don't watch much live tv so that ok at this household.


fiveisalive Wrote:So you're saying that you *can't* get playback via myth:// protocol either? If so, that means the problem is general XBMC-related not MythBox-specific. You might have better luck in a general myth:// protocol thread, rather than MythBox specifically, because as the above URL shows, MythBox just hands off the playback to myth://
ok, well now that I have the myh:// protocol working you're saying that mythbox should just work because it merely hands off playback to the myth protocol? It doesn't, here's the latest log of mythbox AFTER i successfully played back a recording using the normal myth:// protocol using it as a source.

http://pastebin.com/LdetebBz

fiveisalive Wrote:Again, do you have the streaming option selected in the mythbox settings?
If the streaming option is set, then the recordings directory should be greyed-out.
YES and the recording dir is greyed out.

fiveisalive Wrote:Another possible workaround (untested) might be to export the directory using SMB (as you mentioned you have done previously). Then disable "streaming" and set the recordings directory to use the SMB-exported directory.



I would try and help more, but since I don't run OSX and I only run XBMC on the same machine as my mythbackend, I'm limited in what advice I can give. Your best bet for help is somebody with close to the identical setup as yours.
Ok, thanks for your help thus far. I am making headway now at least I have myth:// protocol working. the thing that stands out to me the most with the mythbox.log is line 98:
Code:
Playback url: myth://mythconverg:[email protected]:6543

and then of course line 368:
Code:
D | filecache.py | Thread-17 | Line 85 | Cache MISS RecordedProgram {channel = 35, start = 2010-11-18 21:00:00, end = 2010-11-18 21:31:00, file = myth://192.168.0.5:6543/1035_20101118210000.mpg, title = 'u"It's Always Sunny in Philadelphia"', sub = u'Charlie Kelly: King of the Rats', desc = 'u'Keeping ', hostname = dell}



- fiveisalive - 2011-12-05

mazda01 Wrote:Ok, thanks for your help thus far. I am making headway now at least I have myth:// protocol working. the thing that stands out to me the most with the mythbox.log is line 98:
Code:
Playback url: myth://mythconverg:[email protected]:6543

and then of course line 368:
Code:
D | filecache.py | Thread-17 | Line 85 | Cache MISS RecordedProgram {channel = 35, start = 2010-11-18 21:00:00, end = 2010-11-18 21:31:00, file = myth://192.168.0.5:6543/1035_20101118210000.mpg, title = 'u"It's Always Sunny in Philadelphia"', sub = u'Charlie Kelly: King of the Rats', desc = 'u'Keeping ', hostname = dell}

Have you check that you've set your password and username for mythtv correctly in the mythbox settings? I'd start trying to edit those and see whether those are correctly reflected in the logs. Also there might be some kind of mismatch with the port number (6543). The fact that you've got myth:// working means that you can get communication working with the mythbackend via this XBMC installation. The last hurdle is making sure that mythbox is using the same settings.


Update: just loaded a fresh Mythbox addon on my work machine to check the settings. Under MySQLDb you have:

Code:
Hostname:
Port: 3306
Database name: mythconverg
User: mythtv
Password: change_me

Unless you have changed the database name in your mythbackend, it will probably still be "mythconverg". Make sure your user name "mythtv" and password are correct (and the same as in the myth:// source). AFAIK the "Mythtv" settings are gotten from querying the mysql database and should autofill the "Master Backend Hostname" and "Master Backend Port", although you can override these here.

I'd try setting your user name to "mythtv" in the Mythbox->Settings->MySQLDB settings (since that's the username that works using myth:// protocol). The name of the database "mythconverg" is not part of the URL used to access myth recordings, see: http://wiki.xbmc.org/index.php?title=MythTV#Setup_in_XBMC

Regarding accessing live TV on a remote server: in theory it should work, but I seem to recall that it's not that reliable, it will also depend on your bandwidth of your wifi if you're trying to stream 1080p to your Apple TV.


- ubuntuaddicted - 2011-12-06

fiveisalive Wrote:Have you check that you've set your password and username for mythtv correctly in the mythbox settings? I'd start trying to edit those and see whether those are correctly reflected in the logs. Also there might be some kind of mismatch with the port number (6543). The fact that you've got myth:// working means that you can get communication working with the mythbackend via this XBMC installation. The last hurdle is making sure that mythbox is using the same settings.
Ok, i guess I lied. I don't have playback using myth://, OOPS. I assumed playback would work when I changed the IP address of mythtv backend because I was able to see a full list of items from the mythtv backend server. Examples:
All Recordings
Guide
Live Channels
Movies
TV shows
but when I click on any recording from within the "All recordings" choice, I get the following

http://pastebin.com/bMULS8qS


- fiveisalive - 2011-12-06

mazda01 Wrote:Ok, i guess I lied. I don't have playback using myth://, OOPS. I assumed playback would work when I changed the IP address of mythtv backend because I was able to see a full list of items from the mythtv backend server. Examples:
All Recordings
Guide
Live Channels
Movies
TV shows
but when I click on any recording from within the "All recordings" choice, I get the following

http://pastebin.com/bMULS8qS

you said you could get at least one client with playback an old Xbox? I'd check those logs. also check the log in your mythbackend normally in /var/log/mythtv/


- ubuntuaddicted - 2011-12-06

fiveisalive Wrote:you said you could get at least one client with playback an old Xbox? I'd check those logs. also check the log in your mythbackend normally in /var/log/mythtv/
yes, one client does work BUT it's the original xbox hacked with xbmc and the myth:// works great. I can playback that exact same The League recording on that xbox just fine. Apples and oranges since the XBMC for original xbox was a completely different beast.



I will check mythtv for logs BUT I believe it's XBMC, something wrong with DVDPlayer being able to access the .mpg file.

Code:
NOTICE: DVDPlayer: Opening: myth://mythtv:[email protected]/tvshows/The League/1035_20111110213000.mpg
18:52:48 T:2684407808 M: 21700608 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED



UPDATE: checked mythtv backend logs and the only thing that shows up as far as trying to play the league.mpg is this:
Quote:2011-11-03 21:31:08.951 Started recording: The League "Bobbum Man": channel 1035 on cardid 2, sourceid 1
2011-11-03 22:01:00.739 Finished recording The League "Bobbum Man": channel 1035
2011-11-03 22:01:01.362 Finished recording The League "Bobbum Man": channel 1035
2011-11-10 21:30:16.137 Started recording: The League "Yobogoya!": channel 1035 on cardid 2, sourceid 1
2011-11-10 22:02:00.473 Finished recording The League "Yobogoya!": channel 1035
2011-11-10 22:02:01.875 Finished recording The League "Yobogoya!": channel 1035
2011-11-13 22:17:43.376 Expiring 1108 MBytes for 1035 @ Thu Nov 3 21:31:00 2011 => The League "Bobbum Man"
2011-11-17 21:31:09.119 Started recording: The League "Thanksgiving": channel 1035 on cardid 1, sourceid 1
2011-11-17 22:02:00.544 Finished recording The League "Thanksgiving": channel 1035
2011-11-17 22:02:01.909 Finished recording The League "Thanksgiving": channel 1035
2011-11-22 01:20:01.065 Expiring 1183 MBytes for 1035 @ Thu Oct 6 21:32:00 2011 => The League "The Lockout"
2011-12-01 21:31:06.687 Started recording: The League "The Out of Towner": channel 1035 on cardid 1, sourceid 1
2011-12-01 22:01:00.944 Finished recording The League "The Out of Towner": channel 1035
2011-12-01 22:01:02.298 Finished recording The League "The Out of Towner": channel 1035

which obviously is of no use. I also attempted to check and see if the filename was in the logs anywhere which resulted in
Quote:2011-12-05 18:52:48.263 ProgramInfo(): Updated pathname '':'' -> '1035_20111110213000.mpg'

I also checked the mysql error.log and nothgin there either. I am pretty sure it's a XBMC issue.

Thanks again for trying to help.


- fiveisalive - 2011-12-06

mazda01 Wrote:yes, one client does work BUT it's the original xbox hacked with xbmc and the myth:// works great. I can playback that exact same The League recording on that xbox just fine. Apples and oranges since the XBMC for original xbox was a completely different beast.

sure but you can check to make sure the URLs are the same as your main XBMC box.

Quote: I will check mythtv for logs BUT I believe it's XBMC, something wrong with DVDPlayer being able to access the .mpg file.

Code:
NOTICE: DVDPlayer: Opening: myth://mythtv:[email protected]/tvshows/The League/1035_20111110213000.mpg
18:52:48 T:2684407808 M: 21700608 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED

That could be the case. It seems that you can't get playback via myth:// or MythBox, which suggests it's a general XBMC problem, not mythbox specific, which is good news in that if you get myth:// working, mythbox should also work. Can you delete recordings and/or add new schedules? If so, then it seems the issue is confined to the actual playback of the file.

One more idea: can you try manually copying the file from mythbackend to your OSX machine and try to play it back it back as a standalone video file?

Did you compile XBMC yourself, or use a binary?


- ubuntuaddicted - 2011-12-06

fiveisalive Wrote:sure but you can check to make sure the URLs are the same as your main XBMC box.



That could be the case. It seems that you can't get playback via myth:// or MythBox, which suggests it's a general XBMC problem, not mythbox specific, which is good news in that if you get myth:// working, mythbox should also work. Can you delete recordings and/or add new schedules? If so, then it seems the issue is confined to the actual playback of the file.

One more idea: can you try manually copying the file from mythbackend to your OSX machine and try to play it back it back as a standalone video file?

Did you compile XBMC yourself, or use a binary?
yeap, it plays fine from an smb folder shared out to my network. I just added the share to my sources.xml, made a copy of said .mpg file and it played back just fine using XBMC. Here;s associated log chopped to only show successful playback.

http://pastebin.com/ZfQwhqDm

I am using a XBMC that was put on a patchstick using ATV UsB creator. Versions of all things are the following:

Running mythtv 0.23.1+fixes26863
running appletv 3.0.2
XBMC 10.1 GIT Built on Mar 9 2011 (Git:e9e9099)
Platform: Mac OS X (8.8.2 i386)


- richardk - 2011-12-12

Just a FYI, since this refers to unsupported versions....

I tried the latest (1.04-64) build of MythBox with the latest pre-Eden build of OpenELEC, and MythBox dies with a "read-only filesystem" error while trying to initialize logging. Apparently it's trying to write a file in /usr/config, which is read-only in OpenELEC.

Uninstalling 1.04-64 and installing 1.04-63 fixed the problem.


- richardk - 2011-12-14

richardk Wrote:Just a FYI, since this refers to unsupported versions....

I tried the latest (1.04-64) build of MythBox with the latest pre-Eden build of OpenELEC, and MythBox dies with a "read-only filesystem" error while trying to initialize logging. Apparently it's trying to write a file in /usr/config, which is read-only in OpenELEC.

Uninstalling 1.04-64 and installing 1.04-63 fixed the problem.

This appears to be fixed in version 10.4-75.

Working properly now with pre-Eden on OpenELEC daily build.

Thanks, Analogue!


Yeah! MYTHBOX Rocks! - kartman_canada - 2011-12-15

I'm sooooo glad that development of this plugin is pushing ahead. I've been messing with the native myth protocol support in XBMC 11.0 nightlies and while functional.... MythBox blows it away...

just doing some testing and my bug about available commercial skips not seen by MythBox (and Play+Skip greyed out) if the recording starts early seems to still be there...

Do I need to submit a new bug report? I would love to see this fixed!

Good work!


- fiveisalive - 2011-12-15

kartman_canada Wrote:I'm sooooo glad that development of this plugin is pushing ahead. I've been messing with the native myth protocol support in XBMC 11.0 nightlies and while functional.... MythBox blows it away...

Good work!

You might want to also check out the libcmyth-based add-on for Eden/11.0 at:

https://github.com/tsp/xbmc

see also the active forum thread here:

http://forum.xbmc.org/showthread.php?tid=110694

The basic myth:// protocol support has always been pretty crude (it's also in 10.1), or perhaps you talking about the PVR support in the add-on from dteirney? tsp's add-on is rapidly getting close to full-blown support for mythtv (although the code is still a little unstable compared to mythbox). Ideally all the efforts will converge on a single myth add-on for XBMC based on the new PVR architecture.


- thrillerbee - 2011-12-15

I'm running the latest Eden nightly & just pulled newest version of mythbox. Now I suddenly get this error when trying to watch Live TV (which has been working):
Error
Watching Live TV is currently not supported
with your configuration of MythTV 0.24 and
XBMC 0.0. Should be working in XBMC 11.0+

Edit:
From the log:
ERROR: E | platform.py | MainThread | Line 78 | Cannot determine version of XBMC from build version: 11.0-PRE Git:20111213-fb530e8. Returning 0.0
It looks like the naming changed from PRE-11.0 Git... to 11.0-PRE Git... Editing platform.py resolved the issue.


- richardk - 2011-12-28

thrillerbee Wrote:I'm running the latest Eden nightly & just pulled newest version of mythbox. Now I suddenly get this error when trying to watch Live TV (which has been working):
Error
Watching Live TV is currently not supported
with your configuration of MythTV 0.24 and
XBMC 0.0. Should be working in XBMC 11.0+

Edit:
From the log:
ERROR: E | platform.py | MainThread | Line 78 | Cannot determine version of XBMC from build version: 11.0-PRE Git:20111213-fb530e8. Returning 0.0
It looks like the naming changed from PRE-11.0 Git... to 11.0-PRE Git... Editing platform.py resolved the issue.

I'm getting a similar error when using streaming to play recordings.

"Streaming from a MythTV 0.24 backend to XBMC 0.0 is broken."