{"id":637,"date":"2014-05-07T06:55:04","date_gmt":"2014-05-07T05:55:04","guid":{"rendered":"http:\/\/www.1st-setup.nl\/wordpress\/?page_id=637"},"modified":"2014-05-07T06:55:27","modified_gmt":"2014-05-07T05:55:27","slug":"lirc_client-module-for-nodejs","status":"publish","type":"page","link":"http:\/\/www.1st-setup.nl\/wordpress\/poducten\/lirc_client-module-for-nodejs\/","title":{"rendered":"lirc_client module for nodejs"},"content":{"rendered":"<p>Ever wanted to process infrared commands in your nodejs program. Now this is possible using the famous <a href=\"http:\/\/www.lirc.org\">lirc<\/a> interface on operating systems supporting lirc.<\/p>\n<p>Try the <strong>lirc_client<\/strong> nodejs module:<\/p>\n<p><code>npm install lirc_client<\/code><\/p>\n<p>Or download the sources from github: <a href=\"https:\/\/github.com\/1stsetup\/node-lirc_client\">https:\/\/github.com\/1stsetup\/node-lirc_client<\/a><\/p>\n<p>It will require nodejs version &gt;= 0.10.0 and to compile it you need the development files\/packages of lirc.<\/p>\n<p>When you see issues with it please post them to <a href=\"https:\/\/github.com\/1stsetup\/node-lirc_client\/issues\">https:\/\/github.com\/1stsetup\/node-lirc_client\/issues<\/a><\/p>\n<p>Following is an example of the code<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">var lirc_client = require('lirc_client');\r\n\r\ntry {\r\n    var client = new lirc_client.client(&quot;clienttest&quot;, true);\r\n    client.on(&quot;data&quot;, function(data) {\r\n        console.log(&quot;Received data from lirc:&quot;,data);\r\n        client.close();\r\n    });\r\n    client.on(&quot;closed&quot;, function() {\r\n        console.log(&quot;Lirc daemon closed our connection. We need to reconnect.&quot;);\r\n    });\r\n    console.log(&quot;client.isConnected:&quot;, client.isConnected);\r\n    console.log(&quot;client.mode:&quot;, client.mode);\r\n}\r\ncatch (err) {\r\n    console.log(&quot;Error on new client:&quot;,err);\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ever wanted to process infrared commands in your nodejs program. Now this is possible using the famous lirc interface on operating systems supporting lirc. Try the lirc_client nodejs module: npm install lirc_client Or download the sources from github: https:\/\/github.com\/1stsetup\/node-lirc_client It &hellip; <a href=\"http:\/\/www.1st-setup.nl\/wordpress\/poducten\/lirc_client-module-for-nodejs\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":18,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ngg_post_thumbnail":0},"_links":{"self":[{"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/pages\/637"}],"collection":[{"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/comments?post=637"}],"version-history":[{"count":4,"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/pages\/637\/revisions"}],"predecessor-version":[{"id":641,"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/pages\/637\/revisions\/641"}],"up":[{"embeddable":true,"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/pages\/18"}],"wp:attachment":[{"href":"http:\/\/www.1st-setup.nl\/wordpress\/wp-json\/wp\/v2\/media?parent=637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}