NodeRED/en: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Frhenn (Diskussion | Beiträge) |
Frhenn (Diskussion | Beiträge) |
||
(25 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 8: | Zeile 8: | ||
* If you haven't installed Node.js yet download and install it here: https://nodejs.org/en/download/ |
* If you haven't installed Node.js yet download and install it here: https://nodejs.org/en/download/ |
||
* Use the command line to verify that Nodejs has been installed correctly. |
|||
* 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. |
|||
[[Datei:Command line.png|350px]] |
[[Datei:Command line.png|350px]] |
||
[[Datei: |
[[Datei:commandline.png|400px]] |
||
*After you have opened the command line |
*After you have opened the command line enter "node --version" |
||
[[Datei: |
[[Datei:verify node version.png|400px]] |
||
*Also |
*Also enter "npm --version" in the command line. |
||
** Hint: npm usually comes with Node.js |
** Hint: npm usually comes with Node.js |
||
[[Datei: |
[[Datei:verify npm version.png|400px]] |
||
Zeile 35: | Zeile 36: | ||
[[Bild: |
[[Bild:commandline.png|400px]] |
||
Zeile 41: | Zeile 42: | ||
[[Bild: |
[[Bild:install node-red.png|400px]] |
||
⚫ | |||
⚫ | |||
*Enter "node-red" and press the enter key to start Node-RED |
*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: |
[[Bild:start node-red.png|400px]] |
||
Zeile 62: | Zeile 58: | ||
[[Bild: Open Node-RED Editor.png|600px]] |
[[Bild: Open Node-RED Editor.png|600px]] |
||
⚫ | |||
⚫ | |||
*Open a new command line |
|||
⚫ | |||
[[Bild:commandline.png|400px]] |
|||
This tutorial will show you how to import Nodes from the Node-RED library into expecco |
|||
== Preconditions == |
|||
* Open the testsuite from tutorial - part 1 |
|||
*Make sure you did the step '''Specify necessary paths''' from the first part of the tutorial before you make this part. |
|||
*Navigate to the ''.node-red'' folder created by the start of Node-RED |
|||
== Collect Nodes from the Node-RED library == |
|||
**Enter "cd .node-red" and press the enter key |
|||
* Click on ''Operations'' → ''Collect List of Nodes in Attachment'' |
|||
** The Node-RED library gets opened in a browser and the names of each node of the library get extracted and saved in the attatchment listOfNodes |
|||
** '''Hint:''' Collecting the node names take a few minutes and offers the opportunity for a short coffee break |
|||
⚫ | |||
[[Datei:Navigate to Collect List of Nodes.png|800px]] |
|||
⚫ | |||
** Make sure you are in the ''.node-red'' folder |
|||
* Node-RED library |
|||
[[Datei:Node-RED library.png|800px]] |
|||
== Installing Nodes == |
|||
* Click on ''Operations'' → ''Install Nodes'' |
|||
[[Datei:install nodes.png|800px]] |
|||
* A window opens |
|||
** Enter here the node name ''node-red-contrib-amazon-echo'' |
|||
** '''Hint:''' If you want to install all nodes which contains e.g. ''smarthome'' in their names just enter ''*smarthome*'' |
|||
[[Datei:enter node name.png|800px]] |
|||
* The entered node will be installed |
|||
** Information about the installation can be found in the lower left corner of the window |
|||
[[Datei:installation information.png|800px]] |
|||
[[Datei:finished installation.png|800px]]^ |
|||
== Importing the Node == |
|||
* Click on ''Operations'' → ''Importing Nodes'' |
|||
[[Datei:Importing a Node.png|800px]] |
|||
*A small window opens |
|||
** Click on the little house icon |
|||
** Navigate to ''.node-red → node_modules'' |
|||
** Search in this folder after a folder called ''node-red-contrib-amazon-echo'' |
|||
** Select the file ''index.html'', then click OK |
|||
[[ |
[[Bild:install node-red helper.png|500px]] |
||
→ Now you have installed everything you need to do the tutorials below |
|||
* A new folder should have been created |
|||
** Open this folder to see the just generated elementary blocks |
|||
= Tutorials = |
|||
*[[Node-RED Tutorial - Part 1]] |
|||
⚫ | |||
[[Datei:generated nodes.png|800px]] |
Aktuelle Version vom 11. Februar 2020, 09:07 Uhr
Inhaltsverzeichnis
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.
Preparations[Bearbeiten]
- If you haven't installed Node.js yet download and install it here: https://nodejs.org/en/download/
- 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.
- After you have opened the command line enter "node --version"
- Also enter "npm --version" in the command line.
- Hint: npm usually comes with Node.js
- Internet connection available?
Installing Node-RED[Bearbeiten]
- Open command line
- Enter "npm install -g --unsafe-perm node-red" and press the enter key
- 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
- 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
→ Close the browser and the command line
- Open a new command line
- Navigate to the .node-red folder created by the start of Node-RED
- Enter "cd .node-red" and press the enter key
- 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
→ Now you have installed everything you need to do the tutorials below