Adding nodes to node-red
Home › Forums › Conduit: AEP Model › Adding nodes to node-red
- This topic has 41 replies, 11 voices, and was last updated 7 years, 10 months ago by Jeffrey Osborne.
-
AuthorPosts
-
January 22, 2016 at 9:20 am #11239Chad GoyetteParticipant
I am looking for the procedure to adding nodes to node-red. Could someone either explain the procedure or direct me to documentation that explains how to do this on the conduit?
January 26, 2016 at 1:21 pm #11366Lawrence GriffithsParticipantAre you installing nodes manually or via npm?
If manual just drop files to /opt/node-red/nodes
And re-start node red from adminBTW: Node-red log is /var/volatile/log/app/node-red.log
January 26, 2016 at 4:12 pm #11376Chad GoyetteParticipantAt the moment i am not installing nodes because i am unsure of the proper way to do it (I am new to this). I have installed nodes on a windows machine using npm but i couldn’t find information on how to do it on the conduit. Is there documentation that you can point me to that describes this process?
January 29, 2016 at 6:58 am #11456Chad GoyetteParticipantIf I am using npm is there a specific folder I should be in when I run the command?
January 29, 2016 at 7:50 am #11457Jeff HatchKeymasterChad,
I don’t think it matters where you run the command if you specify the –prefix
argument when you run it. That will put node or node module wherever you specify. Jeff
February 6, 2016 at 6:50 am #11609wojtek tParticipantvery weird, but i am missing npm command after upgrade to 1.1.2….
February 6, 2016 at 4:23 pm #11610Lawrence GriffithsParticipant@wojtek Alas NO don’t know why the MAJOR omission?
Let’s hope we get an good answer.What I’ve done for 1.1.2 is copy custom nodes to: /opt/node-red/node/nodes/
And had to edit /var/config/app/install/development/.config.json to include nodes into the pallet. I’m not sure this last step is necessary but it worked for me.Lawrence
- This reply was modified 8 years, 9 months ago by Lawrence Griffiths.
- This reply was modified 8 years, 9 months ago by Lawrence Griffiths.
- This reply was modified 8 years, 9 months ago by Lawrence Griffiths.
February 7, 2016 at 12:56 pm #11617Lawrence GriffithsParticipant@wojtek update to previous
just copy custom node & discrepancies to /opt/node-red/node/nodes/
And restart device. A node-red re-start doesn’t seem to pic up new nodes.February 7, 2016 at 3:34 pm #11618wojtek tParticipantYou can add nodes manually, but npm is important due to dependencies and easy of use.
you can add npm manually, however it seems to be extremely slow. I believe it actually installs all dependencies for each node instead of checking for them globally. I have a ticket opened,…February 8, 2016 at 3:14 am #11619Lawrence GriffithsParticipant@wojek I have same question as part of open ticket too. I wonder if this a storage constraint issue as they’ve added LoRa packet forwarder, so something had to go.
February 8, 2016 at 1:41 pm #11622wojtek tParticipantstill plenty of room there, also I manually installed it and it worked just very, very slow. I think its unintentional, but we will know soon.
Thanks
WojtekFebruary 9, 2016 at 7:54 am #11624Jeff HatchKeymasterThanks guys for bringing this up. We are aware that npm got dropped out of the release. The recipes on openembedded changed so that npm got moved into it’s own package separate from nodejs somewhere around nodejs 0.10.38. We are planning on making some kind of hotfix or another quick release to get it back in. I am not sure exactly when this will happen, but it should be pretty soon.
Jeff
February 9, 2016 at 9:56 am #11626Lawrence GriffithsParticipantJeff thanks for the heads up.
Makes sense as @wojek says we can get it to work but it does slow things down.
Can live with it for now, assume that openembedded is Libux OS the AEP uses?Also can we have a separate Forum where you announce NEW releases please for all products. There were 2 last week AEP & Box the first I knew about because of a ticket the 2nd I found by chance!
But keep up great work
Lawrence
February 9, 2016 at 10:36 am #11627Jeff HatchKeymasterFebruary 9, 2016 at 10:37 am #11628Jeff HatchKeymasterFebruary 18, 2016 at 9:16 am #11705Brandon BayerBlockedLawrence,
We’ll try to post announcements for all new releases on the News page:
http://www.multitech.net/developer/news/
-Brandon
February 19, 2016 at 11:53 am #11716Lawrence GriffithsParticipantBrandon thanks for this
February 25, 2016 at 1:24 pm #11766Jeff HatchKeymasterLawrence,
I have a build of AEP 1.1.2 that includes the npm utility in it. If you would like a copy open a portal case and make a request for it. It is an unofficial release of software. The next release of AEP will also contain the npm utility added back in.
Thanks,
Jeff Hatch
March 1, 2016 at 7:09 am #11812Lawrence GriffithsParticipantJeff ok will schedule that in for next week thanks
March 1, 2016 at 4:52 pm #11823Adam WatsonParticipantI too also need to add mongodb support very soon (npm install node-red-node-mongodb) to store lora packets – is there a way around this with npm missing?
Adam,
Please file a portal case with https://support.multitech.com and I can get you a build of AEP 1.1.2 with npm added back in. I have given it out to a couple of other customers and they have tested it and said that npm appears to be working well.
Thank You,
Jeff Hatch
March 2, 2016 at 4:40 pm #11831Adam WatsonParticipantI have sent a ticket – thanks Jeff
December 10, 2016 at 3:11 pm #16008Heath RafteryParticipantNothing is easy is it? Thanks to this thread I was finally able to add a node to Node-RED on the Conduit. Here’s a summary:
cd /opt/node-red/nodes
- The default
$HOME/.node-red/nodes
seems to be disabled, so you need install in the installation directory, which also means your additions will be gone if you upgrade the firmware.
- The default
npm install node-red-contrib-the-new-node
- npm exists since AEP 1.2.2
- Restart the Conduit using the web interface under the Commands menu.
- Oddly, restarting node-red is not enough. There is a mysterious hidden file at
/var/config/app/install/development/.config.json
which needs to contain the new node. Somehow a restart causes this to happen. - node-red takes minutes to start. Monitor
/var/log/app/node-red.log
to see progress.
- Oddly, restarting node-red is not enough. There is a mysterious hidden file at
- This reply was modified 7 years, 11 months ago by Heath Raftery.
December 12, 2016 at 1:19 am #16012Heath RafteryParticipantCouldn’t figure out how to delete a post. This is no longer relevant – actual problem is detailed in the other thread.
I think this method is flawed. On the next reboot, the newly installed node is gone, yet it is still registered, which causes a mysterious failure on boot. See the harrowing tale at http://www.multitech.net/developer/forums/topic/continuous-reload-of-node-red-page/#post-16011.So I don’t know the correct way. Maybe it’s
npm install -g node-red-contrib-the-new-node
for a global install in /usr/lib/node_modules. But I can’t get node-red to run at all now despite hours battling with it, so at this stage, proceed with caution!- This reply was modified 7 years, 11 months ago by Heath Raftery. Reason: Needs deleting
January 10, 2017 at 4:52 am #16261Martijn JonkerParticipantCan someone help me with the following problem?
i think its something stupid but i am not verry familiair with node
/opt/node-red/nodes$ npm install node-red-contrib-serial-modbus
npm WARN package.json mts-gpio@ No description
npm WARN package.json mts-gpio@ No repository field.
npm WARN package.json mts-gpio@ No README data
npm WARN package.json mts-mcard@ No description
npm WARN package.json mts-mcard@ No repository field.
npm WARN package.json mts-mcard@ No README data
npm WARN package.json mts-serial@ No description
npm WARN package.json mts-serial@ No repository field.
npm WARN package.json mts-serial@ No README data
npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’npm ERR! System Linux 3.12.27
npm ERR! command “node” “/usr/bin/npm” “install” “node-red-contrib-serial-modbus”
npm ERR! cwd /opt/node-red/nodes
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/node-red/nodes/npm-debug.log
npm ERR! not ok code 0January 10, 2017 at 2:39 pm #16264Heath RafteryParticipantProbably worth it’s own thread, Martijn, but a few things to try:
Are you behind a proxy? Do other connections to the Internet work? For example, does
curl http://www.google.com
work? What aboutping github.com
? What does Google say about the error? Anything in npm-debug.log that would identify the offending address?I noticed there’s been some very recent changes to the package. Have you tried again recently? For what it’s worth, it fails for me, but for a very different reason. That is, it tries to satisfy the dependency
node-serialport
, fails to find binaries, so attempts to build from source and fails because I don’t have make installed.January 11, 2017 at 12:17 pm #16282Martijn JonkerParticipantThanks Heath for your response! it is verry helpfull, the unit dowloads the packets now. now the problem is that the unit
npm ERR! network connect ETIMEDOUTi do have more problems with de conduit, need te learn the basics of linux first.
when i have a more concrete question i will reply., if you have some pointers for a noob, just let me know
January 16, 2017 at 7:06 am #16326ElizParticipantI am going to ask a very stupid question, also regarding the installation of additional nodes… these commands:
cd /opt/node-red/nodes
npm install node-red-contrib-the-new-node
/var/config/app/install/development/.config.jsoetc.
Where are you typing them? In what program? And under which directories? I am using the AEP model for the conduit. Is this mlinux? Or, I have connected the conduit via USB to my PC and am typing these programs via a terminal program? Is this correct? The outputs are very confusing and I am also getting the same errors as Martijn had originally. I would appreciate it if someone could please point me in the right direction?
January 16, 2017 at 10:18 am #16332Jeff HatchKeymasterEliz,
To type the commands you mentioned you will either have to use SSH to connect to the Conduit, log in, and then you should be at a command prompt, or use the one of the debug console ports (the USB Device port on the back or the USB port behind the white plate with the Multitech logo on the front.
Jeff
January 17, 2017 at 12:06 am #16336ElizParticipantJeff, thank you for the answer – it helped clear up my confusion.
January 17, 2017 at 2:25 am #16338ElizParticipantHi
I have tried to install the new node module in /opt/node-red and three things happened:
1. I can actually see the node-red-new-node module under node_modules
2. I also went to check that json config file that should update with a conduit restart but there is no /var/config/app/install/development/.config.json file there.
3. After restarting the conduit – still no new nodes were added to the palette.Does anyone have any advice or idea why this happens?
Update: The config.json file is in fact there, but does not update when the conduit restarts – does anyone know why?
- This reply was modified 7 years, 10 months ago by Eliz.
-
AuthorPosts
- You must be logged in to reply to this topic.