Node-Red Installation
-
Hi everyone!
Does anyone know how to install the Node-Red software?
I would like to control an LED strip via my Omega, Node-Red and a webapp wich is created via node-red.Thanks a lot!!
Gauthier
-
I could need that help too
-
Oh, after long research, i found this and it seems to work https://wiki.onion.io/Tutorials/node-red
-
@Gauthier-Michoud @MultiDJRoni, did you succeed installing Node-Red? When I do
# opkg update # opkg install onion-node-red
All I get is
Unknown package 'onion-node-red'. Collected errors: * opkg_install_cmd: Cannot install package onion-node-red.
My OS version is: BusyBox v1.23.2; Ī©-ware: 0.1.4 b330
The opkg package lists are fetched from
http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/base/
http://repo.onion.io/omega/packages/
http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/I am using Omega 1 hardware.
-
Edit:
This story ends badly... I will tell it anyway.
This story ends happily...The Onion Node-RED Tutorial recommends running
$ opkg install onion-node-red
The opkg download often fails because the file is quite large. I did a wget to download the 214MB file from the opkg repository manually
$ wget http://repo.onion.io/omega2/packages/onion/onion-node-red_0.1-1_mipsel_24kc.ipkThen I tried to install the ipk locally.
$ opkg install onion-node-red_0.1-1_mipsel_24kc.ipk
That installs but Node-RED isn't really installed correctly.
An .ipk file is basically just a .tar.gz file. So I unpacked it using the tar command:
$ tar xvfz onion-node-red_0.1-1_mipsel_24kc.ipk
That gave me a data.tar.gz file. Manually unpacking the data.tar.gz reveals that there are 180K files with many many nested directories that do not contain any files. In fact, the first 170K files are junk. Only the last 10140 files are real.
$ tar xvzf data.tar.gz > corrupted.txt
$ tail -10140 corrupted.txt > realfiles.txt
I thought that I could repack with just the real files.
$ cat realfiles.txt | awk '{print $6}' | xargs tar xzvf data.tar.gz
It splits out a bunch of warnings that files are missing from the data.tar.gz
Its really corrupted.
I was doing this in a /tmp directory on another Linux machine, so I repacked what I was able to recover.
$ tar czvf nodered.tar.gz usr
I moved the nodered.tar.gz back to my Omega2 and unpacked it
$ cd /
$ tar xzvf nodered.tar.gz
I then
$ cd /usr/bin/onion-node-red/node_modules/node-red
$ node red.js
Behold, Node-RED started.
root@Omega-447F:/usr/bin/onion-node-red/node_modules/node-red# node red.js
The host is: undefined
28 Mar 01:08:00 - [info]Welcome to Node-RED
28 Mar 01:08:00 - [info] Node-RED version: v0.16.2
28 Mar 01:08:00 - [info] Node.js version: v4.3.1
28 Mar 01:08:00 - [info] Linux 4.4.46 mipsel LE
28 Mar 01:08:00 - [info] Palette editor disabled : npm command not found
28 Mar 01:08:00 - [info] Loading palette nodesIt crashed a minute later with a JS stack trace.
Ok... I might have enough of the bits to invoke npm to reinstall them.
$ opkg install npm
$ npm install .
Opps, that crashed with a process out of memory error. I followed the
Onion Extending RAM with a Swap File Tutorial and the convoluted technique to install swaponI was able to get
$ npm install .
to complete but starting node-red failed because it was missing lots of dependencies.Edit : I merged the node_modules directory from the tgz and what npm install downloaded. I solved the process out of memory by invoking node-red with additional process space.
$ /usr/lib/node_modules/node-red# node --max_old_space_size=80 red.js
-
-
@Landon-Lin said in Node-Red Installation:
@Landon-Lin said in Node-Red Installation:
Why asertion failed .
-
@Landon-Lin Just for reference, Omega1 and Omega2 can't do Node-Red without booting from external storage. Omega2+ has an onboard microSD card. You can configure it to boot from the SD card as in here https://docs.onion.io/omega2-docs/boot-from-external-storage.html (though the instructions don't match up well with current products). But the App Manager will still say Node-Red is incompatible with Omega2+. End-run around that using:
opkg install oos-app-nodered
No more storage issues but SD card is inherently unreliable so eMMC recommended for production as in the Omega2+ Pro. At least it does start up, haven't actually run any flows yet.