This documentation is for WSO2 IoT Server 3.1.0. View the documentation for the latest release.
Page Comparison - Writing Device Plugins via Java Code (v.1 vs v.2) - IoT Server 3.1.0 - WSO2 Documentation

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

When writing a device type using the Java Code approach you need to write the device plugin, APIs, transports, UI, and analytics components from scratch. This section describes how to write the device plugin.

titleWhy do we need a device plugin?
titleClick here for more information.

A device plugin is an OSGi bundle that gets wired with the WSO2 Connected Device Management Framework (CDMF). Whenwrtinga device type using the Java code approach the device requires a specific device plugin.  A specific device plugin is required due to the following reasons:

  • Enables its the device manufacturer or the device type creators to have control over the device.
  • A device can have its own unique set of attributes. Therefore it is necessary to maintain a separate data store to keep track of the data. This can be achieved by maintaining a separate data store for each device in the plugin layer.

Image Added

titleBefore you begin

Make sure you have the required folder structure, and the databases and datasources configured.

To understand the device plugin implementation let's take a look at the Raspberry Pi device implementation. Follow the steps given below to create a new device plugin: