NodeRED/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
 
(156 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
= Introduction =
Node-RED is a graphical development tool. With Node-RED, use cases for the Internet of Things can be implemented according to a simple modular principle.
In Node-RED there are so-called "nodes" which look like as follows. Each node fulfills a certain function e.g. making a HTTP-request.

[[Datei:Node-RED nodes.png|200px]]

= Preparations =
= Preparations =
* Check if you have installed nodeJS with the command line.
* If you haven't installed Node.js yet download and install it here: https://nodejs.org/en/download/
** To open the command line type "cmd" in the Windows search bar and press the enter key.




* Use the command line to verify that Node.js has been installed correctly.
[[Datei:Command line.png|350px]]
** To open the command line enter "cmd" in the Windows search bar and press the enter key.
[[Datei:opened command line.png|400px]]




[[Datei:Command line.png|350px]]
*After you have opened the command line type "node --version" in.
[[Datei:commandline.png|400px]]




*After you have opened the command line enter "node --version"
[[Datei:check node version.png|400px]]




[[Datei:verify node version.png|400px]]
*Also type "npm --version" in the command line to check if you have installed npm
** Hint: npm usually comes with nodeJS




*Also enter "npm --version" in the command line.
[[Datei:check npm version.png|400px]]
** Hint: npm usually comes with Node.js




[[Datei:verify npm version.png|400px]]




* If you have not installed NodeJS download it here: https://nodejs.org/en/download/
* Internet connection available?
* Internet connection available?


= Installing Node-RED =
= Installing Node-RED =
*Open command line


[[Bild:commandline.png|400px]]


*Enter "npm install -g --unsafe-perm node-red" and press the enter key


[[Bild:install node-red.png|400px]]


*Enter "node-red" and press the enter key to start Node-RED
** Essential step, because this creates the ''.node-red'' folder in your user directory which we need for further steps


[[Bild:start node-red.png|400px]]


*After you have started Node-RED open your browser (Chrome, Firefox, Internet Explorer, ...)
** Enter "localhost:1880" into the search bar of your browser and press the enter key


[[Bild: Open Node-RED Editor.png|600px]]

→ Close the browser and the command line



*Open a new command line
[[Bild:commandline.png|400px]]


*Navigate to the ''.node-red'' folder created by the start of Node-RED
**Enter "cd .node-red" and press the enter key


[[Bild: node-red folder.png|400px]]


*Enter "npm install node-red-node-test-helper node-red --save-dev" and press the enter key
** Make sure you are in the ''.node-red'' folder


[[Bild:install node-red helper.png|500px]]


→ Now you have installed everything you need to do the tutorials below


= Tutorials =
*[[Node-RED Tutorial - Part 1]]


*[[Node-RED Tutorial - Part 2]]
[[Bild:Start Marked.png]]

Aktuelle Version vom 11. Februar 2020, 10:07 Uhr

Introduction[Bearbeiten]

Node-RED is a graphical development tool. With Node-RED, use cases for the Internet of Things can be implemented according to a simple modular principle. In Node-RED there are so-called "nodes" which look like as follows. Each node fulfills a certain function e.g. making a HTTP-request.

Node-RED nodes.png

Preparations[Bearbeiten]


  • Use the command line to verify that Node.js has been installed correctly.
    • To open the command line enter "cmd" in the Windows search bar and press the enter key.


Command line.png Commandline.png


  • After you have opened the command line enter "node --version"


Verify node version.png


  • Also enter "npm --version" in the command line.
    • Hint: npm usually comes with Node.js


Verify npm version.png


  • Internet connection available?

Installing Node-RED[Bearbeiten]

  • Open command line


Commandline.png


  • Enter "npm install -g --unsafe-perm node-red" and press the enter key


Install node-red.png


  • Enter "node-red" and press the enter key to start Node-RED
    • Essential step, because this creates the .node-red folder in your user directory which we need for further steps


Start node-red.png


  • After you have started Node-RED open your browser (Chrome, Firefox, Internet Explorer, ...)
    • Enter "localhost:1880" into the search bar of your browser and press the enter key


Open Node-RED Editor.png

→ Close the browser and the command line


  • Open a new command line

Commandline.png


  • Navigate to the .node-red folder created by the start of Node-RED
    • Enter "cd .node-red" and press the enter key


Node-red folder.png


  • Enter "npm install node-red-node-test-helper node-red --save-dev" and press the enter key
    • Make sure you are in the .node-red folder


Install node-red helper.png


→ Now you have installed everything you need to do the tutorials below

Tutorials[Bearbeiten]



Copyright © 2014-2024 eXept Software AG