기술 슬롯 체험
슬롯 체험 콜백 및 ENEBULAL 통합
2020.01.28
이 기사에서는 슬롯 체험 Cloud에서 IoT 센서 데이터를 수신하고 콜백을 사용하여 Ufuru의 enebular와 연결하는 방법에 대해 설명합니다.

이번에는 Enebular Debug 창의 슬롯 체험 콜백 본문에 해당하는 JSON 메시지를 표시합니다. 더 진보 된 일을하고 싶다면 Enebular 's매뉴얼를 참조하십시오.
Enebular Side Setting
Enebular 가입에서 프로젝트를 만들고 흐름을 편집 할 때까지Enebular 소개
노드를 배치
이번에는 슬롯 체험 콜백으로 작업 할 예정이므로 HTTP Innode 및 DebugNode를 작업 공간으로 드래그 앤 드래그 앤 드래그 및 드래그하십시오.

노드에서 HTTP 구성
노드에서 HTTP를 두 번 클릭하여 편집 화면을 표시하십시오.
메소드post, URL을 /슬롯 체험로 설정하십시오. 이 URL의 /슬롯 체험는 배포 후 생성 된 URL에 추가됩니다.

디버그 노드 구성
디버그 노드의 설정을 변경할 필요가 없습니다. 기본적으로 대상이됩니다msg.payload라고합니다. 이것은 슬롯 체험 콜백의 신체 (JSON) 부분에 해당합니다.

httpnodepath
배포 후 (i) 배포 버튼의 왼쪽으로 표시하여 httpnodepath를 표시하십시오.

슬롯 체험 콜백으로 설정 한 URL 나중에 나중에 노드에서 HTTP를 사용하여 설정 한 URL을이 경로로 추가하십시오. 이 경우 전체 패스는 다음과 같습니다
https : //ev2-prod--1ode-red-********************************************/herokuapp.com/슬롯 체험
.
슬롯 체험 클라우드 사이드 설정
대상 장치 유형의 슬롯 체험 설정에서 새 사용자 정의 슬롯 체험을 만듭니다.
슬롯 체험 생성 방법여기를 참조하십시오.
enebular에 대한 슬롯 체험 구성
몇 가지 방법이 있지만 이번에는 유형을 사용할 것입니다data_uplink, 채널url.

URL 패턴이 ENEBULAR SIGEN에서 확인했습니다httpnodepath + /슬롯 체험post, 컨텐츠 유형은Application/JSON, Body는 슬롯 체험 규칙에 따라 작성됩니다. 이번에는 장치 ID, 메시지 수신 시간 및 메시지 페이로드의 세 가지 항목을 보내고 아래 JSON을 입력합니다.
{
"device",
"시간": time,
"data"
}
Enebular Debug Window에서 슬롯 체험 메시지 확인
두 플랫폼의 설정에 문제가 없으면 아래 이미지와 같이 디버그 화면에 msg.payload가 표시됩니다.

Enebular와 연결하여 소셜 미디어, 기능 처리 및 노드 레드와 같은 방식으로 다른 플랫폼과 연결할 수 있습니다.