Kodi Community Forum
Python and MythTV (a MythTV Front-End) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Python and MythTV (a MythTV Front-End) (/showthread.php?tid=2349)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39


- tbdombrosky - 2004-12-16

(nummer55 @ dec. 07 2004,22:59 Wrote:will this work with for example the msi vox (usb2.0) tv tuner (philips chipset)? i only got a laptop and would love to be able to record shows via my laptop on my xbox. anyone knows?
you will not be able to use an external tv tuner unless someone writes drivers for it. i doubt that will ever happen, so i'd look elsewhere.


- mirth - 2004-12-18

(efurban @ sep. 15 2004,08:06 Wrote:hi, i am trying to get this thing to work but i always get the "socket is not connected" error. i do have smb working fine. ( am watching movies from smb server)

xbmc_mythtv: xbmc_mythtv-0.12
mythtv ver: 0.16 (protocol: 13)
xbmc ver: 1.0.0 09-10-04

the error message i got when press "tv guide" and "recorded shows" --> 10057, socket is not connected.

"status" button works fine tho.


my xbmc_mythtv configuration:
protocol: 13
path prefix: smb://urban:[email protected]/mythtv


any help will be much appreciated.

travis
hello all,

i am having the same problem as efurban was having in the post that i am quoting. wonder if anyone knows what is happening? i checked my xbmc log file and here is the relevant error:

Quote:17-12-2004 17:20:10 info traceback (most recent call last):
17-12-2004 17:20:10 info file "q:\scripts\mytv.py", line 34, in oncontrol
17-12-2004 17:20:10 info win = mytvrecorded.recordedwin()
17-12-2004 17:20:10 info file "q:\scripts\mytvrecorded.py", line 32, in
17-12-2004 17:20:10 info self.loadrecordedshows()
17-12-2004 17:20:10 info file "q:\scripts\mytvrecorded.py", line 111, in loadrecordedshows
17-12-2004 17:20:10 info self.connecttomythtv()
17-12-2004 17:20:10 info file "q:\python\lib\gui.py", line 229, in connecttomythtv
17-12-2004 17:20:10 info user=self.cfg.getuser(), password=self.cfg.getpassword() )
17-12-2004 17:20:10 info file "q:\python\lib\mysql.py", line 344, in
17-12-2004 17:20:10 info self.getserverinfo
17-12-2004 17:20:10 info msg = self.socket.recv( connection.buffer_length )
17-12-2004 17:20:10 info error: (10057, 'socket is not connected')

i can connect to the samba share directly through xbmc and watch the *.nuv mpegs.

can anyone point me in the right direction here?


- mirth - 2004-12-18

problem solved:

i feel like an idiot. mysql isn't automatically configured listen for network connections. i had to edit /etc/mysql/my.cnf and edit out the skip-networking line. hopefully this can help others..


- cyberplague - 2004-12-29

any luck yet watching live tv with this?

cp


- EuphoricaL - 2004-12-30

i had a play for a couple of hours to try and get livetv working...(almost)

1. i added setup and config for a livetv samba folder to point to the myth livetv buffer folder
2. added a extra menu item
3. i figured out the commands to start a live recording..steps are:
"get_next_free_recorder"
"query_recorder 1[]:[]setup_ring_buffer"
"query_recorder 1[]:[]spawn_livetv"
4. display the stream:
file = 'smb://10.0.0.120/livetv/ringbuf1.nuv'
xbmc.player().play(file)
which works fine...very smooth etc

the myth protocol is pretty simple to understand, just a case of tracing the c source.
so, bascially i've got stuck at xbmc stuff...how would you capture a button press to display a osd with guide data and then allow the changing of the channel...

if anyone wants to see my random hacks, i've uploaded them to:
http://www.comp.lancs.ac.uk/computi....tch.zip
but its just proof-of-concept, not even close to a proper livetv option...


- stickman - 2005-01-02

at least, it would be great being able to zap between channels, it would make the script almost a full frontend.

first thing to know, i guess is if from playback you can call a python function when a button is pressed.

can anyone throw some light on this?

also, it's been a long time since we last heard from madtw... man, are you still there?


- bluezx9r - 2005-01-03

hi guys

i'm trying to get the script to work by following the instructions in the archive but i can seem to get it to work.
(i'm running xbmc 1.1 (a december build) in 720p ntsc.)

the myth tv link is there but does nothing and i can't see the link my tv in the setting page to get it configure.

any ideas?

thanks

:help:


- juski - 2005-01-03

(windisch @ dec. 16 2004,14:31 Wrote:
(windisch @ dec. 05 2004,04:13 Wrote:i am having trouble watching a show with the script and accessing a show in the tv schedule. it says error, but no error message. i have everything configured. i'm just not sure where the path prefix smb share needs to point to. the readme file doesn't explain it, and i see no website for help. is there a website for this script? does the mythtv smb share need to point to the recordings folder? also the gui skin does not show the mytv button on xbmc. any help would be appreciated.

thanks
noone has any idea? or knows where else i can look for help on this?
mythtv puts all its recordings in a folder called /videorec by default.

set up a samba share of that folder, or wherever your video recordings are stored.

the gui skin can easily be edited to show an extra button for mythtv... i've done it... (see below). i added the following to my home.xml file in the skin folder

<control>
<description>myth tv button</description>
<visible>yes</visible>
<type>button</type>
<execute>q:\scripts\mytv.py</execute>
<id>1116</id>
<label>myth tv</label>
<posx>270</posx>
<posy>153</posy>
<width>180</width>
<height>35</height>
<font>font14</font>
<onleft>10</onleft>
<onright>100</onright>
<onup>9</onup>
<ondown>2</ondown>
<align>center</align>
<textoffsetx>13</textoffsetx>
</control>

this is what mytv.xml looks like for me too:

<mytv>
<host>192.168.1.10</host>
<database>mythconverg</database>
<port>3306</port>
<user>mythtv</user>
<password>mythtv</password>
<mythtvport>6543</mythtvport>
<mythtvstatusport>6544</mythtvstatusport>
<mythtvprotocol>13</mythtvprotocol>
<pathprefix>smb://%h/video/videorec</pathprefix>
<localcopypath>e:\videos\</localcopypath>
</mytv>


- juski - 2005-01-03

(nummer55 @ dec. 07 2004,22:59 Wrote:will this work with for example the msi vox (usb2.0) tv tuner (philips chipset)? i only got a laptop and would love to be able to record shows via my laptop on my xbox. anyone knows?
your xbox will not (i repeat will not) be able to record shows, even with a usb video device attached. i think there's a remote chance it might be possible with an xbox running linux, though the xbox usb is only 1.1 so it's probably not fast enough to bother.

however, you could record shows on your laptop with your usb video gadget & share them to the xbox and play them back with xbox media center.

my setup at home is:

xbox with xbmc installled, in my livingroom.

athlon 800 mhz fitted with 256mb ram, two dvb-t tuner cards. this runs mythtv under gentoo linux 24/7. this machine is upstairs out of the way.

a regular windows xp machine.

everything is networked & i can watch recorded shows anywhere, any time :d

i can set up recordings from anywhere that has internet access - even from a wap phone (in theory) :d


- windisch - 2005-01-03

(juski @ jan. 03 2005,10:03 Wrote:mythtv puts all its recordings in a folder called /videorec by default.

set up a samba share of that folder, or wherever your video recordings are stored.

the gui skin can easily be edited to show an extra button for mythtv... i've done it... (see below). i added the following to my home.xml file in the skin folder

<control>
<description>myth tv button</description>
<visible>yes</visible>
<type>button</type>
<execute>q:\scripts\mytv.py</execute>
<id>1116</id>
<label>myth tv</label>
<posx>270</posx>
<posy>153</posy>
<width>180</width>
<height>35</height>
<font>font14</font>
<onleft>10</onleft>
<onright>100</onright>
<onup>9</onup>
<ondown>2</ondown>
<align>center</align>
<textoffsetx>13</textoffsetx>
</control>
thanks for the reply. i had just got the samba share entered into xbmc correctly this weekend. funny how a typo can screw up the connection...... Wink

thanks for the info on the skin change. i was confused at first because there was no home.xml in the ntsc folder, so i edited the one in the pal folder. i'll copy it over when i get home. thanks again for your help!


- juski - 2005-01-03

(windisch @ jan. 03 2005,12:24 Wrote:thanks for the reply. i had just got the samba share entered into xbmc correctly this weekend. funny how a typo can screw up the connection...... Wink

thanks for the info on the skin change. i was confused at first because there was no home.xml in the ntsc folder, so i edited the one in the pal folder. i'll copy it over when i get home. thanks again for your help!
lol.

you'd think, having linux experience you'd know all about typos by now :d

i knew very little about linux when i set out with my mythtv box, but it's quite easy once you grasp the basic concepts imho.

my next step will be to try to get the scheduling bit to work - last time i tried it, it would just hang - and i think it hung the backend too. i've been tempted to try a knoppmyth install on the xbox but i know how long it (linux) takes to boot up. i sometimes still play games on the xbox so i could do without having to wait for it to boot.

from what i know of mythtv & xbmc it shouldn't be too hard to extend xbmc into a full blown mythfrontend. 'all' the linux frontend does is give instructions to the backend over the network, and live tv is just mplayer pointing to mythtv's ringbuffer. maybe i'll turn it into a little pet project and learn some programming while i'm at it Wink

it's gonna be that or i'll build a 'proper' htpc.


- windisch - 2005-01-03

(juski @ jan. 03 2005,13:59 Wrote:lol.

you'd think, having linux experience you'd know all about typos by now :d
acutally, i've only been using linux for 6 months now, still have a lot to learn.

i know even less about coding, but if you would like some help with modifying the code to make it a "true" frontend, i'd be willing. i don't want this project to die. Wink


- EuphoricaL - 2005-01-03

it would be nice to know if anyones still developing thisHuh madtw?
otherwise someone should take ownership so some progress is made rather than lots of little private hacks...


- windisch - 2005-01-03

i agree, i have no idea whats going on with this project.


- juski - 2005-01-03

(windisch @ jan. 03 2005,14:51 Wrote:
(juski @ jan. 03 2005,13:59 Wrote:lol.

you'd think, having linux experience you'd know all about typos by now :d
acutally, i've only been using linux for 6 months now, still have a lot to learn.

i know even less about coding, but if you would like some help with modifying the code to make it a "true" frontend, i'd be willing. i don't want this project to die. Wink
i've already started looking at the python code and some stuff about the mythtv protocol. it all looks fairly straightforward at first glance, but then i don't know much about coding, so what do i know?

edit: i've just re-read this thread. seems as though someone has already started the ball rolling on the livetv aspect :d

nice work by the look of your code, euphorical

i've currently not got my xbox close enough to easily try out changes to the code - and it would disrupt my wife's soaps :lol: so i'll have a mess about with it once i get it out from under the tv Wink

i'm really looking forward to having a play. in the 80s i learnt a lot about programming by taking other people's code apart - the same could be true for python.

let's not let this issue lie people!