Transcript
Page 1: IoT, APIs und Microservices - alles unter Node-RED

IoT, APIs und Microservices – alles unter Node-REDLars Gregori / SAP Hybris

Page 2: IoT, APIs und Microservices - alles unter Node-RED

AgendaÜberblick Node-RED Flows anlegen Node-Module installieren Build your own Node

Page 3: IoT, APIs und Microservices - alles unter Node-RED

Überblick Node-RED

Page 4: IoT, APIs und Microservices - alles unter Node-RED

Node-RED

visuelles Tool

graphische Oberfläche: Browser

serverseitig Node.js

Internet of Things (IoT) Prototypen

Page 5: IoT, APIs und Microservices - alles unter Node-RED

Node-RED

visuelles Tool

graphische Oberfläche: Browser

serverseitig Node.js

Internet of Things (IoT) Prototypen

Open Source: Apache 2.0 Lizenz

IBM Emerging Technologies

Page 6: IoT, APIs und Microservices - alles unter Node-RED

Installation

Node.js + Package-Manager npm

⇨ Installationsanleitung

http://localhost:1880

Page 7: IoT, APIs und Microservices - alles unter Node-RED

Installation

Node.js + Package-Manager npm

⇨ Installationsanleitung

http://localhost:1880

Raspberry Pi

Page 8: IoT, APIs und Microservices - alles unter Node-RED

Node-RED Oberfläche

3 Hauptbereiche:

• Node-Panel

• Sheets-Panel

• Info- und Debug-Panel

Page 9: IoT, APIs und Microservices - alles unter Node-RED

Flows anlegen

Page 10: IoT, APIs und Microservices - alles unter Node-RED

msg Objekt

JSON Daten mit payload-Parameter

Page 11: IoT, APIs und Microservices - alles unter Node-RED

Nodes

Input-Nodes

Output-Node

Processing-Nodes

Daten verarbeiten, verschiedene Dinge kontrollieren und steuern

Page 12: IoT, APIs und Microservices - alles unter Node-RED

Flow Setup

Page 13: IoT, APIs und Microservices - alles unter Node-RED

Node-Module installieren

Page 14: IoT, APIs und Microservices - alles unter Node-RED

Node-RED Library

https://flows.nodered.org/

> 800 Nodes

Page 15: IoT, APIs und Microservices - alles unter Node-RED

Arduino Node

Page 16: IoT, APIs und Microservices - alles unter Node-RED

Arduino Node

Page 17: IoT, APIs und Microservices - alles unter Node-RED

Arduino Node

Page 18: IoT, APIs und Microservices - alles unter Node-RED

Arduino Twitter Beispiel

Twitter

Arduino

function-Node

{ topic: ‘tweets/$TWITTER_USER_ID', payload: '$TEXT', lang: 'en', tweet: { created_at: 'Mon Mar 16 16:16:016 +0000 2017', id: 1234, id_str: '1234', text: '$TEXT', display_text_range: [ 0, 90 ], source: '$SOURCE', user: { id: 1234, id_str: '1234', name: '$TWITTER_NAME', screen_name: '$NAME', ...

Page 19: IoT, APIs und Microservices - alles unter Node-RED

Arduino Twitter

Page 20: IoT, APIs und Microservices - alles unter Node-RED

YaaS

<Screenshot>

Page 21: IoT, APIs und Microservices - alles unter Node-RED

Twitter YaaS Beispiel

Page 22: IoT, APIs und Microservices - alles unter Node-RED

Twitter Shopping

Page 23: IoT, APIs und Microservices - alles unter Node-RED

Build your own Node

Page 24: IoT, APIs und Microservices - alles unter Node-RED

Code

Page 25: IoT, APIs und Microservices - alles unter Node-RED

AgendaÜberblick Node-RED Flows anlegen Node-Module installieren Build your own Node

Page 26: IoT, APIs und Microservices - alles unter Node-RED

“Werbung”

Entwicklermagazin März/April 2.2017

Page 27: IoT, APIs und Microservices - alles unter Node-RED

Thank you!@choas

Page 28: IoT, APIs und Microservices - alles unter Node-RED

Links

Node-RED: http://nodered.org/

Installation: http://nodered.org/docs/getting-started/installation

Raspberry Pi: http://nodered.org/docs/hardware/raspberrypi

Node-RED Library: https://flows.nodered.org/

Node-RED Arduino Library: https://flows.nodered.org/node/node-red-node-arduino

Node-RED YaaS Library: https://flows.nodered.org/node/node-red-contrib-yaas

Blog posts:

• How to use YaaS with Node-RED: https://labs.hybris.com/2016/08/08/use-yaas-with-node-red/

• Triggering and checkout with Node-RED and YaaS: http://labs.hybris.com/2016/08/09/triggering-checkout-node-red-yaas/

• Order created: http://labs.hybris.com/2016/08/11/order-created/

• 14% OFF – Coupons with Node-RED: https://labs.hybris.com/2016/08/12/14-off-coupons-node-red/


Top Related