Getting Started with the AllJoyn Lighting Service Framework Lighting SDK Android September 30, 2014

Similar documents
Getting Started with the AllJoyn Lighting Service Framework 14.12

Getting Started Android + Linux. February 27 th, 2014

Cid Santos Luis Matos. Introduction to AllJoyn

Present and Act Upon. Register. Consume. Stream Analytics. Event Hubs. Field Gateway. Applications Cloud Gateway. Legacy IoT (custom protocols)

Manual Instruction for. AU06-DL13W/RGB/30K MiLight Wifi LED Controller

Programming the Internet of Things

Introducing BEEKS Proximity Solutions. Developer Kit Gets You Started

How to Write AllSeen Alliance Self- Certification Test Cases September 25, 2014

IoT Cloud, All Seen Alliance. Masanari Arai 荒 井 真 成 CEO, Kii Corpora0on

User's Guide. [Home Network] app. Model No.

What is Bitdefender BOX?

AllJoyn Analytics Service Framework 1.0 Interface Definition

IOTIVITY AND EMBEDDED LINUX SUPPORT. Kishen Maloor Intel Open Source Technology Center

Homeguard Wireless Home Camera Quick Start Guide

User s manual for Android Application

My Scale Just Told the Cloud I m Fat Access Management, Security, Privacy and IOT

Secure Cloud and Remote Service Connections for AllJoyn Applications

Design for Success: Designing for the Internet of Things with TiWiConnect

Secure Cloud and Remote Service Connections for AllJoyn Applications

Open Sourcing the Internet of Things

Secure Cloud and Remote Service Connections for AllJoyn Applications

SYSTEM COMPONENTS. Gateway. Sensors. Repeater Figure 1

Customer Onboarding Guide. How to successfully set up your service 2-9 users

Using the T&D Thermo App with TR-7wf Data Loggers

Quick Start. Nighthawk X8 AC5300 Tri-Band WiFi Router Model R8500. Package Contents. NETGEAR, Inc. 350 East Plumeria Drive San Jose, CA USA

Mopria Certification on Xerox Devices Built on Xerox ConnectKey Technology White Paper

AllJoyn Device System Bridge

FAQs. Conserve package. Gateway... 2 Range Extender... 3 Smart Plug... 3 Thermostat... 4 Website... 7 App and Mobile Devices... 7

The LimitlessLED Wifi Bridge 4.0 is compatible with RGBW(new), RGB(old), and Dual White(current) LimitlessLED lightbulbs.

Powerline 500 WiFi Access Point XWN5001 Installation Guide

Development of a new service using Wi-Fi Direct

User Manual. Ver 1.0. Solutions for the Digital Life

HP Advanced Wireless Docking Station. User Guide

EM6230 e-camview HD outdoor IP camera

BlackVue Cloud App Overview...3. Getting Started...6. Basic Menu Screens BlackVue Cloud BlackVue Wi-Fi Internal Memory...

It is highly recommended to view in full screen mode

Comtrend 1 Port Router Installation Guide CT-5072T

Error! Bookmark not defined. Error! Bookmark not defined. Error! Bookmark not defined.

NETGEAR /ValuePoint Networks Interoperability Report

Affinegy 1705 S. Capital of Texas Hwy, Ste. 310, Austin, TX (512)

Push2TV Wireless Display Adapter

Powerline 500 WiFi Access Point (XWN5001) Installation Guide

SETUP INFO THA-103AC (V1.0R) THA-103AC UPC #

Honeywell Internet Connection Module

v1.0 8/15/2011 MSI USA

IST STREP Project. Deliverable D3.3.1u Middleware User s Guide Multi-Radio Device Management Layer.

Sophos Mobile Control User guide for Android

Intel Unite Solution. Standalone User Guide

BlackHawk for MAC Software User Guide

Beyond the Gateway. Mitchell Golner VP, Product Strategy, wot.io. e: 20 October 2015 AllSeen Alliance 1

PLEASE READ THIS FIRST

Home Monitoring and Control service provided by Verizon Online LLC

Powerline 500 WiFi Access Point (XWNB5201) Installation Guide

Networking. Introduction. Types of Wireless Networks. A Build-It-Ourselves Guide to Wireless Mesh Networks

ScreenBeam Mini 2 Wireless Display Receiver

ZigBee Home Automation User Guide

ALTIRIS Deployment Solution 6.8 PXE Overview

Hi! Let s get started.

Intermedia Cloud Softphone. User Guide

Cisco Stadiumvision Mobile Software Development Kit

Collaborative learning solutions for higher education

TELUS Business Connect Customer Onboarding Guide. How to successfully set up your service

HRG App for Android Devices. User Guide

IOIO for Android Beginners Guide Introduction

AllJoyn Android Environment Setup Guide

Networking and Technology Tool Guide

APPLICATION NOTE. AT16268: JD Smart Cloud Based Smart Plug Getting. Started Guide ATSAMW25. Introduction. Features

Linksys WAP300N. User Guide

The perfect complement to the Wink app to control and monitor all your connected devices.

Network/Floating License Installation Instructions

AllJoyn Framework System Overview

En Wireless Mobile Utility (Android) User s Manual. D610, D600, D7100, D5300, D5200, D3300, Df

CS 528 Mobile and Ubiquitous Computing Lecture 2: Android Introduction and Setup. Emmanuel Agu

MediaTek LinkIt Smart 7688 FAQ

Media Wireless Sharing

Developer Day System Architecture. Michael Troß Sept 20 th 2012

WeMo Release Versions for App, Cloud and WeMo Link firmware for WeMo LED Starter Kit

Quick Start. PowerLINE WiFi 1000 Models PL1000 and PLW1000

Quick Installation Guide

Hands-on MESH Network Exercise Workbook

Phonak Wireless Communication Portfolio

Learn what a cloud phone system can do for your business.

USER GUIDE. Ethernet Configuration Guide (Lantronix) P/N: Rev 6

Sophos Mobile Control User guide for Android. Product version: 4

Harmony Smart Control. User Guide

TE100-P21/TEW-P21G Windows 7 Installation Instruction

SwannEye HD Security Camera Wi-Fi Connections Quick Setup Guide. Welcome! Lets get started.

LIGHTIFY Pro Commissioning and control (Tablet / Smart Phone)

Hi! Let s get started.

OWNER S MANUAL OWNER S MANUAL

AirPatrol WiFi Full Manual V1.0

User Manual. EtherUSB

Wireless Music Adapter. Add existing audio systems to the party

PLA4231. User s Guide. Quick Start Guide. 500 Mbps Powerline Wireless N Extender. Default Login Details. Version 1.00 Edition 1, 12/2012

WUA Mbps Wireless USB Network Adapter

ProSAFE 8-Port and 16-Port Gigabit Click Switch

IEEE /ZigBee USB Dongle

N300 WiFi Range Extender

SAS-IPCAM115 MANUAL IP CAMERA

Configuring and Managing Token Ring Switches Using Cisco s Network Management Products

Transcription:

Getting Started with the AllJoyn Lighting Service Framework 14.06 Lighting SDK Android September 30, 2014 This work is licensed under a Creative Commons Attribution 4.0 International License. http://creativecommons.org/licenses/by/4.0/ Any and all source code included in this work is licensed under the ISC License per the AllSeen Alliance IP Policy. https://allseenalliance.org/allseen/ip-policy AllJoyn is a trademark of the AllSeen Alliance. Other products and brand names may be trademarks or registered trademarks of their respective owners.

Contents 1 Introduction... 3 1.1 Purpose... 4 1.2 Scope... 4 1.3 References... 4 1.4 Acronyms and terms... 4 2 Overview... 6 2.1 Lamp service... 6 2.2 Controller service... 6 2.3 Lighting SDK... 7 3 Obtaining Lighting SDK... 8 4 Overview of Lighting SDK... 9 4.1 LightingDirector class... 9 4.2 Lamp class... 10 4.3 Group class... 10 4.4 Scene class... 11 ii AllSeen Alliance

1 Introduction The AllJoyn Lighting SDK provides a simple Lighting API to application developers to build AllJoyn applications to control the Lighting solution provided by Lighting service framework. The Lighting service framework comprises two service components: Lamp service: Enables an embedded lighting device (such as a connected light bulb) to be controlled by the Controller service. Controller service: Enables AllJoyn applications (e.g., an application running on a smartphone) to control the Lamp service. Lighting OEMs can embed the Lamp service in the firmware of their lighting products to enable Smart Lighting features. The Controller service is designed to find all devices running the Lamp service on the AllJoyn network and provide additional functionality to control the lighting devices in a variety of ways (e.g., create and control a group of lights simultaneously and applying custom lighting effects). The Controller service can reside in lighting device, a hub, router, gateway, mobile device (smartphone or tablet), desktop, or home automation controller. Developers can build AllJoyn applications that will communicate with the Controller service. Lighting SDK is a thin-layer with simple APIs which abstract the Controller service client. Note This documentation is for the Lighting SDK - Android. Figure 1 illustrates the Lighting service framework components and their interaction with an OEM device. Lamp service Light bulb Lamp service Light bulb... Lamp service Light bulb Lamp service Light bulb AllJoyn app (Controller service client) Mobile device AllJoyn app (Controller service client) Mobile device Controller service AllJoyn app Mobile device (smartphone/tablet) (Controller service) (Controller service client) Mobile device Wireless router Figure 1: Lighting service framework components 3 AllSeen Alliance

Introduction 1.1 Purpose This document provides an overview of the Lighting service framework and detailed instructions on how to start using the Lighting SDK. The following topics are covered: Overview of the Lighting service framework Overview of the Lighting SDK Obtaining and building the Tutorial lighting apps using Lighting SDK 1.2 Scope This document is written for OEMs and developers and assumes competent knowledge of AllJoyn development. It will focus on the main components of the Lighting service framework. 1.3 References The following documents are references found on the AllSeen Alliance web site's Docs/Downloads section. AllJoyn Framework Tutorial Introduction to the AllJoyn Framework Introduction to AllJoyn Thin Library AllJoyn Troubleshooting Guide Getting Started AllJoyn Lighting Service Framework Lamp Service Getting Started AllJoyn Lighting Service Framework Controller Service 1.4 Acronyms and terms Term AllJoyn Standard Core Library Announcement Configuration service framework Controller service Definition An application or AllJoyn daemon process that contains the full implementation of the AllJoyn message bus. A sessionless signal whose payload includes published services' interfaces and metadata that are used for discovery. Software layer that enables devices to provide remote configuration of AllJoyn service frameworks' metadata (ConfigData) in a session. Maintains the Lamp Group, Scene, and Presets on behalf of the Lamps. The Controller service is a logical entity that can reside in a hub, router, gateway, smartphone/tablet, desktop, or home automation controller. 4 AllSeen Alliance

Introduction Term Lamp group Lamp service Lighting service framework Notification service framework Onboarding service framework Preset Scene Definition A logical grouping of Lamps allowing them to be controlled simultaneously as they are a single Lamp Client service implemented in a Lamp, enabling it to be controlled by the Controller service. A Lamp service can reside in a lamp, luminaire, light switch, plug, outlet, or socket adapter and can leverage the AllJoyn Standard Core or Thin Client Library. AllJoyn framework that provides a means to build a complete lighting solution. It consists of the Controller service and Lamp service. Software layer that enables devices to send or receive human-consumable notifications. Software layer that enables devices to provide remote configuration (OnboardingData) and control (driver mode) over a device's onboarding process to a Wi-Fi AP over an AllJoyn session. Saving the Lamp or Lamp group state (Hue, Saturation, Color Temperature, Brightness) and giving it a friendly name. Lighting setup for a particular event, for example, dimming the lights when a movie is on. The user can create a scene that they can apply to a set of lights. 5 AllSeen Alliance

2 Overview The Lighting service framework is part of a comprehensive lighting system that allows OEMs and developers to build lighting hardware that performs the following functions: Runs the Lamp service Create applications that interface with the Controller service to control lighting hardware. 2.1 Lamp service The Lamp service uses the AllJoyn Thin Core Library and is meant to be run on embedded hardware like a light bulb. The Lamp service uses several AllJoyn service frameworks to allow the embedded hardware to communicate with other devices on the AllJoyn network. 1. The Onboarding service framework connects the hardware to the Wi-Fi network. 2. Once onboarded, the About feature allows the Lamp service to broadcast its presence on the network. 3. Any device that receives the About announcement can connect directly to the Lamp service and use the Configuration service framework to modify settings as well as perform other operations like factory reset. 4. The Lamp service uses the Notification service framework to notify the user of any problems with the light. 2.2 Controller service The Controller service uses the AllJoyn Standard Library and is configured to listen for any lighting devices running the Lamp service that may be present on the network. The Controller service will discover any lighting device connected to the network by receiving the About announcement and then connecting directly to the device using an AllJoyn session. The Controller service can then perform operations on the Lamp service such as: Toggle the light on and off Retrieve power consumption and light details Set the brightness or hue of the light The Controller service can control every lighting device connected to your network. Developers can then build AllJoyn applications that communicate directly with the Controller service and control their lighting devices. The Controller service also provides developers the ability to grouped lights together and control them simultaneously, and create a custom lighting experience using scenes. Developers have the freedom to create a variety of applications to control their lights. 6 AllSeen Alliance

In order to provide a easy way for developers to use Controller service, Controller service client was created. Controller service client provides a set of C/C++ APIs to application developers to access Controller service. 2.3 Lighting SDK Lighting SDK consists of 2 components: Simple set of Android-native lighting APIs abstracting the Controller service client and the setup complexity of AllJoyn Simple tutorial Android application which illustrates how to use the lighting SDK API Lighting SDK APIs is a thin-layer built on top of the Controller service client. These APIs are Android-native APIs, so developers can directly use these APIs in their application without dealing with JNI. Developers are encouraged to use the provided tutorial Android application as a reference. Figure 2 illustrates the Controller service, Controller service client framework, and Lighting SDK AllJoyn Apps Lighting SDK Framework files OEM files Controller Service Controller Service OEM layer Controller Service Client AllJoyn Standard Library AllJoyn Standard Library Controller Hardware AllJoyn Apps Figure 2: Controller Service, Controller Service Client, and Lighting SDK 7 AllSeen Alliance

3 Obtaining Lighting SDK This chapter provides instructions to configure the Lighting SDK. Verify your allseenalliance.org account has been created and you have received email confirmation before completing the procedures in this chapter. 1. Access AllSeen Alliance Lighting working group Wiki: https://wiki.allseenalliance.org/tsc/connected_lighting. 2. From the wiki, it has a direct link for downloading the Lighting SDK Android zip file. 3. In the Lighting SDK Android zip file, here is the high-level file structure: Android\README.txt o Detailed step-by-step instruction on how to load and build the tutorial application on Eclipse. Android\Libraries o o Consists of Lighting service framework helper libraries, which abstract the Controller service client Consists of AllJoyn libraries Android\LSFTutorial o o Consists of a standalone Android application illustrating how to use Lighting SDK APIs to perform simple lighting operations...\src\org\allseen\lsf\tutorial\tutorialactivity.java This is the only source file for this tutorial application. Note The full source of Lighting SDK libraries is available in AllSeen Alliance. 8 AllSeen Alliance

4 Overview of Lighting SDK This chapter provides an overview of the Lighting SDK 4.1 LightingDirector class In the Lighting SDK, the single entry class for developers is LightingDirector class. LightingDirector class consists of the following major APIs: start() stop() Initializes and establishes connection with the Lighting Controller via AllJoyn in the network. Stops and cleans up the LightingDirector and its resources. postonnextcontrollerconnection() getlamps() getgroups() getscenes() getversion() Lighting SDK will executes this callback method when a successful connection with Lighting Controller is established. Get an array of all active lamp objects (see Section 4.2) in the network Get an array of all active lamp group objects (see Section 4.3) in the network Get an array of all active scene objects (see Section 4.4) available in the network Get the API version. If there is any revisions, and additions to the APIs under LightingDirector class, the API version will be updated. getbusattachment() Get the AllJoyn Bus Attachment object created by Lighting SDK Note Detailed comment and method argument are documented as JavaDocs. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. Note Additional APIs may be added and revised in AllSeen Alliance. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. 9 AllSeen Alliance

4.2 Lamp class In the Lighting SDK, the Lamp objects returned by LightingDirector::getLamps() is of type of Lamp class: turnon() turnoff() Turn on the Lamp Turn off the Lamp setcolor(hue, Saturation, Brightness, ColorTemperature) Set the Lamp state based on the provided arguments, Hue, Saturation, Brightness, and Color Temperature. Note Detailed comment and method argument are documented as JavaDocs. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. Note Additional APIs may be added and revised in AllSeen Alliance. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. 4.3 Group class In the Lighting SDK, the Lamp group objects returned by LightingDirector::getGroups() is of type of Group class: turnon() turnoff() Turn on the Lamp group Turn off the Lamp group setcolor(hue, Saturation, Brightness, ColorTemperature) Set the Lamp group state based on the provided arguments, Hue, Saturation, Brightness, and Color Temperature. Note Detailed comment and method argument are documented as JavaDocs. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. Note Additional APIs may be added and revised in AllSeen Alliance. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. 10 AllSeen Alliance

4.4 Scene class In the Lighting SDK, the Lamp group objects returned by LightingDirector::getScenes() is of type of Scene class: apply() Apply the scene Note Detailed comment and method argument are documented as JavaDocs. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. Note Additional APIs may be added and revised in AllSeen Alliance. Please refer to https://wiki.allseenalliance.org/tsc/connected_lighting for the latest info. 11 AllSeen Alliance