๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ์ธ ๊ณต๋ถ€/IoT

[Node-red] flow ์ƒ์„ฑ

by syLim___ 2023. 11. 21.
728x90

https://nodered.org/docs/tutorials/first-flow

 

Creating your first flow : Node-RED

Creating your first flow Overview This tutorial introduces the Node-RED editor and creates a flow that demonstrates the Inject, Debug and Function nodes. 1. Access the editor With Node-RED running, open the editor in a web browser. If you are using a brows

nodered.org

 

ํŠœํ† ๋ฆฌ์–ผ ๋ณด๊ณ  ๋”ฐ๋ผํ•ด๋ดค์ˆจ


 

 - localhost:1880 ์ ‘์†ํ•˜์—ฌ Node-red browser editor ์—ด๊ธฐ

 

- ํŒ”๋ ˆํŠธ์— ์žˆ๋Š” ๋…ธ๋“œ๋ฅผ ์›Œํฌ์ŠคํŽ˜์ด์Šค๋กœ ๋“œ๋ž˜๊ทธํ•˜๊ณ , ๊ฐ ๋…ธ๋“œ๋ฅผ ๋”๋ธ”ํด๋ฆญํ•˜์—ฌ ์›ํ•˜๋Š”๋Œ€๋กœ ์ˆ˜์ •

- Flow๋ฅผ ์™„์„ฑํ–ˆ์œผ๋ฉด, ๋ฐฐํฌํ•˜๊ธฐ๋ฅผ ํด๋ฆญํ•œ๋‹ค.

- Inject ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๊ณ , ๋””๋ฒ„๊ทธ ์‚ฌ์ด๋“œ๋ฐ”์—์„œ ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•œ๋‹ค.

 

Inject Node: flow์— ๋ฉ”์‹œ์ง€๋ฅผ ๋„ฃ์–ด์คŒ
Function Node: JavaScript๋กœ function ์ž‘์„ฑ. Payload๋ฅผ ๋ฐ›์•„์„œ ์ž‘์—… ์ˆ˜ํ–‰ ํ›„ ๋‹ค์Œ ๋…ธ๋“œ๋กœ ๋„˜๊ฒจ์คŒ
Debug Node: payload๋ฅผ ๋””๋ฒ„๊ทธ ์‚ฌ์ด๋“œ๋ฐ”์— ๋ณด์—ฌ์ค€๋‹ค

 

 

728x90