{"id":1044,"date":"2018-10-02T22:39:30","date_gmt":"2018-10-02T21:39:30","guid":{"rendered":"http:\/\/www.bulis.co.uk\/?page_id=1044"},"modified":"2018-10-03T02:19:45","modified_gmt":"2018-10-03T01:19:45","slug":"kodi-tutorial-programming-lirc","status":"publish","type":"page","link":"http:\/\/www.bulis.co.uk\/?page_id=1044","title":{"rendered":"Kodi Tutorial: Programming LIRC"},"content":{"rendered":"<h2>What Is LIRC?<\/h2>\n<p>LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-755 alignright\" src=\"http:\/\/www.bulis.co.uk\/wp-content\/uploads\/2018\/09\/image8.png\" alt=\"\" width=\"300\" height=\"300\" \/><\/p>\n<h3><strong>Any Old Remote Control<\/strong><\/h3>\n<p>The last option is to make use of an existing remote control you have lying around the house, but this requires a bit of soldering and wiring to the internal GPIO (General Purpose Input Output) pins of the Raspberry Pi and also requires LIRC (Linux Infrared Remote Control). LIRC is a mature and stable open source library that provides the ability to send and receive IR commands.<\/p>\n<p>Wiring the Infrared Receiver to the Raspberry Pi, The Vishay TSOP31438 has 3 pins:<\/p>\n<ul>\n<li>Pin1 is DATA, goes to RPi pin 12 (GPIO 18)<\/li>\n<li>Pin2 is GND, goes to RPi pin 6 (GROUND)<\/li>\n<li>Pin3 is POWER, goes to RPi pin 1 (3.3V)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Connect to the Raspberry Pi using SSH (I use putty download from <a href=\"https:\/\/the.earth.li\/~sgtatham\/putty\/latest\/w32\/putty.exe\">here<\/a>) and type hostname as <strong>osmc<\/strong> (or the IP address of the Pi) connecting to port <strong>22<\/strong> and then click \u2018<em>Open\u2019<\/em> if you get a security warning click onto \u2018<em>Yes<\/em>\u2019 to except:<\/p>\n<div class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1045\" src=\"http:\/\/www.bulis.co.uk\/wp-content\/uploads\/2018\/10\/image132.png\" alt=\"\" width=\"456\" height=\"436\" \/><\/div>\n<p>This will present a shell command on the Raspberry Pi. Login using the default settings username <strong>osmc<\/strong> and password <strong>osmc<\/strong>:<\/p>\n<div class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-1046\" src=\"http:\/\/www.bulis.co.uk\/wp-content\/uploads\/2018\/10\/image133.png\" alt=\"\" width=\"640\" height=\"400\" \/><\/div>\n<p>At the command prompt type:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nIrrecord -\u2013list-namespace\r\n<\/pre>\n<p>This will display a list of available names used to record the keystrokes sent from the IR remote control. Compare the names in this list to the buttons on your remote once you have a list of names that correspond with the buttons we are ready to begin mapping. At the command prompt type:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo \/etc\/init.d\/lirc stop\r\n<\/pre>\n<p>This stops the LIRC service to free up \/dev\/lirc0<\/p>\n<p>Type the following to start recording of key presses:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nIrrecord \u2013d \/dev\/lirc0 ~\/lircd.conf\r\n<\/pre>\n<p>&nbsp;<\/p>\n<div class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-1049\" src=\"http:\/\/www.bulis.co.uk\/wp-content\/uploads\/2018\/10\/image134.png\" alt=\"\" width=\"640\" height=\"613\" \/><\/div>\n<p>Press Return to start recording of key strokes.<\/p>\n<p>Type the name of each key stroke followed by the return key.<\/p>\n<p>KEY_STOP<\/p>\n<p>Now point the remote press and hold the corresponding button:<\/p>\n<div class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-1050\" src=\"http:\/\/www.bulis.co.uk\/wp-content\/uploads\/2018\/10\/image135.png\" alt=\"\" width=\"640\" height=\"400\" \/><\/div>\n<p>Do this for each button in turn. Once you have finished press \u2018Return\u2019 this will save the new configuration file.<br \/>\nNext we make a copy of the old lircd.conf file:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo cp lircd.conf lircd-old.conf\r\n<\/pre>\n<p>Now delete the old lircd.conf file:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo rm lircd.conf\r\n<\/pre>\n<p>Make a copy of the lircd.conf.conf file:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo cp lircd.conf.conf lircd.conf\r\n<\/pre>\n<p>Now delete the old lircd.conf.conf file:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo rm lircd.conf.conf\r\n<\/pre>\n<p>Reboot to apply the new changes:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo reboot\r\n<\/pre>\n<p>When the raspberry pi reboots wait for the lirc connection to apply and now your remote should start working.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What Is LIRC? LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls. Any Old Remote Control The last option is to make use of an existing remote control you have lying around the house, but this requires a bit of soldering and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":59,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kodi Tutorial: Programming LIRC - Phantom Raspberry Blower<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.bulis.co.uk\/?page_id=1044\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kodi Tutorial: Programming LIRC - Phantom Raspberry Blower\" \/>\n<meta property=\"og:description\" content=\"What Is LIRC? LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls. Any Old Remote Control The last option is to make use of an existing remote control you have lying around the house, but this requires a bit of soldering and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.bulis.co.uk\/?page_id=1044\" \/>\n<meta property=\"og:site_name\" content=\"Phantom Raspberry Blower\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-03T01:19:45+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.bulis.co.uk\/wp-content\/uploads\/2018\/09\/image8.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.bulis.co.uk\/?page_id=1044\",\"url\":\"http:\/\/www.bulis.co.uk\/?page_id=1044\",\"name\":\"Kodi Tutorial: Programming LIRC - Phantom Raspberry Blower\",\"isPartOf\":{\"@id\":\"http:\/\/www.bulis.co.uk\/#website\"},\"datePublished\":\"2018-10-02T21:39:30+00:00\",\"dateModified\":\"2018-10-03T01:19:45+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.bulis.co.uk\/?page_id=1044#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.bulis.co.uk\/?page_id=1044\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.bulis.co.uk\/?page_id=1044#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.bulis.co.uk\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"http:\/\/www.bulis.co.uk\/?page_id=57\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Kodi Tutorials\",\"item\":\"http:\/\/www.bulis.co.uk\/?page_id=59\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Kodi Tutorial: Programming LIRC\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.bulis.co.uk\/#website\",\"url\":\"http:\/\/www.bulis.co.uk\/\",\"name\":\"Phantom Raspberry Blower\",\"description\":\"Blowing Raspberrys since 1989\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.bulis.co.uk\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kodi Tutorial: Programming LIRC - Phantom Raspberry Blower","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.bulis.co.uk\/?page_id=1044","og_locale":"en_GB","og_type":"article","og_title":"Kodi Tutorial: Programming LIRC - Phantom Raspberry Blower","og_description":"What Is LIRC? LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls. Any Old Remote Control The last option is to make use of an existing remote control you have lying around the house, but this requires a bit of soldering and [&hellip;]","og_url":"http:\/\/www.bulis.co.uk\/?page_id=1044","og_site_name":"Phantom Raspberry Blower","article_modified_time":"2018-10-03T01:19:45+00:00","og_image":[{"url":"http:\/\/www.bulis.co.uk\/wp-content\/uploads\/2018\/09\/image8.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.bulis.co.uk\/?page_id=1044","url":"http:\/\/www.bulis.co.uk\/?page_id=1044","name":"Kodi Tutorial: Programming LIRC - Phantom Raspberry Blower","isPartOf":{"@id":"http:\/\/www.bulis.co.uk\/#website"},"datePublished":"2018-10-02T21:39:30+00:00","dateModified":"2018-10-03T01:19:45+00:00","breadcrumb":{"@id":"http:\/\/www.bulis.co.uk\/?page_id=1044#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.bulis.co.uk\/?page_id=1044"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.bulis.co.uk\/?page_id=1044#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.bulis.co.uk\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"http:\/\/www.bulis.co.uk\/?page_id=57"},{"@type":"ListItem","position":3,"name":"Kodi Tutorials","item":"http:\/\/www.bulis.co.uk\/?page_id=59"},{"@type":"ListItem","position":4,"name":"Kodi Tutorial: Programming LIRC"}]},{"@type":"WebSite","@id":"http:\/\/www.bulis.co.uk\/#website","url":"http:\/\/www.bulis.co.uk\/","name":"Phantom Raspberry Blower","description":"Blowing Raspberrys since 1989","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.bulis.co.uk\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/1044"}],"collection":[{"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1044"}],"version-history":[{"count":0,"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/1044\/revisions"}],"up":[{"embeddable":true,"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/59"}],"wp:attachment":[{"href":"http:\/\/www.bulis.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}