Your SlideShare is downloading. ×
0

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

An Introduction to Eclipse Kura - Eclipse Day Florence 2014

1,412

Published on

Deploying and configuring one device to act as a node in the Internet of Things is relatively easy. Doing the same for hundreds or thousands of devices is not so easy though. This is where the new …

Deploying and configuring one device to act as a node in the Internet of Things is relatively easy. Doing the same for hundreds or thousands of devices is not so easy though. This is where the new Eclipse project Kura comes in.
Kura is a Java/OSGi-based container for M2M applications running in service gateways.
Kura was contributed to Eclipse by Eurotech who developed the original technology to run on everything from general purpose devices, rugged mobile computers, wearable devices, service gateways and vehicle consoles, all the way down to the Raspberry Pi.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,412
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
90
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Eclipse Kura: an Introduction Cristiano De Alti, EUROTECH Eclipse Day Florence 23 May 2014
  • 2. Eclipse IoT Applying open source to end-to-end IoT solutions
  • 3. Kura Project – Java/OSGi-based container for M2M applications running in service gateways – http://projects.eclipse.org/projects/technology.kura – Kura code available since March 2014 – 12 committers – Open source version of the Everyware Software Framework (ESF) – Most of the ESF codebase contributed to Kura. Some parts waiting for IP approval
  • 4. OSGi on IoT Gateway Software Stack Linux Hardware Application Java VM Application • Built-in OSGi Services for IoT Apps • High-level Programming Language • Software Modularity • Configuration Management • Application Management • Shorter Time-to-Market • Device Abstraction • Application Portability • Investment Protection • Integrated Device Cloud features Application
  • 5. Functional Overview Java VM OSGi Application Container Device Abstraction Gateway Basic Services Network Configuration Network Management Field Protocols Connectivity and Delivery AdministrationGUI Operation&Management Linux Hardware Multi- Service Gateway App 1 App 2 App n. . . . Applications
  • 6. on Java VM OSGi Application Container Field Protocols Connectivity and Delivery AdministrationGUI Applications Operation&Management Gateway Basic Services Network ConfigurationNetwork Management Device Abstraction Device Abstraction USB javax.usb OtherGPIO I2C Ready to use OSGi bundles exposing Java APIs for device access and with the native code dependencies pre-compiled. Serial javax.comm Bluetooth javax.bluetoothDevice Abstraction
  • 7. Gateway Basic Services on Java VM OSGi Application Container Field Protocols Connectivity and Delivery AdministrationGUI Applications Operation&Management Network ConfigurationNetwork Management Device Abstraction Gateway Basic Services Gateway Basic Services Watchdog Service Clock Service GPS Position Service Embedded Database Service Process Service Device Profile Service Configurable OSGi Services available to the applications to interact with the basic gateway functionality. Configuration Service
  • 8. Network Management Network Management Link Monitor Ethernet on Java VM OSGi Application Container Field Protocols Connectivity and Delivery AdministrationGUI Applications Operation&Management Gateway Basic Services Device Abstraction Network ConfigurationNetwork Management WiFi Cellular DHCP NAT DNS Firewall Configurable OSGi Services to access the current network configuration and administer it. It interacts with the Linux system to configure network interfaces including WiFi access points and PPP connections.
  • 9. Connectivity and Delivery on Java VM OSGi Application Container Field Protocols AdministrationGUI Applications Operation&Management Gateway Basic Services Network ConfigurationNetwork Configuration Device Abstraction Connectivity and Delivery Connectivity & Delivery Eclipse Paho (MQTT) Other Client Data Transport Data Service Cloud Service Configurable OSGi Services which greatly simplify the development of telemetry M2M applications interacting with a remote Cloud server.
  • 10. Operation & Management on Java VM OSGi Application Container Field Protocols Connectivity and Delivery AdministrationGUI Applications Gateway Basic Services Network ConfigurationNetwork Configuration Device Abstraction Operation&Management Remote System Command Remote Configuration Management Operation & Management Remote Software Updates Remote Log Retrieval Device Diagnostic Service Remote VPN Access
  • 11. Administration UI
  • 12. Developer’s Experience
  • 13. Greenhouse Demo Architecture Mqtt Broker Web Application MQTT Mosquitto HTTP LightModbus
  • 14. Greenhouse Demo MQTT Topics and Payloads greenhouse/ sensors • Timestamp • Metrics: • request ID • Timestamp • Metrics: • temperature • humidity • luminosity • open Kura Payload Kura Payload EXEC/window/open EXEC/window/close REPLY/<request ID> • Timestamp • Metrics: • Reply code Kura Payload
  • 15. Greenhouse Demo Anatomy of a Kura Cloud Application public class GreenHouse extends Cloudlet implements ConfigurableComponent
  • 16. Greenhouse Demo Anatomy of a Kura Cloud Application (Metatype) A ConfigurableComponent has a metatype... <?xml version="1.0" encoding="UTF-8"?> <MetaData xmlns="http://www.osgi.org/xmlns/metatype/v1.2.0" localization="en_us"> <OCD id="org.eclipse.kura.demo.greenhouse.v2.GreenHouse" name="GreenHouse" description="Greenhouse example application."> <AD id="modbus.serialMode" name="modbus.serialMode" type="String" cardinality="0" required="true" default="RS232" description="Serial Mode (RS232 or RS485), or TCP for TCP-encapsulated Modbus."> <Option label="RS-232" value="RS232"/> <Option label="RS-485" value="RS485"/> <Option label="TCP" value="ETHERTCP"/> </AD> ... ...describing its configuration
  • 17. Greenhouse Demo Anatomy of a Kura Cloud Application (Configuration) Metatype is used to display the configuration dinamically
  • 18. Greenhouse Demo Anatomy of a Kura Cloud Application (Configuration) Configuration received in DS activate/updated methods protected void activate(ComponentContext componentContext, Map<String, Object> properties) protected void updated(Map<String, Object> properties)
  • 19. Greenhouse Demo Anatomy of a Kura Cloud Application (Publishing) public void setCloudService(CloudService cloudService) { m_cloudService = cloudService; } protected void activate(ComponentContext componentContext, Map<String, Object> properties) { ... // Acquire a Cloud Application Client for this Application m_cloudClient = m_cloudService.newCloudClient("greenhouse"); m_cloudClient.addCloudClientListener(this); ... } protected void doPublish() { ... KuraPayload kuraPayload = new KuraPayload(); kuraPayload.addMetric("temperature", temperature); kuraPayload.addMetric("luminosity", luminosity); kuraPayload.addMetric("humidity", humidity); kuraPayload.addMetric("open", open); m_cloudClient.publish("sensors", kuraPayload, DFLT_QOS, DFLT_RETAIN,DFLT_PRIORITY); ... }
  • 20. Greenhouse Demo Anatomy of a Kura Cloud Application (Requests) public class GreenHouse extends Cloudlet implements ConfigurableComponent public GreenHouse() { super("greenhouse"); } @Override protected void doExec(CloudletTopic reqTopic, KuraRequestPayload reqPayload, KuraResponsePayload respPayload) throws KuraException { String[] resources = reqTopic.getResources(); if (resources == null || resources.length < 2 || !resources[0].equals("window")) { respPayload.setResponseCode(KuraResponsePayload.RESPONSE_CODE_NOTFOUND); return; } boolean open = false; if (!((open = resources[1].equals("open")) || resources[1].equals("close"))) { respPayload.setResponseCode(KuraResponsePayload.RESPONSE_CODE_NOTFOUND); return; } ... }
  • 21. Where to start?
  • 22. www.eurotech.com Thank You!

×