1stsetup / node-lirc_client

NodeJS add-on to communicate with the lirc_client
GNU General Public License v2.0
2 stars 2 forks source link

Cant install #1

Open Aurimaslu opened 10 years ago

Aurimaslu commented 10 years ago

npm install lirc_client not working for me i get error:

npm http GET https://registry.npmjs.org/lirc_client npm http 304 https://registry.npmjs.org/lirc_client

lirc_client@1.0.0 install /home/pi/node_modules/lirc_client node-gyp rebuild

make: Entering directory /home/pi/node_modules/lirc_client/build' CXX(target) Release/obj.target/lirc_client/src/lirc_client.o ../src/lirc_client.cc:1:30: fatal error: lirc/lirc_client.h: No such file or directory compilation terminated. make: *** [Release/obj.target/lirc_client/src/lirc_client.o] Error 1 make: Leaving directory/home/pi/node_modules/lirc_client/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/opt/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:757:12) gyp ERR! System Linux 3.6.11+ gyp ERR! command "node" "/opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/node_modules/lirc_client gyp ERR! node -v v0.10.2 gyp ERR! node-gyp -v v0.9.3 gyp ERR! not ok npm ERR! lirc_client@1.0.0 install: node-gyp rebuild npm ERR! sh "-c" "node-gyp rebuild" failed with 1 npm ERR! npm ERR! Failed at the lirc_client@1.0.0 install script. npm ERR! This is most likely a problem with the lirc_client package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls lirc_client npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.6.11+ npm ERR! command "/opt/node/bin/node" "/opt/node/bin/npm" "install" "lirc_client" npm ERR! cwd /home/pi/app/manoexpress npm ERR! node -v v0.10.2 npm ERR! npm -v 1.2.15 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/pi/app/manoexpress/npm-debug.log npm ERR! not ok code 0

1stsetup commented 10 years ago

You need to install the lirc_client dev package for your system. See requirements. Which linux distribution are you using?

Aurimaslu commented 10 years ago

I am using raspbian os

1stsetup commented 10 years ago

Then as user pi do: sudo apt-get install liblircclient-dev

This will install the required header files.

Aurimaslu commented 10 years ago

Thanks, its work. How o can receive signal from emitter?

1stsetup commented 10 years ago

Please try example mentioned on "https://github.com/1stsetup/node-lirc_client"

With this module you can only receive lirc command and respond on them in your code. You cannot send commands with this module. There are other nodejs modules with which you can send ir commands.

Aurimaslu commented 10 years ago

I try, but i can't understand lirc_client.connect("testone", true, "test1.lircrc",function(type, data, configFile) what is "testone" and "test1.lircrc"

1stsetup commented 10 years ago

Do you have a working lirc setup? Did you create a "lircrc" file?

"testone" is the name of your program attribute in the "lircrc" file you are using. Change "test1.lircrc" into the filename of your "lircrc" file. This could be "~/.lircrc" or "/etc/lirc/lirc.lircrc" or another file you created yourself.

Please see page "http://www.lirc.org/html/configure.html#lircrc_format" for more info on this part.

Aurimaslu commented 10 years ago

No, but i need it ? I want make like sensor IR. Always IR led is lighting and then signal catch receiver, it alert me about that.