Adding nodes to node-red

Home Forums Conduit: AEP Model Adding nodes to node-red

Tagged: ,

Viewing 30 posts - 1 through 30 (of 42 total)
  • Author
    Posts
  • #11239
    Chad Goyette
    Participant

    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?

    #11366
    Lawrence Griffiths
    Participant

    Are you installing nodes manually or via npm?

    If manual just drop files to /opt/node-red/nodes
    And re-start node red from admin

    BTW: Node-red log is /var/volatile/log/app/node-red.log

    #11376
    Chad Goyette
    Participant

    At 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?

    #11456
    Chad Goyette
    Participant

    If I am using npm is there a specific folder I should be in when I run the command?

    #11457
    Jeff Hatch
    Keymaster

    Chad,

    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

    #11609
    wojtek t
    Participant

    very weird, but i am missing npm command after upgrade to 1.1.2….

    #11610
    Lawrence Griffiths
    Participant

    @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

    #11617
    Lawrence Griffiths
    Participant

    @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.

    #11618
    wojtek t
    Participant

    You 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,…

    #11619
    Lawrence Griffiths
    Participant

    @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.

    #11622
    wojtek t
    Participant

    still 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
    Wojtek

    #11624
    Jeff Hatch
    Keymaster

    Thanks 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

    #11626
    Lawrence Griffiths
    Participant

    Jeff 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

    #11627
    Jeff Hatch
    Keymaster

    Lawrence,

    Thanks for the suggestion. For now, until we create a releases forum, you’ll have to just keep an eye on:

    I’ll see what I can do to get that kind of forum set up.

    Jeff

    #11628
    Jeff Hatch
    Keymaster

    Lawrence,

    I meant for the following link to be in the last message:

    http://www.multitech.net/developer/downloads/

    Jeff

    #11705
    Brandon Bayer
    Blocked

    Lawrence,

    We’ll try to post announcements for all new releases on the News page:

    http://www.multitech.net/developer/news/

    -Brandon

    #11716
    Lawrence Griffiths
    Participant

    Brandon thanks for this

    #11766
    Jeff Hatch
    Keymaster

    Lawrence,

    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

    #11812
    Lawrence Griffiths
    Participant

    Jeff ok will schedule that in for next week thanks

    #11823
    Adam Watson
    Participant

    I 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

    #11831
    Adam Watson
    Participant

    I have sent a ticket – thanks Jeff

    #16008
    Heath Raftery
    Participant

    Nothing 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.
    • 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.
    • This reply was modified 7 years, 4 months ago by Heath Raftery.
    #16012
    Heath Raftery
    Participant

    Couldn’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, 4 months ago by Heath Raftery. Reason: Needs deleting
    #16261
    Martijn Jonker
    Participant

    Can 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 0

    #16264
    Heath Raftery
    Participant

    Probably 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 about ping 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.

    #16282
    Martijn Jonker
    Participant

    Thanks 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 ETIMEDOUT

    i 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

    #16326
    Eliz
    Participant

    I 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.jso

    etc.

    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?

    #16332
    Jeff Hatch
    Keymaster

    Eliz,

    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

    #16336
    Eliz
    Participant

    Jeff, thank you for the answer – it helped clear up my confusion.

    #16338
    Eliz
    Participant

    Hi

    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, 3 months ago by Eliz.
Viewing 30 posts - 1 through 30 (of 42 total)
  • You must be logged in to reply to this topic.