Eclipse is much more than an IDE. Repeat after me: "Eclipse is much more than just an IDE! Eclipse has a lot of cool projects that can get me started with the Internet of Things!". So whether or not you are using Eclipse as your IDE, this session will give you a crash course on the available technologies to build the Internet of Things on top of Java. You will learn how protocols like MQTT, CoAP or LwM2M and embedded frameworks like Kura help solve classical IoT issues, and you will get useful tips to move from "yay, I blinked an LED!" to more useful industrial IoT scenarios.
14. Talking to sensors?
● Pi4J – http://pi4j.com
○ Complete access to GPIOs/I2C/SPI
○ Very mature codebase, based on WiringPi
○ Support for popular shields (PiFace, Gertboard, …)
○ Lots of code samples
15. Talking to sensors?
Gp o on o e p o = Gp oFa o . e Ins an e();
Gp oP nD a Ou pu p n = p o.p o s onD a Ou pu P n(
Rasp P n.GPIO_01, "M LED", P nS a e.HIGH);
Th ead.s eep(5000);
p n. ow();
Th ead.s eep(5000);
p n. o e();
p o.shu down();
20. Connect?
● CoAP
○ « HTTP over UDP »
○ Expose your device as a resource to the Internet of
Things
● MQTT
○ Publish/Subscribe model
○ More room for local processing
22. Eclipse Californium
● Focus on scalability and usability
● To be used in IoT cloud servers or M2M/IoT
devices running Java
● Includes DTLS implementation (Scandium),
HTTP/CoAP bridge, Plugtests, …
http://eclipse.org/californium
23. import static org.eclipse.californium.core.coap.CoAP.ResponseCode.*;
public class MyResource extends CoapResource {
@Override
public void handleGET(CoapExchange exchange) {
exchange.respond("hello world"); // reply with 2.05 payload (text/plain)
}
@Override
public void handlePOST(CoapExchange exchange) {
exchange.accept(); // make it a separate response
if (exchange.getRequestOptions() ...) {
// do something specific to the request options
}
exchange.respond(CREATED); // reply with response code only (shortcut)
}
}
31. First steps with Kura
● Network management
○ Cellular Modem, WiFi
○ Firewall
○ NAT
● OSGi and system administration
● IoT server communication settings
40. Kura API
● OSGi services that you can re-use in your own
components
○ o Se e
○ Da aSe e, oudSe e
○ p oSe e (AES, base64, SHA-1)
○ Pos onSe e (geolocation)
○ … and many others
● And of course you can leverage a huge
ecosystem of Java and OSGi libraries
41. Your typical Kura component
● Uses Modbus, CAN-Bus, etc. built-in device
abstraction services
○ Or implement your own service
42. Your typical Kura component (2)
• Uses Kura built-in transport services to talk to
the cloud
– TransportService – « raw » protocol
– DataService – local storage, auto reconnect
– CloudService – optimized binary payload, advanced
device management
43. Your typical Kura component (3)
• Implements ConfigurableComponent
– Enables configuration from the UI
– … as well as from the cloud
44. Your typical Kura component (4)
• Bundled with other bundles/components in a
deployment package
– Zip file containing a Manifest & OSGi bundles
• Can be deployed from Kura Web UI or over the air
Read more:
http://eclipse.github.io/kura/doc/kura-setup
51. Coming next?
● Device Management
○ LwM2M, LwM2M over MQTT, IPSO Smart Objects
● Security
○ TinyDTLS
● Open-source IoT server?
○ Several members interested in defining and
implementing the OpenStack for IoT