<?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>dopefish.de &#187; ir blaster</title>
	<atom:link href="http://www.dopefish.de/archives/tag/ir-blaster/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dopefish.de</link>
	<description>Headquaters of the evil genius</description>
	<lastBuildDate>Wed, 01 Sep 2010 20:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Mythtv and IR Blaster</title>
		<link>http://www.dopefish.de/archives/591</link>
		<comments>http://www.dopefish.de/archives/591#comments</comments>
		<pubDate>Sun, 24 Jan 2010 15:19:45 +0000</pubDate>
		<dc:creator>dopefish</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[ir blaster]]></category>
		<category><![CDATA[MythTV]]></category>

		<guid isPermaLink="false">http://www.dopefish.de/?p=591</guid>
		<description><![CDATA[We use a set-top-box as the video source for mythtv. And while this works perfectly fine, we have to manually make sure the right channel is set for what mythtv wants to record. This can turn out to being a pain at time, especially when multiple things are planned to be recorded on different channels. [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.dopefish.de/archives/591&amp;layout=standard&amp;show_faces=true&amp;width=460&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:460px; height:26px'></iframe></p><p>We use a set-top-box as the video source for <a href="http://www.mythtv.org/">mythtv</a>. And while this works perfectly fine, we have to manually make sure the right channel is set for what mythtv wants to record. This can turn out to being a pain at time, especially when multiple things are planned to be recorded on different channels. So I went and ordered a IR transmitter from <a href="http://www.irblaster.info/">irblaster.info</a> to give mythtv the possibility to change channels itself.</p>
<p>Since a bunch of the infos I found online were a bit out dated, here are a few tips for anyone using current versions of the software (I&#8217;ve got mythtv-backend 0.22 and lirc 0.8.4a running on a mythbuntu based system when I wrote this)</p>
<p>Hardware is easy to set up, just plug it into a free serial port.<br />
1st we will head over to <a href="http://lirc.sourceforge.net/remotes/">http://lirc.sourceforge.net/remotes/</a> and grab the file for our reciever set-top-box if we don&#8217;t already have them.<br />
Then go edit /etc/lirc/hardware.conf and add the transmitter settings, these were mine:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow"><ol><li><span style="color: #007800;">TRANSMITTER</span>=<span style="color: #ff0000;">&quot;Skymaster_XL10&quot;</span></li><li><span style="color: #007800;">TRANSMITTER_MODULES</span>=<span style="color: #ff0000;">&quot;lirc_dev lirc_serial&quot;</span></li><li><span style="color: #007800;">TRANSMITTER_DRIVER</span>=<span style="color: #ff0000;">&quot;&quot;</span></li><li><span style="color: #007800;">TRANSMITTER_DEVICE</span>=<span style="color: #ff0000;">&quot;/dev/lirc1&quot;</span></li><li><span style="color: #007800;">TRANSMITTER_LIRCD_CONF</span>=<span style="color: #ff0000;">&quot;skymaster/XL10&quot;</span></li><li><span style="color: #007800;">TRANSMITTER_LIRCD_ARGS</span>=<span style="color: #ff0000;">&quot;&quot;</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
now include the reciever settings to /etc/lirc/lircd.conf<br />
I edited my /etc/init.d/lirc to execute the following line before starting the daemon (was needed to ensure the lirc_serial module can be loaded):<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">setserial</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ttyS0 uart none</li></ol></div></pre><!--END_DEVFMTCODE--><br />
Restart lircd and you can then start testing if transmitting codes work with irsend works. here is a little wrapper script I wrote around irsend for mythtv to use. You may have to twiddle around with the sleeps and change the $Remote to your reciever. If the sleeps are too long (-> the script takes to long to finish switching channels), then mythtv will timeout and not display live tv.</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow"><ol><li><span style="color: #666666; font-style: italic;">#!/bin/bash</span></li><li>&nbsp;</li><li><span style="color: #007800;">Remote</span>=<span style="color: #ff0000;">&quot;Skymaster_XL10&quot;</span></li><li>&nbsp;</li><li><span style="color: #007800;">send</span>=<span style="color: #ff0000;">&quot;irsend -d /dev/lircd1 SEND_ONCE&quot;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(echo $1|grep -c &quot;^[0-9]&quot;)</span>&quot;</span> = <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></li><li><span style="color: #000000; font-weight: bold;">then</span> <span style="color: #666666; font-style: italic;"># non-numeric command</span></li><li>&nbsp;&nbsp;<span style="color: #007800;">$send</span> <span style="color: #007800;">$Remote</span> <span style="color: #007800;">$1</span></li><li><span style="color: #000000; font-weight: bold;">else</span> <span style="color: #666666; font-style: italic;"># numeric</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">for</span> digit <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/./&amp; /g'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">do</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #007800;">$send</span> <span style="color: #007800;">$Remote</span> <span style="color: #007800;">$digit</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1.5</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">done</span></li><li><span style="color: #000000; font-weight: bold;">fi</span></li><li><span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">2</span></li></ol></div></pre><!--END_DEVFMTCODE--><br />
If everything is working fine, then go ahead and tell mythtv to use the script to change channels. This is done in the tuner card setup of mythtv-backend (mythtv-setup). </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dopefish.de/archives/591/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.dopefish.de @ 2010-09-10 16:50:32 by W3 Total Cache -->