Node-RED 우노빅보드 스마트팜/환경설정

Node-RED Windows 설치

ZEROWIN.TECH 2020. 5. 9. 15:04
728x90

Node-RED란?

Node-RED(노드 레드)는 하드웨어 장치들, API온라인 서비스를 사물인터넷의 일부로 와이어링(배선화)시키기 위해 본래 IBM이 개발한 시각 프로그래밍을 위한 플로우 기반 개발 도구입니다.

Node-RED는 브라우저 기반 플로 편집기를 제공하므로 자바스크립트 함수를 개발하는데 사용할 수 있습니다.

애플리케이션의 요소들은 재사용을 위해 저장하거나 공유할 수 있습니다.

런타임은 Node.js 위에서 개발되어 있습니다.

Node-RED에서 만든 플로는 JSON을 사용하여 저장됩니다.

버전 0.14 이후 MQTT 노드들은 적절하게 구성된 TLS 연결을 만들 수 있습니다.

Node-RED 아이콘

설치 참조 사이트

http://blog.naver.com/PostView.nhn?blogId=edblab&logNo=221425521238

 

Node-RED(1) - 소개와 설치

도남철 namchuldo@gmail.com마지막 4/4/2019 처음 12/23/2018​1. 소개Node-RED 는 웹 브라우저에서 구...

blog.naver.com

Windows 설치파일 다운로드 사이트

https://nodejs.org/en/

 

Node.js

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

nodejs.org

설치파일 다운로드후 설치를 진행합니다.

필요파일 자동다운로드를 체크하면 필요한 파일들이 자동으로 설치됩니다.

버전확인

e:\Program Files\nodejs>node --version
v12.16.3

e:\Program Files\nodejs>node --version && npm --version
v12.16.3
6.14.4

node-red 설치합니다.

e:\Program Files\nodejs>npm install -g --unsafe-perm node-red
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
C:\Users\yc253\AppData\Roaming\npm\node-red-pi -> C:\Users\yc253\AppData\Roaming\npm\node_modules\node-red\bin\node-red-pi
C:\Users\yc253\AppData\Roaming\npm\node-red -> C:\Users\yc253\AppData\Roaming\npm\node_modules\node-red\red.js

> bcrypt@3.0.6 install C:\Users\yc253\AppData\Roaming\npm\node_modules\node-red\node_modules\bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
[bcrypt] Success: "C:\Users\yc253\AppData\Roaming\npm\node_modules\node-red\node_modules\bcrypt\lib\binding\bcrypt_lib.node" is installed via remote
+ node-red@1.0.6
added 330 packages from 339 contributors in 32.173s

 

node-red 실행합니다.

e:\Program Files\nodejs>node-red
9 May 14:47:39 - [info]

Welcome to Node-RED
===================

9 May 14:47:39 - [info] Node-RED version: v1.0.6
9 May 14:47:39 - [info] Node.js  version: v12.16.3
9 May 14:47:39 - [info] Windows_NT 10.0.18363 x64 LE
9 May 14:47:39 - [info] Loading palette nodes
9 May 14:47:40 - [info] Settings file  : C:\Users\yc253\.node-red\settings.js
9 May 14:47:40 - [info] Context store  : 'default' [module=memory]
9 May 14:47:40 - [info] User directory : C:\Users\yc253\.node-red
9 May 14:47:40 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 May 14:47:40 - [info] Flows file     : C:\Users\yc253\.node-red\flows_DESKTOP-KVHT15H.json
9 May 14:47:40 - [info] Creating new flow file
9 May 14:47:40 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

9 May 14:47:40 - [info] Server now running at http://127.0.0.1:1880/

웹브라우져에서 http://localhost:1880 접속합니다.

정상설치되면 아래와 같은 대쉬보드를 볼 수 있습니다.

모바일에서도 node-red에 접속 할 수 있습니다.

 

위부에서 node-red 접근시 방화벽 해제 설정하셔야 합니다.