monteslu / node-red-contrib-gpio

A set of node-red nodes for connecting to johnny-five IO Plugins
MIT License
41 stars 31 forks source link

missing module #9

Closed Vebryn closed 8 years ago

Vebryn commented 8 years ago

Hi,

This node is very interesting, I will be able to manage my home automation using it :)

When Node-RED starts, nodebot displays an error :

[nodebot:80c4626b.ea04b8] error loading io class

When I add a gpio node, I see an error related to a missing module :

[warn] [gpio in:ffab0e7.a47467] Error: Cannot find module '../build/Release/addon'

I use Node.js v4.2.1, Node-RED v0.13.2, Raspi-io v5.3.0.

When I look at my node_modules dir, 4 files match to addon pattern :

/usr/local/lib/node_modules$ find -regex .Release/addon. ./raspi-io/node_modules/raspi-pwm/build/Release/addon.node ./raspi-io/node_modules/raspi-pwm/build/Release/.deps/Release/addon.node.d ./raspi-io/node_modules/raspi-gpio/build/Release/addon.node ./raspi-io/node_modules/raspi-gpio/build/Release/.deps/Release/addon.node.

Any idea ?

Best regards.

monteslu commented 8 years ago

@Vebryn you might need to sudo npm i raspi-io you also might need to run node-red as root.

Are you using the latest raspian?

This might also help: https://github.com/rwaldron/johnny-five/wiki/Getting-started-with-Raspberry-Pi-node-red-and-IoT

Vebryn commented 8 years ago

Thank you, it was indeed my raspi-io build. I build it again. I now have a build/Relase/addon into my raspi-io directory. Node-RED with your gpio node is now fully operational :) I will be able to do lots of good stuff !

Concerning security, raspi-io use WiringPi. It requires sudo or root execution. Think last version of Raspbian allows non-root user to access gpio. I have to try it !