Arduino nodes dosen't appear in Node-Red application

1,935 views
Skip to first unread message

Marthe Næss

unread,
Jun 7, 2015, 6:56:14 PM6/7/15
to node...@googlegroups.com
Been trying to get the Arduino nodes, as I am doing a small project with a Lightblue Bean connected to some NeoPixels. But have failed at every attempt so far.. Anybody got any idea how I can solve this? This is what I get right now running node-red -v:



Macintosh-2:~ Marthe$ node-red -v


Welcome to Node-RED
===================

8 Jun 08:49:32 - [info] Node-RED version: v0.10.6
8 Jun 08:49:32 - [info] Node.js  version: v0.12.4
8 Jun 08:49:32 - [info] Loading palette nodes
8 Jun 08:49:33 - [warn] ------------------------------------------
8 Jun 08:49:33 - [warn] [arduino] Error: Cannot find module 'arduino-firmata'
8 Jun 08:49:33 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node.
8 Jun 08:49:33 - [warn] [redisout] Error: Cannot find module 'redis'
8 Jun 08:49:33 - [warn] [mongodb] Error: Cannot find module 'mongodb'
8 Jun 08:49:33 - [warn] [arduino] arduino in already registered
8 Jun 08:49:33 - [warn] ------------------------------------------
8 Jun 08:49:33 - [info] User Directory : /Users/Marthe/.node-red
8 Jun 08:49:33 - [info] Flows file     : /Users/Marthe/.node-red/flows_Macintosh-2.local.json
8 Jun 08:49:33 - [info] Server now running at http://127.0.0.1:1880/
8 Jun 08:49:33 - [info] Starting flows
8 Jun 08:49:33 - [info] Waiting for missing types to be registered:
8 Jun 08:49:33 - [info]  - arduino-board
8 Jun 08:49:33 - [info]  - arduino out

Dave C-J

unread,
Jun 7, 2015, 7:02:14 PM6/7/15
to node...@googlegroups.com

Hi,

You need to install the arduino-firmata module that it says is missing, and as per the documentation.
   cd .node-red
   npm install arduino-firmata

Marthe Næss

unread,
Jun 7, 2015, 7:35:47 PM6/7/15
to node...@googlegroups.com
Hi!

Thanks!

I have already done this. But it still can't find it.

Macintosh-2:~ Marthe$ cd ~/.node-red
Macintosh-2:.node-red Marthe$ npm install arduino-firmata
arduino...@0.3.2 node_modules/arduino-firmata
├── evente...@0.4.14
└── de...@2.2.0 (m...@0.7.1)
Macintosh-2:.node-red Marthe$ node-red -v


Welcome to Node-RED
===================

8 Jun 09:35:22 - [info] Node-RED version: v0.10.6
8 Jun 09:35:22 - [info] Node.js  version: v0.12.4
8 Jun 09:35:22 - [info] Loading palette nodes
8 Jun 09:35:23 - [warn] ------------------------------------------
8 Jun 09:35:23 - [warn] [arduino] Error: Cannot find module 'arduino-firmata'
8 Jun 09:35:23 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node.
8 Jun 09:35:23 - [warn] [redisout] Error: Cannot find module 'redis'
8 Jun 09:35:23 - [warn] [mongodb] Error: Cannot find module 'mongodb'
8 Jun 09:35:23 - [warn] [arduino] arduino in already registered
8 Jun 09:35:23 - [warn] ------------------------------------------
8 Jun 09:35:23 - [info] User Directory : /Users/Marthe/.node-red
8 Jun 09:35:23 - [info] Flows file     : /Users/Marthe/.node-red/flows_Macintosh-2.local.json
8 Jun 09:35:23 - [info] Server now running at http://127.0.0.1:1880/
8 Jun 09:35:23 - [info] Starting flows
8 Jun 09:35:23 - [info] Waiting for missing types to be registered:
8 Jun 09:35:23 - [info]  - arduino-board
8 Jun 09:35:23 - [info]  - arduino out

Nicholas O'Leary

unread,
Jun 8, 2015, 4:34:09 AM6/8/15
to Node-RED Mailing LIst
Marthe,

the arduino node is one of a small number of nodes that are included in node-red that we don't, by default, install all of the dependencies for. (redis and mongo being the other two).

Unlike the nodes you would install be npm in the ~/.node-red directory, you need to install the arduino node's missing dependency alongside the node-red install itself, not the user directory.

So, wherever you ran "npm install node-red" from, you should run "npm install arduino-firmata".


We will be removing these nodes from the core install in the very near future to remove this confusion - at which point you would just npm install them in the ~/.node-red directory as you would any other node.

Nick

--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave C-J

unread,
Jun 8, 2015, 5:49:09 AM6/8/15
to node...@googlegroups.com

Ah... Yes... And if you installed Node-RED using the -g parameter you should do the same for this npm.. Eg
   sudo npm install -g arduino-firmata

Luiey

unread,
May 25, 2016, 11:45:33 AM5/25/16
to Node-RED
Nick,

Apologies for bring this post up back. I have a node-red folder which contains node_modules, nodes, public, red, package.json, red.js, settings.js etc and this folder is located at Desktop. There was a colleague send a complete diy nodes to us to run a test. I extract the nodes into node_modules folder and start red.js and navigate to browser. But the node-red is not having the nodes. This nodes is successfully display and use by them. So no issue on naming, js html related file. There must be something that missing in my step.

I already remove .config .json and .settings.js in .node-red folder in my user directory and re-run the command. Same result; no new node appear.
I use "Open command window here" in desktop\iot-studio\node_modules.I try for both with and without -g options but same return.

OP situation is totally like my situation. When I delete (not uninstall because not certain which was copy which was npm install), it appear "Can't find modules" error

Nicholas O'Leary

unread,
May 25, 2016, 12:07:31 PM5/25/16
to Node-RED Mailing List
When you say they sent you diy nodes, were they packaged as a proper node module (with a package.json etc), or just a pair of .js/.html files?

Nick



--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack

---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Luiey

unread,
May 25, 2016, 12:27:45 PM5/25/16
to Node-RED
Yes. There is icon folder, diy.html, diy.js, LICENSE and package.json

Dave C-J

unread,
May 25, 2016, 2:38:50 PM5/25/16
to node...@googlegroups.com
Luiey

if it's already unpacked like that then they need to go into the nodes directory  - usually ~/.node-red/nodes   - and not the ~/.node-red/node_modules directory. 

If it's a single .tgz file (that contains all those files) then npm install {your package} 

Luiey

unread,
May 25, 2016, 11:51:19 PM5/25/16
to Node-RED
Dave,

I don't see any file with tgz extension on running folder or user directory for that modules. They supply me with zip file where it contains folder of nodes_modules only. This module is created based from modifying current nodes (event hub nodes for original; iot hub nodes after modified).

I'm confusing on part of command windows regarding:-
- Can't find modules {package name}
- Waiting node modules
- Waiting for missing type to be registered

Is every node-red nodes must be downloaded from server using npm install? I try searching for manual register/adding nodes, but don't know the detail step for uncommon java person.

Mark Setrem

unread,
May 26, 2016, 1:16:09 AM5/26/16
to Node-RED
As Dave said try putting the files you have been given in ~/.node-red/nodes

Dave C-J

unread,
May 26, 2016, 3:36:20 AM5/26/16
to Node-RED
(after unzipping them)

Dave C-J

unread,
May 26, 2016, 3:38:39 AM5/26/16
to Node-RED


Luiey,

hmm - you mention that some of them are replacements for existing nodes... if they really are replacements for ones that already exist then they MUST be placed over the old ones and nowhere else, otherwise you will end up with two copies which would explain some of the error messages.

Luiey

unread,
May 26, 2016, 4:32:15 AM5/26/16
to Node-RED
Dave,

It's not a replacement, it's modification. Which, they use node 1 to create node 2 with additional input and display. Both have different naming.

Luiey

unread,
Jun 2, 2016, 12:22:30 AM6/2/16
to Node-RED
Bring this up again. Sorry guys.

I'm successfully able to make the node appear in browser node list by installing manually.

The supplied folder contains:-
1. 80-mynode.js
2. 80-mynode.html
3. Icon (folder)
4. node_modules (dependencies node if have)
5. package.json
6. LICENSE

- I download the 7zip software and install it onto my computer.

- Name the folder to "package"
- Right click on the folder and select 7zip --> Add to Archieve
- On 7zip Manager, I put the name of the node that written in package.json under name section with version e.g node-red-node-mynode-0.0.1.
- I select "tar" format. It will created "node-red-node-mynode-0.0.1.tar"
- Right click on the tar file and repeat to 7zip again but with "gzip" archive format and it will create "node-red-node-mynode-0.0.1.tar.gz" file

- Copy the "node-red-node-mynode-0.0.1.tar.gz" into main folder of node-RED that contains red.js file and paste it there
- Right click on empty space and do select "Open command window here"
- At cmd, type "npm install node-red-node-mynode-0.0.1.tar.gz" without double quote
- And complete. Then type "node red.js -v" and open browser.

** I also try open package.json file that lies alongside with red.js file and edit the dependencies section to have name of my node folder. But I don't know if it affect of not.

Thanks to @Dave C-J and other member for mentioning about tarball format which I just found out this morning after downloading some node manually and it is under tgz file. I open the archive and found there is another archive there with a folder name package! not a folder name of the node name.


On Thursday, May 26, 2016 at 2:38:50 AM UTC+8, Dave C-J wrote:

Nicholas O'Leary

unread,
Jun 2, 2016, 3:17:18 AM6/2/16
to Node-RED Mailing List
Luiey,

now you've fully described what the files you were given are, the correct process to install them would have been:

1. copy the files somewhere, lets say /tmp/my-node
2. in ~/.node-red (or whatever directory node-red reports as the "User directory" on startup), ensure there is a directory called node_modules, then run "npm install /tmp/my-node" (obviously change /tmp/my-node to wherever you put the nodes at the start)

There is no need to go via a tgz file - especially on windows which doesn't handle them natively.

Also, you should definitely not be installing nodes inside the node-red install itself - as soon as you update node-red you may well lose anything you've installed in there.

Nick

--

Fadhli Azmin

unread,
Jun 2, 2016, 11:24:16 AM6/2/16
to node...@googlegroups.com
Oh. Ok sir. But from what you guide, i guess my kind of node red folder is quite different which I'm not installing npm using command. Our principal give us totally a folder that have all node red file. We copy the zip folder and extract anywhere we want. Which mean a folder with all things like image. We were instruct to install nodejs4.4 LTS and python2.7 only at first time meet with node-RED.

Inline image 1

You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/mAuUyPL33iQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

ajrserv...@gmail.com

unread,
May 6, 2018, 4:29:12 PM5/6/18
to Node-RED
Hi my name is Alejandro

I need your help , im trying to install arduino module on node-red and is not posible, showing this on console:
6 May 14:22:54 - [warn] Installation of module node-red-node-arduino failed:
6 May 14:22:54 - [warn] ------------------------------------------
6 May 14:22:54 - [warn]
> seria...@4.0.7 install C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
node-pre-gyp verb cli   'C:\\Users\\AlexJim\\.node-red\\node_modules\\firmata\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp',
node-pre-gyp verb cli   'install',
node-pre-gyp verb cli   '--fallback-to-build' ]
node-pre-gyp info using node-p...@0.6.32
node-pre-gyp info using no...@9.11.1 | win32 | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport\build\Release\serialport.node" (not found)
node-pre-gyp ERR! Pre-built binaries not found for seria...@4.0.7 and no...@9.11.1 (node-v59 ABI) (falling back to source compile with node-gyp)
node-pre-gyp verb command build [ 'rebuild' ]
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\PYTHON\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:170:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\AlexJim\\.node-red\\node_modules\\firmata\\node_modules\\serialport\\build\\Release\\serialport.node" "--module_name=serialport" "--module_path=C:\\Users\\AlexJim\\.node-red\\node_modules\\firmata\\node_modules\\serialport\\build\\Release"
gyp ERR! cwd C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport
gyp ERR! node -v v9.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport\build\Release\serialport.node --module_name=serialport --module_path=C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport\build\Release' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:936:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AlexJim\\.node-red\\node_modules\\firmata\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport
node-pre-gyp ERR! node -v v9.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport\build\Release\serialport.node --module_name=serialport --module_path=C:\Users\AlexJim\.node-red\node_modules\firmata\node_modules\serialport\build\Release' (1)
npm WARN node-red...@0.0.1 No repository field.
npm WARN node-red...@0.0.1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! seria...@4.0.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the seria...@4.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AlexJim\AppData\Roaming\npm-cache\_logs\2018-05-06T20_22_54_469Z-debug.log

6 May 14:22:54 - [warn] ------------------------------------------

could you help me ????

Dave C-J

unread,
May 6, 2018, 4:54:34 PM5/6/18
to node...@googlegroups.com
It may be because you are using node 9   There were some deprecated calls that may not yet have been fixed to work in 9. We recommend node 8 lts
--
Sent from phone.
Reply all
Reply to author
Forward
0 new messages