IoT Connectivity in webOS OSE
Author: Seokhee Lee
webOS Open Source Edition (OSE) includes IoTivity and iotivity-node for developers to implement web apps, native apps, and services that are needed to support IoT connectivity based on Open Connectivity Foundation (OCF) standard specification.
- IoTivity: The open source reference implementation of the OCF standard specifications.
We are contributing the platform adapter for webOS OSE to IoTivity. The adapter enables IoTivity to interact with webOS connectivity components through webOS Bus system (Luna Bus). With the adapter, you can monitor connectivity status and send/receive data for non-IP transport such as BLE/BT.
Using low-level interface
var iotivity = require("iotivity-node/lowlevel"); ... iotivity.OCInit(...); ...
Using high-level interface
var device = require("iotivity-node"); ... device.server.oncreate(...); ...
JS services can be packaged into a web app and allow the app to operate, even when the app is not running on the foreground. JS service also provides additional access to platform features which are usually unavailable to web apps such as low-level networking, file system access, and binary data processing. Therefore, you can implement most IoT features in your web app using JS service. For more detailed information about using iotivity-node in webOS OSE, refer to the example web app in IoTivity webOS build Instructions.
Developer guides for web apps and JS services of webOS OSE are as follows:
Using IoTivity for Native App and Service
webOS OSE has not provided SDK tools for native app or services yet; however, platform developers can access built-in IoTivity directly and develop their own native services. For more detailed information about developing webOS native services using IoTivity in webOS OSE, refer to the native service example in the IoTivity webOS Build Instructions.
Getting IoTivity and iotivity-node
The current version of IoTivity and iotivity-node in webOS OSE is 1.2.1. The next version (1.3.1 or higher) is going to be released together with the upcoming release of webOS OSE; however, you can download all available recipes and patches as below.
IoTivity build recipes and patches for webOS