Node-RED 우노빅보드 스마트팜/우노빅보드와 Node-RED 연동

Node-RED string 데이터 수신 & 그래프 표현

ZEROWIN.TECH 2020. 6. 21. 20:16
728x90

 

스마트팜 보드에서 온도/습도/조도/수분량 데이터를 수신합니다.

Node-RED 대쉬보드에서 그래프 / 텍스트창으로 데이터를 표시합니다.

Node-RED 프로그래밍

보드 TCP 서버에서 데이터를 요청합니다. 

일정 시간 30초마다 센서 데이터를 요청합니다.

 

 

Tcp request 노드를 설정합니다.

 

object 를 json 형식으로 변환합니다.

https://cookbook.nodered.org/basic/convert-json

 

Convert to/from JSON : Node-RED

Convert to/from JSON Problem You want to convert a message property between a JSON string and the JavaScript object it represents. Solution The JSON node can be used to convert between the two formats. Example [{"id":"634256b7.2d6818","type":"inject","z":"

cookbook.nodered.org

swtich 노드에서 msg.parts.key로 데이터 분류합니다.

데모동영상