{"id":471,"date":"2009-06-25T08:49:02","date_gmt":"2009-06-25T07:49:02","guid":{"rendered":"http:\/\/www.dotmana.com\/index.php\/?p=471"},"modified":"2009-07-08T09:07:30","modified_gmt":"2009-07-08T08:07:30","slug":"moovida-ati-remote-lirc","status":"publish","type":"post","link":"http:\/\/www.dotmana.com\/weblog\/2009\/06\/moovida-ati-remote-lirc\/","title":{"rendered":"Moovida + Ati Remote + Lirc"},"content":{"rendered":"<p>Some help about setting up moovida with ati remote wonder and lirc.<\/p>\n<p>Moovida is a great piece of software, but the documentation is pretty&#8230;\u00a0 hidden.<\/p>\n<p><!--more--><\/p>\n<p>The best way to get your ati remote recognised by lirc, is to start with Mythbuntu (this release install lirc by default).<\/p>\n<p>Then, follow these instructions (inspired and adapted from <a target=\"_blank\" href=\"http:\/\/www.mythtv.org\/wiki\/ATI_Remote_Wonder#Mythbuntu_8.10\">http:\/\/www.mythtv.org\/wiki\/ATI_Remote_Wonder#Mythbuntu_8.10<\/a>) :<\/p>\n<blockquote><p>1. Blacklist ati_remote by adding the line &#8220;blacklist ati_remote in \/etc\/modprobe.d\/blacklist.conf<br \/>\n2. Unplug the IR receiver<br \/>\n3. Plug in the USB receiver back in<br \/>\n4. Type in &#8220;lsmod | grep -i ati&#8221;.  The output should look something like this:<\/p>\n<pre>lirc_atiusb            21408  0\r\nlirc_dev               18548  1 lirc_atiusb<\/pre>\n<p>&#8220;lirc_atiusb&#8221; is the module for the ATI USB Wonder remote<\/p>\n<p>5. Copy the contents of the example lircd.conf config file below to \/etc\/lirc\/lircd.conf<br \/>\n6. Restart lirc from a terminal window with the following command:<\/p>\n<pre>\/etc\/init.d\/lirc restart<\/pre>\n<p>7. Verify it is running.  This should return a line with &#8220;lircd&#8221; in it besides the &#8216;grep&#8217; line<\/p>\n<pre>ps -ef | grep lircd<\/pre>\n<p>8. Run &#8220;irw&#8221; from a terminal and press any button on your remote. If the mappings are correct, you should see output for each button you press.<em> <\/em><\/p><\/blockquote>\n<blockquote><p>9. Restart the machine.<\/p><\/blockquote>\n<p>Ok, now your remote controller is configured, you need to generate a map of keys specific to your remote ati..<\/p>\n<p style=\"margin-left: 40px\">0. sudo su<\/p>\n<p style=\"margin-left: 40px\">1.\u00a0       cd \/usr\/share\/pyshared\/elisa\/plugins\/lirc\/<\/p>\n<p style=\"margin-left: 40px\">2.\u00a0 wget http:\/\/launchpadlibrarian.net\/20602414\/elisa-plugins-lirc-safe-setup_lirc.patch<\/p>\n<p style=\"margin-left: 40px\">3. patch -p0 < .\/elisa-plugins-lirc-safe-setup_lirc.patch3 (you probably need to give the right path to setup_lirc.py)<\/p>\n<p style=\"margin-left: 40px\">4. python setup_lirc.py map_files\/atiwonder.map (and follow the wizard)<\/p>\n<p>Ok, now you need to tweak moovida with configuration<\/p>\n<p style=\"margin-left: 40px\">1. pico\u00a0 ~\/.moovida\/moovida.conf<\/p>\n<p style=\"margin-left: 40px\">2. your lirc config in this file should be like this :<\/p>\n<p style=\"margin-left: 40px\">[lirc.lirc_input:LircInput]<br \/>\n# the lirc deamon device<br \/>\ndevice = &#8216;\/dev\/lircd&#8217;<br \/>\n# Time in seconds to wait before taking intoaccount a first repeated input<br \/>\n# event.<br \/>\nrepeat_delay = &#8216;0.5&#8217;<br \/>\n# Path to the file containing the lirc mapping<br \/>\ninput_map = &#8216;\/usr\/share\/pyshared\/elisa\/plugins\/lirc\/map_files\/atiwonder.map&#8217;<br \/>\nOk, now add a bit of code to avoid double key events when you press a touch on your remote controller<\/p>\n<p style=\"margin-left: 40px\">1. pico\u00a0 \/usr\/share\/pyshared\/elisa\/plugins\/lirc\/lirc_input.py<\/p>\n<div style=\"margin-left: 40px\">2. search for &#8220;def _got_event(self, hex_key, repeat, key_value, remote)&#8221;<\/div>\n<div style=\"margin-left: 40px\" \/>\n<div style=\"margin-left: 40px\">3. add :<\/div>\n<div style=\"margin-left: 80px\">def _got_event(self, hex_key, repeat, key_value, remote)<\/div>\n<div style=\"margin-left: 40px\" \/>\n<div style=\"margin-left: 40px\">\n<div style=\"margin-left: 40px\">repeat = int(repeat, 16)<\/div>\n<div style=\"margin-left: 40px\">if repeat % 3 != 0:<\/div>\n<p>return<\/p>\n<p>now = time.time()<br \/>\nif key_value == self._first_key_value:<br \/>\n# skip first repeat for a certain amount of time<br \/>\nif (now &#8211; self._first_key_time) < self.repeat_delay:\nreturn<\/div>\n<p>Ok, you can test moovida with &#8220;moovida&#8221; command.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some help about setting up moovida with ati remote wonder and lirc. Moovida is a great piece of software, but the documentation is pretty&#8230;\u00a0 hidden.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-471","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/comments?post=471"}],"version-history":[{"count":0,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/471\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/media?parent=471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/categories?post=471"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/tags?post=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}