forked from alexbain/lirc_web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
54 lines (54 loc) · 6.5 KB
/
package.json
File metadata and controls
54 lines (54 loc) · 6.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"name": "lirc_node",
"version": "0.0.1",
"description": "Control LIRC from Node",
"main": "lib/lirc_node.js",
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "git://github.com/alexbain/lirc_node.git"
},
"keywords": [
"lirc"
],
"dependencies": {
"q": "*"
},
"devDependencies": {
"mocha": "*",
"should": "*",
"sinon": "*"
},
"author": {
"name": "Alex Bain",
"email": "alex@alexba.in"
},
"readme": "lirc_node\n=========\n\n``lirc_node`` is an npm module that acts as a very thin shim between\n[LIRC](http://lirc.org) and Node.\n\nIt's designed to be used in a situation where you wish to control infrared\ndevices using LIRC from a Node application.\n\n## What is this?\n\nLIRC is a fantastic open source software package that allows you to send and\nreceive infrared commands from Linux. It comes with a number of command line\nexecutables that can be called to accomplish this.\n\nThis module provides a wrapper around certain LIRC command line executables so\nthat you can make LIRC calls from within a NodeJS app. At this time (v0.0.1) the\nonly excutable that has a wrapper is ``irsend``. [irsend](http://www.lirc.org/html/irsend.html)\nis used to send infrared commands. I have attempted to emulate every option and\ncommand that ``irsend`` currently documents on it's API page. There is a full\ntest suite that can be ran to ensure that these options and commands work correctly.\n\nIn a future version I hope to add support for calling additional LIRC executables.\nI have my eye on being able to call the ``irrecord`` executable from NodeJS to\nteach LIRC new remotess / commands from a Node app. Given that ``irrecord`` requires\nsome back and forth via the command line I haven't attempted it just yet. If you,\nthe awesome developer reading this, has any ideas please don't hesitate\nto email me or take a stab at it yourself.\n\n\n## Why does this exist?\n\nI wrote this module as part of a personal project to make a completely open\nhardware and open source universal remote. I was frustrated at existing solutions\nthat were closed source and didn't allow me to extend upon or improve them.\n\nIf you're interested in seeing an example of this module in use please check\nout the [Open Source Universal Remote](http://opensourceuniversalremote.com) project.\nThis project contains an example application that uses this module in a NodeJS app.\n\n## How do I use it?\n\nI recommend checking out the [Open Source Universal Remote](http://opensourceuniversalremote.com)\nproject to see an example implementation.\n\nThe ``lirc_node`` module will only discover remotes and commands that LIRC already\nknows about. You'll need to program those remotes and commands using the ``irrecord``\nutility. If this sounds like gibberish to you, I'd recommend reading about\n[LIRC](http://www.lirc.org/) and [irrecord](http://www.lirc.org/html/irrecord.html)\nbefore proceeding.\n\nHere is a very simple example of how to use the ``lirc_node`` module in\na node app. I recommend reading through the source code for full details or to\nanswer any ambiguities. There are additional options that are not shown here.\n\n lirc_node = require('lirc_node');\n lirc_node.init();\n\n // To see all of the remotes and commands that LIRC knows about:\n console.log(lirc_node.remotes);\n\n /*\n Let's pretend that the output of lirc_node.remotes looks like this:\n\n {\n \"tv\": [\"Power\", \"VolumeUp\", \"VolumeDown\"],\n \"xbox360\": [\"Power\", \"A\", \"B\"]\n }\n */\n\n // Tell the TV to turn on\n lirc_node.irsend.send_once(\"tv\", \"power\", function() {\n console.log(\"Sent TV power command!\");\n });\n\n // Tell the Xbox360 to turn on\n lirc_node.irsend.send_once(\"xbox360\", \"power\", function() {\n console.log(\"Sent Xbox360 power command!\");\n });\n\n\n## Development\n\nWould you like to contribute to and improve this module? Fantastic. To contribute\npatches, run tests or benchmarks, make sure to clone the repository:\n\n```\ngit clone git://github.com/alexbain/lirc_node.git\n```\n\nThen:\n\n```\ncd lirc_node\nnpm install\n```\n\nYou can run the test suite by running:\n\n```\nmake test\n```\n\n## Contributing\n\nBefore you submit a pull request with your change, please be sure to:\n\n* Add new tests that prove your change works as expected.\n* Ensure all existing tests are still passing.\n\nOnce you're sure everything is still working, open a pull request with a clear\ndescription of what you changed and why. I will not accept a pull request which\nbreaks existing tests or adds new functionality without tests.\n\nThe exception to this would be refactoring existing code or changing documentation.\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2013 Alex Bain <alex@alexba.in>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"readmeFilename": "README.md",
"_id": "lirc_node@0.0.1",
"dist": {
"shasum": "f1eb8841dbc125cddf62476000497b8a34e1187b",
"tarball": "http://registry.npmjs.org/lirc_node/-/lirc_node-0.0.1.tgz"
},
"_npmVersion": "1.1.65",
"_npmUser": {
"name": "alexbain",
"email": "alex@alexba.in"
},
"maintainers": [
{
"name": "alexbain",
"email": "alex@alexba.in"
}
],
"directories": {},
"_shasum": "f1eb8841dbc125cddf62476000497b8a34e1187b",
"_resolved": "https://registry.npmjs.org/lirc_node/-/lirc_node-0.0.1.tgz",
"_from": "lirc_node@*",
"bugs": {
"url": "https://github.com/alexbain/lirc_node/issues"
},
"homepage": "https://github.com/alexbain/lirc_node#readme"
}