<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>An It-Slave in the digital saltmine &#187; MythTV</title>
	<atom:link href="http://www.it-slav.net/blogs/category/mythtv/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.it-slav.net/blogs</link>
	<description>Another Blog from a Geek that has no life</description>
	<lastBuildDate>Fri, 02 Jul 2010 07:33:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Nagios or op5 Monitor eventhandler to start a service that has stopped</title>
		<link>http://www.it-slav.net/blogs/2009/06/15/using-nagios-or-op5-monitor-eventhandler-to-start-a-service-that-has-stopped/</link>
		<comments>http://www.it-slav.net/blogs/2009/06/15/using-nagios-or-op5-monitor-eventhandler-to-start-a-service-that-has-stopped/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 19:03:01 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=1138</guid>
		<description><![CDATA[Background
I use MythTV quite frequently and noticed that it is instable when using sasc-ng as a decoder to decrypt encrypted DVB-T channels. So approximatly every third day the MythTVbackend server stops and need to be started again. I have wriiten an earlier article about howto monitor MythTV with Nagios or op5 Monitor so I get [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>I use MythTV quite frequently and noticed that it is instable when using <a target="_blank" href="https://opensvn.csie.org/traccgi/sascng/">sasc-ng</a> as a decoder to decrypt encrypted DVB-T channels. So approximatly every third day the MythTVbackend server stops and need to be started again. I have wriiten an <a target="_blank" href="http://www.it-slav.net/blogs/?p=651">earlier article</a> about howto monitor MythTV with Nagios or op5 Monitor so I get noticed that it has stopped. But I need to manually start it again. This article describe howto make Nagios or op5 Monitor to start a stopped MythTVbackend. It can be used for starting almost any service.</p>
<p>I have used the examples provided by Ethan at <a target="_blank" href="http://support.nagios.com/knowledge-base/official-documentation">Nagios official documentation</a> describing <a target="_blank" href="http://nagios.sourceforge.net/docs/3_0/eventhandlers.html">eventhandlers</a>.</p>
<p>Normally it is not recommended to let a tool like Nagios or op5 Monitor start a service that has stopped, because it is probably a reason why the service has stopped and the correct procedure is to fix the root cause of the problem, not the symptom.</p>
<p>The MythTV backend runs on one machine called lala (after a character in Teletubbies) which is not the same as the Nagios or op5 Monitor server. I use nrpe to run the start script i.e.</p>
<pre>
 /etc/init.d/mythtv-backend start
</pre>
<p>There is several options here but I already setup the nrpe agent and it is simple to make Nagios or op5 Monitor to use nrpe to run a script.<span id="more-1138"></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Implementation</h2>
<p>I used the script I found at Nagios documentation about <a target="_blank" href="http://nagios.sourceforge.net/docs/3_0/eventhandlers.html">eventhandlers</a> as a base and modiied it slightly.</p>
<p>&nbsp;</p>
<h3>At my op5 Monitor machine</h3>
<pre>
/opt/plugins/custom/restart-mythtv-lala.sh
</pre>
<pre>
#!/bin/sh
#
# Event handler script for restarting the mythTVbackend server on lala
#
# Note: This script will only restart the mythtvbackend if the service is
#       retried 2 times (in a &quot;soft&quot; state) or if the service somehow
#       manages to fall into a &quot;hard&quot; error state.
#

# What state is the mythbackend service in?
case &quot;$1&quot; in
OK)
	# The service just came back up, so don't do anything...
	;;
WARNING)
	# We don't really care about warning states, since the service is probably still running...
	;;
UNKNOWN)
	# We don't know what might be causing an unknown error, so don't do anything...
	;;
CRITICAL)
	# Aha!  The HTTP service appears to have a problem - perhaps we should restart the server...

	# Is this a &quot;soft&quot; or a &quot;hard&quot; state?
	case &quot;$2&quot; in

	# We're in a &quot;soft&quot; state, meaning that Nagios is in the middle of retrying the
	# check before it turns into a &quot;hard&quot; state and contacts get notified...
	SOFT)

		# What check attempt are we on?  We don't want to restart the web server on the first
		# check, because it may just be a fluke!
		case &quot;$3&quot; in

		# Wait until the check has been tried 3 times before restarting the web server.
		# If the check fails on the 4th time (after we restart the web server), the state
		# type will turn to &quot;hard&quot; and contacts will be notified of the problem.
		# Hopefully this will restart the web server successfully, so the 4th check will
		# result in a &quot;soft&quot; recovery.  If that happens no one gets notified because we
		# fixed the problem!
		2)
			echo &quot;`date` Restarting mythtv service (2rd soft critical state)...&quot; &gt;&gt; /tmp/mythtvstart
			# Call the init script to restart the mythbackend server
			#/etc/rc.d/init.d/httpd restart
			#date &gt;&gt; /tmp/mythtvstart
			/opt/plugins/check_nrpe -H lala -c start_mythtvbackend
			;;
			esac
		;;

	# The mythtvbackend service somehow managed to turn into a hard error without getting fixed.
	# It should have been restarted by the code above, but for some reason it didn't.
	# Let's give it one last try, shall we?
	# Note: Contacts have already been notified of a problem with the service at this
	# point (unless you disabled notifications for this service)
	HARD)
		echo &quot;`date` Restarting mythtv service (hard state)...&quot; &gt;&gt; /tmp/mythtvstart
		# Call the init script to restart the HTTPD server
		#/etc/rc.d/init.d/httpd restart
		#date &gt;&gt; /tmp/mythtvstart
		/opt/plugins/check_nrpe -H lala -c start_mythtvbackend
		;;
	esac
	;;
esac
exit 0
</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre>
/opt/monitor/misccomands.cfg</pre>
<pre>
# command 'restart-mythtv-lala'
define command{
    command_name                   restart-mythtv-lala
    command_line                   /opt/plugins/custom/start-mythtv-lala.sh $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
    }
</pre>
<p>&nbsp;</p>
<pre>
/opt/monitor/etc/services.cfg

# service 'Mythbackend'
define service{
    use                            default-service
    host_name                      lala
    service_description            Mythbackend
    check_command                  check_tcp!6543
    servicegroups                  MythTV,it-slav
    event_handler                  restart-mythtv-lala!$SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
    contact_groups                 it-slav_sms,it-slav_jabber,it_slav_mail
    }
</pre>
<h3>At my mythbackend machine lala</h3>
<pre>
/etc/nrpe.d/mycommands.cfg
command[start_mythtvbackend]=/usr/bin/sudo /etc/init.d/mythtv-backend start

/etc/sudoers
nobody ALL= (root) NOPASSWD:/etc/init.d/mythtv-backend start
</pre>
<address>Notice that my nrpe agent run as user nobody</address>
<address>&nbsp;</address>
<address>&nbsp;</address>
<address>&nbsp;</address>
<address>&nbsp;</address>
<h2>Test</h2>
<p>I stopped the mythtvbackend by running:</p>
<pre>
peter@lala:/etc/nrpe.d$ date
Mon Jun 15 20:40:55 CEST 2009
peter@lala:/etc/nrpe.d$ sudo /etc/init.d/mythtv-backend stop
 * Stopping MythTV server: mythbackend
</pre>
<p>And run</p>
<pre>
[root@op5 ~]# tail -f /tmp/mythtvstart
Mon Jun 15 20:47:09 CEST 2009 Restarting mythtv service (2rd soft critical state)...
</pre>
<p>YES it works!</p>
<p>&nbsp;</p>
<h2>Links:</h2>
<ul>
<li><a target="_blank" href="http://www.op5.com/op5/products/monitor">op5 Monitor</a> a Nagios based supported enterprise Monitoring software.</li>
<li><a target="_blank" href="http://www.mythtv.org">MythTV</a> a free OpenSource Digital Video Recorder</li>
<li><a href="http://www.nagios.org">Nagios</a> Open Source Monitoring</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2009/06/15/using-nagios-or-op5-monitor-eventhandler-to-start-a-service-that-has-stopped/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MythTV part4, Monitor MythTV backend with Nagios or op5 Monitor</title>
		<link>http://www.it-slav.net/blogs/2009/02/03/monitor-mythtv-backend-with-nagios-or-op5-monitor/</link>
		<comments>http://www.it-slav.net/blogs/2009/02/03/monitor-mythtv-backend-with-nagios-or-op5-monitor/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 09:43:21 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[op5 Monitor]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[MythTV backend]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=651</guid>
		<description><![CDATA[At my home the most critical system is the MythTV system and a MythTV downtime will create a revolt at home. This article will describe howto make sure that a MythTV backend can be surveillanced with Nagios or op5 Monitor.

I have in earlier articles described howto install and configure both the backend and the frontend.

To [...]]]></description>
			<content:encoded><![CDATA[<p>At my home the most critical system is the <a href="http://www.mythtv.org/" target="_blank">MythTV</a> system and a MythTV downtime will create a revolt at home. This article will describe howto make sure that a MythTV backend can be surveillanced with <a href="http://www.nagios.org" target="_blank">Nagios</a> or <a href="http://www.op5.com/op5/products/monitor" target="_blank">op5 Monitor</a>.</p>
<p><br class="spacer_" /></p>
<p>I have in earlier articles <a href="http://www.it-slav.net/blogs/?cat=101" target="_blank">described</a> howto install and configure both the backend and the frontend.</p>
<p><br class="spacer_" /></p>
<p>To monitor MythTV backend I have identified the following parts:</p>
<ul>
<li>MySQL database, contains data about TV records and program listings.</li>
<li>Mythbackend, the process that controls the MythTV backend.</li>
<li>Mythfilldatabase, runs XMLTV that puts programlistings in the MySQL database.</li>
<li>Webserver.</li>
<li>Internet access to grab TV show listings. </li>
</ul>
<p>I created a service group called MythTV</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2009/02/mythtv-servicegroup.png"><img class="alignnone size-medium wp-image-653" title="mythtv-servicegroup" src="http://www.it-slav.net/blogs/wp-content/uploads/2009/02/mythtv-servicegroup.png" alt="" width="802" height="181" /><br />
 </a></p>
<address>A screenshot from op5 Monitor</address>
<address><span id="more-651"></span></address>
<address> </address>
<h2>Theory</h2>
<p>A short description of how the nagios checks works and what they do.</p>
<p><br class="spacer_" /></p>
<h3>MySQL</h3>
<p>This check verifies that MySQL is working, I use login mythtv and passowrd mythtv, the default mythtv login and password that the frontend would use.</p>
<p><br class="spacer_" /></p>
<h3>Mythbackend</h3>
<p>The mythbackend uses TCP port 6543 for status information. I assume that if this port responds, mythbackend is up and running.</p>
<p><br class="spacer_" /></p>
<h3>Mythfilldatabase</h3>
<p>The status of how many days data in the Listings database can be found at the webpage http://&lt;mythtvbackend&gt;:6544</p>
<p><a href="http://www.it-slav.net/blogs/wp-content/uploads/2009/02/mythtvstatus1.png"><img class="alignnone size-full wp-image-685" title="mythtvstatus" src="http://www.it-slav.net/blogs/wp-content/uploads/2009/02/mythtvstatus1.png" alt="" width="685" height="46" /></a></p>
<p><br class="spacer_" /></p>
<p>If the page contains &#8220;13 days&#8221; or &#8220;14 days&#8221; or &#8220;15 days&#8221;, I think mythfilldatabase as OK.</p>
<p>I&#8217;ve got the idea from <a href="http://www.techsneeze.com/monitor-mythtv-nagios" target="_blank">http://www.techsneeze.com/monitor-mythtv-nagios</a></p>
<p><br class="spacer_" /></p>
<h3>Mythweb</h3>
<p>Check that http://&lt;mythtvbackend&gt;/mythweb responds. (I know that if the webserver is down the mythfilldatabase check will also be CRITICAL but it might be so that the database do not contain 13 or more days of Listings while the webserver still works.)</p>
<p><br class="spacer_" /></p>
<h3>Ping</h3>
<p>A simple ping to make sure that the system with MythTV backend is up.</p>
<p><br class="spacer_" /></p>
<h3>System Load<br />
</h3>
<p>If the MythTV backend system has to much to do, the MythTV service will not work.</p>
<p><br class="spacer_" /></p>
<h3>Internet</h3>
<p>The mythfilldatabase uses Internet to grab the Listings. I ping a couple of well known hosts on internet and if none of them responds I assume that my Internet connection is down.</p>
<p><br class="spacer_" /></p>
<h2>Implementation</h2>
<p>These files contains the Nagios configuration. I have choosen not to include the actual scripts that are used, most of them are included in a standard Nagios installation or op5 Monitor installation.</p>
<p><br class="spacer_" /></p>
<p><strong>hosts.cfg:</strong></p>
<pre># host 'ibsen'
 define host{
 use                            default-host-template
 host_name                      ibsen
 alias                          MythTV
 address                        10.1.1.11
 hostgroups                     unix-servers
 contact_groups                 it-slav,call_it-slav,it-slav_msn
 }</pre>
<pre># host 'internet'
 define host{
 use                            default-host-template-internet
 host_name                      internet
 alias                          Internet
 address                        194.71.11.69
 parents                        first_router
 check_command                  check_internet!ftp.sunet.se www.google.com www.yahoo.com www.ibm.com
 contact_groups                 it-slav,call_it-slav,it-slav_msn
 }</pre>
<p><strong>services.cfg</strong></p>
<pre># service 'MySQL'
 define service{
 use                            default-service
 host_name                      ibsen
 service_description            MySQL
 check_command                  check_mysql!mythtv!mythtv
 servicegroups                  it-slav,MythTV
 contact_groups                 it-slav_msn,it-slav
 }</pre>
<pre># service 'Mythbackend'
 define service{
 use                            default-service
 host_name                      ibsen
 service_description            Mythbackend
 check_command                  check_tcp!6543
 servicegroups                  it-slav,MythTV
 contact_groups                 it-slav_msn,it-slav
 }</pre>
<pre># service 'Mythfilldatabase'
 define service{
 use                            default-service
 host_name                      ibsen
 service_description            Mythfilldatabase
 check_command                  check_http_url_regex_port!"/"!"(15 days)|(14 days)|(13 days)"!6544
 servicegroups                  MythTV
 contact_groups                 it-slav_sms,it-slav_msn,it-slav_mail
 }</pre>
<pre># service 'Mythweb'
 define service{
 use                            default-service
 host_name                      ibsen
 service_description            Mythweb
 check_command                  check_http_url!/mythweb
 servicegroups                  MythTV
 }
 # service 'PING'
 define service{
 use                            default-service
 host_name                      ibsen
 service_description            PING
 check_command                  check_ping!100,20%!500,60%
 servicegroups                  it-slav,MythTV
 contact_groups                 it-slav,it-slav_msn
 # service 'System Load'
 define service{
 use                            default-service
 host_name                      ibsen
 service_description            System Load
 check_command                  check_nrpe!load
 servicegroups                  it-slav,MythTV
 contact_groups                 it-slav,it-slav_msn
 }</pre>
<pre>####################################################
 #
 # Services for host internet
 #</pre>
<pre># service 'Kolla Internet'
 define service{
 use                            default-service
 host_name                      internet
 service_description            Kolla Internet
 check_command                  check_internet!ftp.sunet.se www.google.com www.yahoo.com www.ibm.com
 servicegroups                  MythTV
 contact_groups                 it-slav,it-slav_msn
 }</pre>
<p><strong>checkcommands.cfg:</strong></p>
<pre># command 'check_mysql'
 define command{
 command_name                   check_mysql
 command_line                   $USER1$/check_mysql -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
 }
 # command 'check_tcp'
 define command{
 command_name                   check_tcp
 command_line                   $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
 }
 # command 'check_http_url_regex_port'
 define command{
 command_name                   check_http_url_regex_port
 command_line                   $USER1$/check_http -H $HOSTADDRESS$ -u $ARG1$ -r $ARG2$ -p $ARG3$
 }
 # command 'check_http_url'
 define command{
 command_name                   check_http_url
 command_line                   $USER1$/check_http -H $HOSTADDRESS$ -u $ARG1$
 }
 # command 'check_internet'
 define command{
 command_name                   check_internet
 command_line                   $USER1$/custom/check_internet.sh "$ARG1$"
 }</pre>
<p><strong>servicegroups.cfg:</strong></p>
<pre># servicegroup 'MythTV'
define servicegroup{
 servicegroup_name              MythTV
 alias                          MythTV
 }</pre>
<h2>Links</h2>
<ul>
<li><a href="http://www.it-slav.net/blogs/?cat=101" target="_blank">Earlier</a> articles about MythTV</li>
<li><a href="http://www.mythtv.org" target="_blank">MythTV project</a></li>
<li><a href="http://www.op5.com/op5/products/monitor" target="_blank">op5 Monitor</a></li>
<li><a href="http://www.nagios.org" target="_blank">Nagios</a></li>
</ul>
<p><img src="file:///tmp/moz-screenshot-1.jpg" alt="" /></p>
<p><img src="file:///tmp/moz-screenshot.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2009/02/03/monitor-mythtv-backend-with-nagios-or-op5-monitor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MythTV Xbox frontend part3</title>
		<link>http://www.it-slav.net/blogs/2009/01/29/mythtv-xbox-frontend-part3/</link>
		<comments>http://www.it-slav.net/blogs/2009/01/29/mythtv-xbox-frontend-part3/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 19:14:47 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[xbmcmythtv]]></category>
		<category><![CDATA[xbox]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=611</guid>
		<description><![CDATA[Background

In earlier articles I&#8217;ve described howto install mythbuntu and configure the backend
In this article I assume that you have a workin Xbox with a quit new version of XBMC.

Download xbmcmythtv

The xbmcmythtv is not being maintained anymore so the version downloadable from http://sourceforge.net/projects/xbmcmythtv/ does not work with newer versions of MythTV.
However, it is possible to grab [...]]]></description>
			<content:encoded><![CDATA[<h2>Background<br />
</h2>
<p>In earlier articles I&#8217;ve described howto <a href="http://www.it-slav.net/blogs/?p=596" target="_blank">install</a> mythbuntu and <a href="http://www.it-slav.net/blogs/?p=609" target="_blank">configure</a> the backend</p>
<p>In this article I assume that you have a workin Xbox with a quit new version of XBMC.</p>
<p><br class="spacer_" /></p>
<h3>Download xbmcmythtv<br />
</h3>
<p>The xbmcmythtv is not being maintained anymore so the version downloadable from <a href="http://sourceforge.net/projects/xbmcmythtv/" target="_blank">http://sourceforge.net/projects/xbmcmythtv/</a> does not work with newer versions of MythTV.</p>
<p>However, it is possible to grab a newer version by using CVS.</p>
<pre>cvs -d:pserver:anonymous@xbmcmythtv.cvs.sourceforge.net :/cvsroot/xbmcmythtv login
cvs -z3 -d:pserver:anonymous@xbmcmythtv.cvs.sourceforge.net:/cvsroot/xbmcmythtv co -P xbmcmythtv</pre>
<p>FTP it to your xbox  according to the README instructions.</p>
<p><br class="spacer_" /></p>
<h3>Configure MySQL<br />
</h3>
<p>The MySQL client that xbmcmythtv is using is not using the latest version of MySQL protocol, so you must tell MySQL that you will use the old style of password hash.</p>
<pre>CREATE USER 'xbox'@'%' IDENTIFIED BY 'xbox';
GRANT ALL ON mythconverg.* TO 'xbox'@'%';
set password for 'xbox'@'%' = OLD_PASSWORD('xbox');
</pre>
<h3>Setup the Xbox</h3>
<p>In the Myth TV menu:</p>
<p>Primary host    &lt;the ip of your backend host&gt;</p>
<p>Protocol     40</p>
<p>In the MySQL menu:</p>
<p>User:   xbox</p>
<p>Password: xbox</p>
<p><br class="spacer_" /></p>
<h3>Configure Samba</h3>
<p>xbmcmythtv uses a samba share to read the recorded TV-shows. I created a new samba share and used the default settings at the Xbox.</p>
<p>In /etc/samba.smb.conf</p>
<pre>[mythtv]</pre>
<pre>comment = MythTV Recordings</pre>
<pre>path = /var/lib/mythtv/recordings</pre>
<pre>public = yes</pre>
<pre>writable = no</pre>
<pre>create mask = 0777</pre>
<pre>directory mask = 0777</pre>
<pre>force user = nobody</pre>
<pre>force group = nogroup</pre>
<p><br class="spacer_" /></p>
<p><em>Congratultaions, now you should have a working MythTV setup <img src='http://www.it-slav.net/blogs/wp-includes/images/smilies/icon_lol.gif' alt=':lol:' class='wp-smiley' /> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2009/01/29/mythtv-xbox-frontend-part3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New MythTV system part 2 backend configuration</title>
		<link>http://www.it-slav.net/blogs/2009/01/28/new-mythtv-system-part-2-backend-configuration/</link>
		<comments>http://www.it-slav.net/blogs/2009/01/28/new-mythtv-system-part-2-backend-configuration/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 20:25:26 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[mythbuntu]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=609</guid>
		<description><![CDATA[Part1 can be found here.
Start

To configure the newly installed MythTV system run:
mythtv-setup
The settings will we be default if nothing else is mentioned.

1. General settings
In general settings change the Ip-adress from 127.0.0.1 to the real ip-adress. This makes it possible for a frontend system on the network to communicate with with the backend.
Security PIN: 0000 (means [...]]]></description>
			<content:encoded><![CDATA[<p>Part1 can be found <a href="http://www.it-slav.net/blogs/?p=596" target="_blank">here</a>.</p>
<h2>Start<br />
</h2>
<p>To configure the newly installed <a href="http://www.mythtv.org/" target="_blank">MythTV</a> system run:</p>
<pre>mythtv-setup</pre>
<p>The settings will we be default if nothing else is mentioned.</p>
<p><span id="more-609"></span></p>
<h3>1. General settings</h3>
<p>In general settings change the Ip-adress from 127.0.0.1 to the real ip-adress. This makes it possible for a frontend system on the network to communicate with with the backend.</p>
<p>Security PIN: 0000 (means no security)</p>
<p>TV format: choose the one you have, in my case PAL-BG</p>
<p>Channel frequency table: europe-west</p>
<p><br class="spacer_" /></p>
<h3>2.Capture cards</h3>
<p>This is were the TV card is configured. I did the mistake to use v4l Hauppgage PVR-350 driver which was the suggested driver. That did not work. Use MPEG Hauppgage PVR-350 driver instead where the builtin MPEG decoder will be used, thats why I could use such modest CPU PIII 800Mhz.</p>
<p><br class="spacer_" /></p>
<h3>3. Video sources</h3>
<p>When entering this menu, the mythtv system scans for grabbers. Unfortunately there is a timeout of 25 seconds and my hardware do not deliver the list of all grabbers in that time. The result is that no grabbers show up. The workaround is to move all the XMLTV grabbers to another directory except the one I will use:</p>
<pre>cd /usr/bin</pre>
<pre>sudo mkdir tv_grabbackup/</pre>
<pre>sudo mv tv_grab_* tv_grabbackup/</pre>
<pre>sudo mv tv_grabbackup/tv_grab_se_swedb .</pre>
<p>Name a new grabber i.e. Sweden and next.</p>
<p>Now the MythTV system appear to hang but with alt-tab you can change to a newly open terminal window.</p>
<p>Answer yes to all the channels you have.</p>
<p>In my case I found a list at http://www.comhem.se/ and it looked like this:</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<h3><span>Fasta kanaler</span></h3>
</td>
</tr>
<tr>
<td><span>SVT 1 Analog</span></td>
<td><span>VHF 5</span></td>
</tr>
<tr>
<td><span>SVT 2 Analog</span></td>
<td><span>VHF 7</span></td>
</tr>
<tr>
<td><span>TV4 Analog</span></td>
<td><span>VHF 6</span></td>
</tr>
<tr>
<td><span>Lokalkanal</span></td>
<td><span>VHF 9</span></td>
</tr>
<tr>
<td colspan="2">
<p><br class="spacer_" /></p>
<h3><span>Rörliga kanaler</span></h3>
</td>
</tr>
<tr>
<td><span>TV3</span></td>
<td><span>VHF 11</span></td>
</tr>
<tr>
<td><span>Kanal 5</span></td>
<td><span>S 11</span></td>
</tr>
<tr>
<td><span>TV4 Sport</span></td>
<td><span>S 17</span></td>
</tr>
<tr>
<td><span>Kanal 9</span></td>
<td><span>S 36</span></td>
</tr>
<tr>
<td><span>MTV</span></td>
<td><span>S 16</span></td>
</tr>
<tr>
<td><span>TV6</span></td>
<td><span>VHF 8</span></td>
</tr>
<tr>
<td colspan="2">
<p><br class="spacer_" /></p>
<h3><span>Radiokanaler</span></h3>
</td>
</tr>
<tr>
<td><span>Samtliga på FM-bandet mellan 87,0-108,0 MHz</span></td>
<td></td>
</tr>
<tr>
<td><span>P1</span></td>
<td></td>
</tr>
<tr>
<td><span>P2</span></td>
<td></td>
</tr>
<tr>
<td><span>P3</span></td>
<td></td>
</tr>
<tr>
<td><span>P4</span></td>
<td></td>
</tr>
<tr>
<td><span>Samt inom området förekommande närradio stationer</span></td>
<td></td>
</tr>
<tr>
<td colspan="2">
<p><br class="spacer_" /></p>
<h3><span>Extra kanaler</span></h3>
</td>
</tr>
<tr>
<td><span>SVT24</span></td>
<td><span>VHF 10</span></td>
</tr>
<tr>
<td><span>SVT Barn&amp;Kunskap</span></td>
<td><span>S 13</span></td>
</tr>
<tr>
<td><span>TV8</span></td>
<td><span>K57</span></td>
</tr>
<tr>
<td><span>FTV</span></td>
<td><span>S 12</span></td>
</tr>
<tr>
<td><span>TV4 Plus</span></td>
<td><span>S 14</span></td>
</tr>
<tr>
<td><span>Upplåten kanal</span></td>
<td><span>S 6</span></td>
</tr>
</tbody>
</table>
<p><br class="spacer_" /></p>
<h3>4. Input connections</h3>
<p>Choose the correct input hardware to the grabber, in my case:</p>
<p>MPEG: /dev/video0 (Tuner1) -&gt; Sweden</p>
<p><br class="spacer_" /></p>
<h3>5. Channel editor</h3>
<p>I managed to get my MythTV system to scan all the frequenses. The list created was not in the same format as the list from my Cable TV provider.</p>
<p>After analysing the list I figured out that the following channelnumbers matched the list above:</p>
<p>Kanal 5  SE11</p>
<p>Kanal 9  S36</p>
<p>MTV      SE16</p>
<p>TV4 Plus   SE14</p>
<p>TV4Sport  SE17</p>
<p>SVT1  E5</p>
<p>SVT2   E7</p>
<p>SVT 24   E10</p>
<p>SVT Kunskapskanalen/Barnkanalen   SE13</p>
<p>TV3   E11</p>
<p>TV4   E6</p>
<p>TV6   E8</p>
<p>Go in to every channel and enter the channelnumber.</p>
<p><br class="spacer_" /></p>
<h3>6.Storage Directories</h3>
<p>I did not change anything here</p>
<h2>Wrap it up<br />
</h2>
<p>After configured the mythtvbackend, run:</p>
<p>mythfilldatabase &#8211;manual</p>
<p>Answer default to all of the questions.</p>
<p><br class="spacer_" /></p>
<h3>MySQL access from the frontend to the backend</h3>
<p>The frontend must be able to access the MySQL running at the backend. To provide that run the following commands:</p>
<p>mysql -u root mythconverg<br />
 mysql&gt; grant all on mythconverg.* to mythtv@&#8221;%&#8221; identified by &#8220;mythtv&#8221;;<br />
 mysql&gt; flush privileges;</p>
<p><strong>Note</strong>: This will let any machine have access to your MythTV database and should only be used in a controlled environment.</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>Congratulations, now you have configured your MythTV backend system.</p>
<p>Next step will be configure the Xbox frontend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2009/01/28/new-mythtv-system-part-2-backend-configuration/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MythTV Success</title>
		<link>http://www.it-slav.net/blogs/2009/01/25/mythtv-success/</link>
		<comments>http://www.it-slav.net/blogs/2009/01/25/mythtv-success/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 21:45:13 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=614</guid>
		<description><![CDATA[After my hard disk crash, I&#8217;ve been struggling a couple of nights to get my MythTV system with a Xbox frontend working.
Tonight I managed to get every piece together and it works. It has been frustrating and quite painful to get it working, Google has been my friend,

A MythTV installation consist of many parts that [...]]]></description>
			<content:encoded><![CDATA[<p>After my hard <a href="http://www.it-slav.net/blogs/?p=589" target="_blank">disk crash</a>, I&#8217;ve been struggling a couple of nights to get my MythTV system with a Xbox frontend working.</p>
<p>Tonight I managed to get every piece together and it works. It has been frustrating and quite painful to get it working, Google has been my friend,</p>
<p><br class="spacer_" /></p>
<p>A MythTV installation consist of many parts that all must work i.e.:</p>
<ul>
<li>Tv record card with both driver and firmware, correctly configured in the MythTV backend</li>
<li>MySQL database that allow access from the frontend (including OLD style passwords)</li>
<li>XMLTV grabber to get a list of of the TV shows.</li>
<li>A list of what channel is broadcasted on what frequency or channel number</li>
<li>XBMC for the Xbox frontend</li>
<li>Xbmcmythtv that was downloaded via CVS</li>
<li>Correctly configured xbmcmythtv frontend</li>
</ul>
<p><br class="spacer_" /></p>
<p>I will post how I did it during this week, stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2009/01/25/mythtv-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New MythTV system part 1</title>
		<link>http://www.it-slav.net/blogs/2009/01/23/new-mythtv-system/</link>
		<comments>http://www.it-slav.net/blogs/2009/01/23/new-mythtv-system/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 07:52:27 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Cool things]]></category>
		<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[Hints]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=596</guid>
		<description><![CDATA[My MythTV systems root disk crashed so I need to reinstall it. I will keep my progress posted in this blog.
The Backend hardware:

IBM Desktop
PIII 800Mhz
512 Mb memory
120 Gb disk
Hauppauge PVR-350

The frontend hardware is an old Xbox, with XBMC.
I downloaded Mythbuntu and installed it on the MythTV backend system.
During boot my TV card was detected and [...]]]></description>
			<content:encoded><![CDATA[<p>My MythTV systems root disk <a href="http://www.it-slav.net/blogs/?p=589" target="_blank">crashed</a> so I need to reinstall it. I will keep my progress posted in this blog.</p>
<p>The Backend hardware:</p>
<ul>
<li>IBM Desktop</li>
<li>PIII 800Mhz</li>
<li>512 Mb memory</li>
<li>120 Gb disk</li>
<li>Hauppauge PVR-350</li>
</ul>
<p>The frontend hardware is an old Xbox, with XBMC.</p>
<p>I downloaded <a href="http://www.mythbuntu.org" target="_blank">Mythbuntu</a> and installed it on the MythTV backend system.</p>
<p>During boot my TV card was detected and the firmware was loaded, last time this took several nights to understand.</p>
<p><br class="spacer_" /></p>
<p>dmesg gives:</p>
<pre>--snipp--
[   18.764273] Linux video capture interface: v2.00
[   19.191631] ivtv:  Start initialization, version 1.4.0
[   19.191999] ivtv0: Initializing card #0
[   19.192060] ivtv0: Autodetected Hauppauge card (cx23415 based)
[   19.245036] ivtv 0000:01:0d.0: enabling device (0000 -&gt; 0002)
[   19.245073] ivtv 0000:01:0d.0: PCI INT A -&gt; GSI 21 (level, low) -&gt; IRQ 21
[   19.245098] ivtv 0000:01:0d.0: setting latency timer to 64
[   19.299891] tveeprom 0-0050: Hauppauge model 48134, rev J347, serial# 2756181
[   19.299905] tveeprom 0-0050: tuner model is LG TP18PSB01D (idx 47, type 28)
[   19.299915] tveeprom 0-0050: TV standards PAL(B/G) (eeprom 0x04)
[   19.299925] tveeprom 0-0050: audio processor is MSP4418 (idx 25)
[   19.299935] tveeprom 0-0050: decoder processor is SAA7115 (idx 19)
[   19.299944] tveeprom 0-0050: has radio, has IR receiver, has no IR transmitter
[   19.299954] ivtv0: Autodetected Hauppauge WinTV PVR-350</pre>
<pre>--snip--</pre>
<pre>[   21.864260] saa7127 0-0044: saa7127 found @ 0x88 (ivtv i2c driver #0)
[   21.888601] msp3400 0-0040: MSP4418G-A2 found @ 0x80 (ivtv i2c driver #0)
[   21.888614] msp3400 0-0040: msp3400 supports nicam and radio, mode is autodetect and autoselect
[   21.898458] tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)
[   22.203952] tuner-simple 0-0061: creating new instance
[   22.203968] tuner-simple 0-0061: type set to 28 (LG PAL_BG+FM (TPI8PSB01D))
[   22.217306] ivtv0: Registered device video0 for encoder MPG (4096 kB)
[   22.217591] ivtv0: Registered device video32 for encoder YUV (2048 kB)
[   22.217780] ivtv0: Registered device vbi0 for encoder VBI (1024 kB)
[   22.217962] ivtv0: Registered device video24 for encoder PCM (320 kB)
[   22.218140] ivtv0: Registered device radio0 for encoder radio
[   22.218319] ivtv0: Registered device video16 for decoder MPG (1024 kB)
[   22.218489] ivtv0: Registered device vbi8 for decoder VBI (64 kB)
[   22.218661] ivtv0: Registered device vbi16 for decoder VOUT
[   22.218875] ivtv0: Registered device video48 for decoder YUV (1024 kB)
[   22.218886] ivtv0: Initialized card #0: Hauppauge WinTV PVR-350
[   22.220588] ivtv:  End initialization
--snipp--</pre>
<pre>[   46.100093] firmware: requesting v4l-cx2341x-enc.fw
[   46.423446] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
[   46.423590] firmware: requesting v4l-cx2341x-dec.fw
[   46.567632] ivtv0: Loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
[   46.764454] ivtv0: Encoder revision: 0x02060039
[   46.764597] ivtv0: Decoder revision: 0x02020023
[   46.831434] firmware: requesting v4l-cx2341x-init.mpg
[   46.939513] ivtv0: Loaded v4l-cx2341x-init.mpg firmware (155648 bytes)</pre>
<p>The next step is to configure my newly installed system.<br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2009/01/23/new-mythtv-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AAAAARGH my MythTV system crashed</title>
		<link>http://www.it-slav.net/blogs/2009/01/21/aaaaargh-my-mythtv-system-crashed/</link>
		<comments>http://www.it-slav.net/blogs/2009/01/21/aaaaargh-my-mythtv-system-crashed/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 22:54:47 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[Geek stuff]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://www.it-slav.net/blogs/?p=589</guid>
		<description><![CDATA[The most critical system in my home crashed today. The root disk of my MythTV system give me strange sounds and the BIOS does not detect that the harddrive is connected.
]]></description>
			<content:encoded><![CDATA[<p>The most critical system in my home crashed today. The root disk of my MythTV system give me strange sounds and the BIOS does not detect that the harddrive is connected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-slav.net/blogs/2009/01/21/aaaaargh-my-mythtv-system-crashed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
