visualization of iot data with minecraft
TRANSCRIPT
@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
@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
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
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
Minecraft API
• Raspberry Pi
• free
• API << languages: Python, Java, Node.js
• getPos, setPos
• getBlock, setBlock, setBlocks
• pollBlockHits
@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
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
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