visualization of iot data with minecraft

30
@choas #Devoxx #IoTMinecraft Visualization of IoT Data with Minecraft Lars Gregori hybris GmbH

Upload: lars-gregori

Post on 13-Apr-2017

1.016 views

Category:

Data & Analytics


2 download

TRANSCRIPT

@choas#Devoxx #IoTMinecraft

Visualization of IoT Data with Minecraft

Lars Gregori hybris GmbH

@choas#Devoxx #IoTMinecraft

Agenda

• IoT sensor data

• store data

• Minecraft API

@choas#Devoxx #IoTMinecraft

IoT sensor data

• light

• temperature

• noise

• …

@choas#Devoxx #IoTMinecraft

void  setup()  {      Serial.begin(57600);  }  

void  loop()  {      int  lightValue  =  analogRead(A0);      Serial.print(lightValue);      Serial.print(";");      Serial.println(getDS18S20temperature());      delay(5000);  //  wait  5  secs.  }

Arduino Code

Demo

@choas#Devoxx #IoTMinecraft

@choas#Devoxx #IoTMinecraft

Agenda

• IoT sensor data

• store data

• Minecraft API

@choas#Devoxx #IoTMinecraft

store data

• Internet of things

@choas#Devoxx #IoTMinecraft

store data

• Internet of things

• HANA HCP

• Internet of Things Service

• HANA DB

• REST, JDBC

• time series data

• Prediction

@choas#Devoxx #IoTMinecraft

Arduino Gateway Raspberry Pi

Minecraft

HANAHCP

HANA DB

RESTREST, JDBCserial

@choas#Devoxx #IoTMinecraft

Demo

@choas#Devoxx #IoTMinecraft

@choas#Devoxx #IoTMinecraft

RequestBody  body  =  RequestBody.create(mediaType,  "{\"mode\":\"sync\",\"messageType\":\""  +  messageTypeId  +  "\",\"messages\":[{\"light\":"  +  value  

  +  “}]}");  

Request  request  =  new  Request.Builder()  .url(“https://iotmmsd123456.hanatrial.ondemand.com/“    

+  “com.sap.iotservices.mms/v1/api/http/data/"  +  sensorId).post(body)  

.addHeader("authorization",  "Bearer  "  +  Config.TOKEN)  

.addHeader("content-­‐type",  "application/json;  charset=utf-­‐8")  

.build();

adding data to HANA via REST

@choas#Devoxx #IoTMinecraft

Demo

@choas#Devoxx #IoTMinecraft

@choas#Devoxx #IoTMinecraft

more …

• https://github.com/SAP/iot-starterkit

• Sending messages from the device

• Consuming the messages sent from the device

• Pushing messages to the device

• Receiving the messages sent to the device

@choas#Devoxx #IoTMinecraft

@choas#Devoxx #IoTMinecraft

Agenda

• IoT sensor data

• store data

• Minecraft API

@choas#Devoxx #IoTMinecraft

Minecraft 1st version

@choas#Devoxx #IoTMinecraft

Temperature mountain

@choas#Devoxx #IoTMinecraft

Summer 2015

@choas#Devoxx #IoTMinecraft

Minecraft API

• Raspberry Pi

• free

• API << languages: Python, Java, Node.js

• getPos, setPos

• getBlock, setBlock, setBlocks

• pollBlockHits

Demo

@choas#Devoxx #IoTMinecraft

@choas#Devoxx #IoTMinecraft

Minecraft tips

• set player at the beginning

• clear scene

• slow down

• don’t render all

@choas#Devoxx #IoTMinecraft

What else?

• more sensor data

• button

• from Minecraft to something else

@choas#Devoxx #IoTMinecraft

WHY?

• 3D view

• nice background

• not business style

• (monitoring)

• “mining” your data

• multi player = multi viewer

• more???

@choas#Devoxx #IoTMinecraft

thing++

@choas#Devoxx #IoTMinecraft

Have you tried to build a shop … https://hackingat.hybris.com/2015/08/05/have-you-tried-to-build-a-shop-with-minecraft-our-kids-have/

@choas#Devoxx #IoTMinecraft

@choas#Devoxx #IoTMinecraft

Links

• Source code: https://github.com/choas/IoT-Minecraft

• hybris labs blog: https://labs.hybris.com/

• hacking at hybris: http://hackingat.hybris.com/

• HANA - SAP/iot-starterkit

• https://github.com/SAP/iot-starterkit

• https://tools.hana.ondemand.com/#hanatools

• Java Serial communication:

• http://eclipsesource.com/blogs/2012/10/17/serial-communication-in-java-with-raspberry-pi-and-rxtx/

@choas#Devoxx #IoTMinecraft

More links• Try out the SAP HANA Cloud Platform Internet of Things (IoT)

Services: http://scn.sap.com/docs/DOC-63811

• Connecting an ESP8266 to the SAP HANA Cloud Platform

• http://scn.sap.com/community/cloud-platform/blog/2015/08/01/connecting-an-esp8266-to-the-sap-hana-cloud-platform

• Experience with Hana Cloud Platform IoT Services

• http://scn.sap.com/community/cloud-platform/blog/2015/05/15/experience-with-hana-cloud-platform-iot-services