SlideShare ist ein Scribd-Unternehmen logo
1 von 30
OSGi Alliance Residential Expert Group
Current Activities
January 30, 2014
OSGi Users‘-Forum Germany Meeting

COPYRIGHT © 2009-2010 OSGi Alliance. All Rights Reserved
OSGi Device Abstraction Layer
RFC 196
Common Device Representation

Page 2

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved
Without Device Abstraction Layer

Complex implementations, multiple dependencies

Page 3

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – RFP boundaries
•

•

API applicable for all relevant device
protocols
• General device data model
• Access to common device
properties
• Access to the device states
• Access to device meta info
• Device operations
• Management operations
• Data operations
API solving common problems with device
access
• Avoiding protocol specific behavior
• Avoiding application workarounds
• Avoiding custom device abstractions
• Avoiding uncontrolled dependencies
Page 4

•

•
•

•

Access control based on user and
application permissions
• Fine-grained security control
• Full flexibility of OSGi security
model
Security features available in the device
protocols
A notification mechanism is needed for:
• Device state monitoring
• Device data model monitoring
• Device operations monitoring
Extension points for new protocols
• Dynamic extension points
• Protocol independent
• Available at runtime

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Real Solution, first steps

Page 5

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties – Device

org.osgi.service.functionaldevice.Device
• Represents the device in the OSGi service registry.
• It’s possible to map a few OSGi device services to one
physical device.
• Provides an access to rich set of device properties:
status, name, description, types, model, firmware version
and vendor, hardware version and vendor etc.
• Provide basic management operations: remove, property
update, enable and disable
• Gives up a set of supported Device Functions
Page 6

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device statuses
• Device online status – indicates that the device is
currently available for operation. Possible transitions from
and to that status are:

Page 7

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device statuses
• Device offline status – indicates that the device is
currently not available for operations. Possible transitions
from and to that status are:

Page 8

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device statuses
• Device processing status – indicates that the device is
currently busy with an operation. Possible transitions to
and from that status are:

Page 9

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device statuses
• Device not initialized status – indicates that the device is
not fully initialized by the OSGi driver. The device can be
initialized later when it’s awakened. Possible transitions to
and from that status are:

Page 10

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device statuses
• Device not configured status - indicates that the device
requires additional configuration to become completely
connected to the network. An example, an additional
button has to be pushed. Possible transitions to and from
that status are:

Page 11

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device statuses
• Device disabled status – indicates that the device is
disabled for operation. Possible transitions from and to
that status are:

Page 12

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device statuses
• Device removed status – indicates that the device is
removed from the network. It’ll be unregistered from the
OSGi service registry.

Page 13

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device status detail
• Device status detail - holds the reason for the current
device status. For example, the device can be offline,
because the device is broken. We’ll have:
• status – offline
• status detail – device broken

Page 14

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties –
DeviceFunction
org.osgi.service.functionaldevice.DeviceFunction
• Represent a specific device functionality in OSGi service
registry like MultiLevelSwitch, BinarySensor etc.
• Can provide a set of properties with:
• Access type – eventable, writable and readable
• Additional metadata – description, min and max value, measurement unit etc.

• Can provide a set of operations with:
• Metadata – description, arguments min and max value, arguments measurement
unit etc.

Page 15

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device Function property
• Device Function property metadata:
• access type – represents the access to the function property
• eventable – the property value is reported with an event;
• writable – the property value can be changed;
• readable – the property value can be read;
• unit – represents the value unit;
• min and max value – if the property value cannot cross a given minimum or
maximum value;
• description – describes the property with a human readable description;
• values – contains a set of predefined values, which can be assigned to the
property;
• resolution – difference between two values in series.

Page 16

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device Function operation
• Device Function operation metadata:
• input arguments – they are using the same metadata as Device Function property
from the previous slide;
• output argument – it’s using the same metadata as Device Function property from
the previous slide;
• description – human-readable operation description.

Page 17

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Summary

Page 18

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties – functions
org.osgi.service.functionaldevice.functions
• There is a set of predefined device functions:
• BinaryControl – provides binary control support to manage functionalities based
on two state like: turnOn/turnOff, Start/Stop, Up/Down etc.
• BinarySensor – provides binary sensor monitoring like: motion/no motion
• MultiLevelControl – provides multi-level control support. Usual example is
dimmer, but can control any device with a set of acceptable values like temperature
control.
• MultiLevelSensor – provides multi-level sensor monitoring to collect information
about humidity, temperature etc.
• Meter – the meter can track metering information about electricity, water etc.
consumption
• Alarm – triggers an alarm event when the alarm sensor detects an alarm. It can
register an alarm because of smoke, water leak, heat etc.
• Keypad – provides information about a set of buttons.
Page 19

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties –
BinaryControl

org.osgi.service.functionaldevice.functions.BinaryControl
• Supported

operations:

• reverse – reverses the BinaryControl state i.e. if the current state is true, it’ll be
reversed to false and the opposite.
• setTrue – sets the BinaryControl state to true.
• setFalse – sets the BinaryControl state to false.

• Supported properties:
• state – provides information about the current state

• The BinaryControl data provides:
• value – reported value;
• timestamp – when the value is reported by the device or by the driver;
• additional metadata.

•Next steps – we are working on the concrete types. In
this way, we can map true and false to meaningful states
like open/close, start/stop etc.
Page 20

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties –
BinarySensor
org.osgi.service.functionaldevice.functions.BinarySensor

• No operations.
• Supported properties:
• state – provides information about the current state

•The BinarySensor data provides:
• value – reported value;
• timestamp – when the value is reported by the device or by the driver;
• additional metadata.

•Next steps – we are working on the concrete types. In
this way, we can map true and false to meaningful states
like opened/closed, started/stopped etc.

Page 21

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties –
MultiLevelControl
org.osgi.service.functionaldevice.functions. MultiLevelControl

• No operation.
• Supported properties:
• level – provides information about the current state

• MultiLevelControl data provides:
• value – reported value;
• unit – the reported value unit;
• timestamp – when the value is reported by the device or driver
• additional metadata

•Next steps – we are working on the concrete types. In
this way, we can map the level to something meaningful.

Page 22

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties –
MultiLevelSensor
org.osgi.service.functionaldevice.functions. MultiLevelSensor

• No operation.
• Supported properties:
• level – provides information about the current state

• MultiLevelSensor data provides:
• value – reported value;
• unit – the reported value unit;
• timestamp – when the value is reported by the device or driver
• additional metadata

•Next steps – we are working on the concrete types. In
this way, we can map the level to something meaningful.

Page 23

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties – Meter
org.osgi.service.functionaldevice.functions. Meter

• Supported operations:
• resetTotal – resets the total metering information.

• Supported properties:
• total – contains information about the total metering information
• current – contains information about the current metering information
• flow – if you are producer, there’ll be out flow; if you are consumer, there’ll be in
flow.

• Meter data provides:
• value – reported value;
• unit – the reported value unit;
• timestamp – when the value is reported by the device or driver
• additional metadata

•Next steps – we are working on the concrete types. In
this way, we can map the metering information to
something meaningful like water meter, gas meter etc.
Page 24

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties – Alarm
org.osgi.service.functionaldevice.functions. Alarm

• No operations.
•Supported properties:
• alarm – specifies the alarm property. It must be an eventable property.

• Alarm data provides:
• type – the alarm type
• severity – the alarm severity
• timestamp – when the alarm is triggered
• additional metadata

•Next steps – we are working on the concrete types. In
this way, we can map the metering information to
something meaningful like water leak alarm.
Page 25

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Involved Parties – Keypad
org.osgi.service.functionaldevice.functions. Keypad

• No operations.
•Supported properties:
• key – specifies the property for the key from the keypad.

• Keypad data contains information about the key:
• key code;
• key name;
• type: pressed, long pressed, double pressed, double long pressed.

Page 26

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Device Function Summary

Page 27

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
External Links
• https://github.com/osgi/design/blob/master/rfcs/rfc0196/
rfc-0196-DeviceAbstractionLayer.pdf

Page 28

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – An example
• Print all online devices.
final ServiceReference[] deviceSRefs = context.getServiceReferences(
Device.class.getName(), '(' + Device.PROPERTY_STATUS + '=' +
Device.STATUS_ONLINE + ')');
if (null == deviceSRefs) {
return; // no such services
}
for (int i = 0; i < deviceSRefs.length; i++) {
printDevice(deviceSRefs[i]);
}

Page 29

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14
Device Abstraction Layer – Example
•The code snippet sets to true all BinaryControl functions.
final ServiceReference[] binaryControlSRefs =
context.getServiceReferences(BinaryControl.class.getName(),
null);
if (null == binaryControlSRefs) {
return; // no such services
}
for (int i = 0; i < binaryControlSRefs.length; i++) {
final BinaryControl binaryControl = (BinaryControl)
context.getService(binaryControlSRefs[i]);
if (null != binaryControl) {
binaryControl.setTrue();
}
}

Page 30

COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved

30.01.14

Weitere ähnliche Inhalte

Andere mochten auch (6)

OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015
 
Gfk Smart Home Studie
Gfk Smart Home StudieGfk Smart Home Studie
Gfk Smart Home Studie
 
Vorstellung des Riena Patform Framework am Beispiel einer OSGi-ServerAdminist...
Vorstellung des Riena Patform Framework am Beispiel einer OSGi-ServerAdminist...Vorstellung des Riena Patform Framework am Beispiel einer OSGi-ServerAdminist...
Vorstellung des Riena Patform Framework am Beispiel einer OSGi-ServerAdminist...
 
Deutsche Telekom Smarthome - Eine Einführung
Deutsche Telekom Smarthome - Eine EinführungDeutsche Telekom Smarthome - Eine Einführung
Deutsche Telekom Smarthome - Eine Einführung
 
n-pat: Modulare Anwendungsplattform mit Smartcards
n-pat: Modulare Anwendungsplattform mit Smartcardsn-pat: Modulare Anwendungsplattform mit Smartcards
n-pat: Modulare Anwendungsplattform mit Smartcards
 
SXSW 2016 takeaways
SXSW 2016 takeawaysSXSW 2016 takeaways
SXSW 2016 takeaways
 

Ähnlich wie OSGi Alliance Residential Expert Group

API Management and Internet of Things
API Management and Internet of Things API Management and Internet of Things
API Management and Internet of Things
WSO2
 
Securing the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank ChaversSecuring the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank Chavers
WithTheBest
 
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
SOASTA
 
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
mfrancis
 

Ähnlich wie OSGi Alliance Residential Expert Group (20)

How the OSGi Residential Specifications can help to build an ecosystem for sm...
How the OSGi Residential Specifications can help to build an ecosystem for sm...How the OSGi Residential Specifications can help to build an ecosystem for sm...
How the OSGi Residential Specifications can help to build an ecosystem for sm...
 
API Management and Internet of Things
API Management and Internet of Things API Management and Internet of Things
API Management and Internet of Things
 
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of ThingsWSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
 
IoT and API Management - A Match Made in Heaven
IoT and API Management - A Match Made in HeavenIoT and API Management - A Match Made in Heaven
IoT and API Management - A Match Made in Heaven
 
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
 
New features in android m upload
New features in android m   uploadNew features in android m   upload
New features in android m upload
 
The Dangers of Elevated IBM i Authorities and How to Manage Them
The Dangers of Elevated IBM i Authorities and How to Manage ThemThe Dangers of Elevated IBM i Authorities and How to Manage Them
The Dangers of Elevated IBM i Authorities and How to Manage Them
 
iot_application_casestudies.pptx
iot_application_casestudies.pptxiot_application_casestudies.pptx
iot_application_casestudies.pptx
 
The Dark Side of Powerful Users
The Dark Side of Powerful UsersThe Dark Side of Powerful Users
The Dark Side of Powerful Users
 
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
 
Securing the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank ChaversSecuring the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank Chavers
 
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
 
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
Continuous Testing for Optimal Mobile Peroformance - STPCon Spring 2014
 
Service Assurance Constructs for Achieving Network Transformation by Sunku Ra...
Service Assurance Constructs for Achieving Network Transformation by Sunku Ra...Service Assurance Constructs for Achieving Network Transformation by Sunku Ra...
Service Assurance Constructs for Achieving Network Transformation by Sunku Ra...
 
Service Assurance Constructs for Achieving Network Transformation - Sunku Ran...
Service Assurance Constructs for Achieving Network Transformation - Sunku Ran...Service Assurance Constructs for Achieving Network Transformation - Sunku Ran...
Service Assurance Constructs for Achieving Network Transformation - Sunku Ran...
 
See test
See testSee test
See test
 
OpenStack Murano
OpenStack MuranoOpenStack Murano
OpenStack Murano
 
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
Service Scenarios and Learnings from the Belgacom EasyHome Lab - Bernard Boël...
 
IoTES Unit 3 ppt.pptx
IoTES Unit 3 ppt.pptxIoTES Unit 3 ppt.pptx
IoTES Unit 3 ppt.pptx
 
Yokogawa & NextNine – Lessons Learned: Global Cybersecurity Management System...
Yokogawa & NextNine – Lessons Learned: Global Cybersecurity Management System...Yokogawa & NextNine – Lessons Learned: Global Cybersecurity Management System...
Yokogawa & NextNine – Lessons Learned: Global Cybersecurity Management System...
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

OSGi Alliance Residential Expert Group

  • 1. OSGi Alliance Residential Expert Group Current Activities January 30, 2014 OSGi Users‘-Forum Germany Meeting COPYRIGHT © 2009-2010 OSGi Alliance. All Rights Reserved
  • 2. OSGi Device Abstraction Layer RFC 196 Common Device Representation Page 2 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved
  • 3. Without Device Abstraction Layer Complex implementations, multiple dependencies Page 3 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 4. Device Abstraction Layer – RFP boundaries • • API applicable for all relevant device protocols • General device data model • Access to common device properties • Access to the device states • Access to device meta info • Device operations • Management operations • Data operations API solving common problems with device access • Avoiding protocol specific behavior • Avoiding application workarounds • Avoiding custom device abstractions • Avoiding uncontrolled dependencies Page 4 • • • • Access control based on user and application permissions • Fine-grained security control • Full flexibility of OSGi security model Security features available in the device protocols A notification mechanism is needed for: • Device state monitoring • Device data model monitoring • Device operations monitoring Extension points for new protocols • Dynamic extension points • Protocol independent • Available at runtime COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 5. Device Abstraction Layer – Real Solution, first steps Page 5 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 6. Device Abstraction Layer – Involved Parties – Device org.osgi.service.functionaldevice.Device • Represents the device in the OSGi service registry. • It’s possible to map a few OSGi device services to one physical device. • Provides an access to rich set of device properties: status, name, description, types, model, firmware version and vendor, hardware version and vendor etc. • Provide basic management operations: remove, property update, enable and disable • Gives up a set of supported Device Functions Page 6 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 7. Device Abstraction Layer – Device statuses • Device online status – indicates that the device is currently available for operation. Possible transitions from and to that status are: Page 7 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 8. Device Abstraction Layer – Device statuses • Device offline status – indicates that the device is currently not available for operations. Possible transitions from and to that status are: Page 8 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 9. Device Abstraction Layer – Device statuses • Device processing status – indicates that the device is currently busy with an operation. Possible transitions to and from that status are: Page 9 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 10. Device Abstraction Layer – Device statuses • Device not initialized status – indicates that the device is not fully initialized by the OSGi driver. The device can be initialized later when it’s awakened. Possible transitions to and from that status are: Page 10 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 11. Device Abstraction Layer – Device statuses • Device not configured status - indicates that the device requires additional configuration to become completely connected to the network. An example, an additional button has to be pushed. Possible transitions to and from that status are: Page 11 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 12. Device Abstraction Layer – Device statuses • Device disabled status – indicates that the device is disabled for operation. Possible transitions from and to that status are: Page 12 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 13. Device Abstraction Layer – Device statuses • Device removed status – indicates that the device is removed from the network. It’ll be unregistered from the OSGi service registry. Page 13 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 14. Device Abstraction Layer – Device status detail • Device status detail - holds the reason for the current device status. For example, the device can be offline, because the device is broken. We’ll have: • status – offline • status detail – device broken Page 14 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 15. Device Abstraction Layer – Involved Parties – DeviceFunction org.osgi.service.functionaldevice.DeviceFunction • Represent a specific device functionality in OSGi service registry like MultiLevelSwitch, BinarySensor etc. • Can provide a set of properties with: • Access type – eventable, writable and readable • Additional metadata – description, min and max value, measurement unit etc. • Can provide a set of operations with: • Metadata – description, arguments min and max value, arguments measurement unit etc. Page 15 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 16. Device Abstraction Layer – Device Function property • Device Function property metadata: • access type – represents the access to the function property • eventable – the property value is reported with an event; • writable – the property value can be changed; • readable – the property value can be read; • unit – represents the value unit; • min and max value – if the property value cannot cross a given minimum or maximum value; • description – describes the property with a human readable description; • values – contains a set of predefined values, which can be assigned to the property; • resolution – difference between two values in series. Page 16 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 17. Device Abstraction Layer – Device Function operation • Device Function operation metadata: • input arguments – they are using the same metadata as Device Function property from the previous slide; • output argument – it’s using the same metadata as Device Function property from the previous slide; • description – human-readable operation description. Page 17 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 18. Device Abstraction Layer – Summary Page 18 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 19. Device Abstraction Layer – Involved Parties – functions org.osgi.service.functionaldevice.functions • There is a set of predefined device functions: • BinaryControl – provides binary control support to manage functionalities based on two state like: turnOn/turnOff, Start/Stop, Up/Down etc. • BinarySensor – provides binary sensor monitoring like: motion/no motion • MultiLevelControl – provides multi-level control support. Usual example is dimmer, but can control any device with a set of acceptable values like temperature control. • MultiLevelSensor – provides multi-level sensor monitoring to collect information about humidity, temperature etc. • Meter – the meter can track metering information about electricity, water etc. consumption • Alarm – triggers an alarm event when the alarm sensor detects an alarm. It can register an alarm because of smoke, water leak, heat etc. • Keypad – provides information about a set of buttons. Page 19 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 20. Device Abstraction Layer – Involved Parties – BinaryControl org.osgi.service.functionaldevice.functions.BinaryControl • Supported operations: • reverse – reverses the BinaryControl state i.e. if the current state is true, it’ll be reversed to false and the opposite. • setTrue – sets the BinaryControl state to true. • setFalse – sets the BinaryControl state to false. • Supported properties: • state – provides information about the current state • The BinaryControl data provides: • value – reported value; • timestamp – when the value is reported by the device or by the driver; • additional metadata. •Next steps – we are working on the concrete types. In this way, we can map true and false to meaningful states like open/close, start/stop etc. Page 20 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 21. Device Abstraction Layer – Involved Parties – BinarySensor org.osgi.service.functionaldevice.functions.BinarySensor • No operations. • Supported properties: • state – provides information about the current state •The BinarySensor data provides: • value – reported value; • timestamp – when the value is reported by the device or by the driver; • additional metadata. •Next steps – we are working on the concrete types. In this way, we can map true and false to meaningful states like opened/closed, started/stopped etc. Page 21 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 22. Device Abstraction Layer – Involved Parties – MultiLevelControl org.osgi.service.functionaldevice.functions. MultiLevelControl • No operation. • Supported properties: • level – provides information about the current state • MultiLevelControl data provides: • value – reported value; • unit – the reported value unit; • timestamp – when the value is reported by the device or driver • additional metadata •Next steps – we are working on the concrete types. In this way, we can map the level to something meaningful. Page 22 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 23. Device Abstraction Layer – Involved Parties – MultiLevelSensor org.osgi.service.functionaldevice.functions. MultiLevelSensor • No operation. • Supported properties: • level – provides information about the current state • MultiLevelSensor data provides: • value – reported value; • unit – the reported value unit; • timestamp – when the value is reported by the device or driver • additional metadata •Next steps – we are working on the concrete types. In this way, we can map the level to something meaningful. Page 23 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 24. Device Abstraction Layer – Involved Parties – Meter org.osgi.service.functionaldevice.functions. Meter • Supported operations: • resetTotal – resets the total metering information. • Supported properties: • total – contains information about the total metering information • current – contains information about the current metering information • flow – if you are producer, there’ll be out flow; if you are consumer, there’ll be in flow. • Meter data provides: • value – reported value; • unit – the reported value unit; • timestamp – when the value is reported by the device or driver • additional metadata •Next steps – we are working on the concrete types. In this way, we can map the metering information to something meaningful like water meter, gas meter etc. Page 24 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 25. Device Abstraction Layer – Involved Parties – Alarm org.osgi.service.functionaldevice.functions. Alarm • No operations. •Supported properties: • alarm – specifies the alarm property. It must be an eventable property. • Alarm data provides: • type – the alarm type • severity – the alarm severity • timestamp – when the alarm is triggered • additional metadata •Next steps – we are working on the concrete types. In this way, we can map the metering information to something meaningful like water leak alarm. Page 25 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 26. Device Abstraction Layer – Involved Parties – Keypad org.osgi.service.functionaldevice.functions. Keypad • No operations. •Supported properties: • key – specifies the property for the key from the keypad. • Keypad data contains information about the key: • key code; • key name; • type: pressed, long pressed, double pressed, double long pressed. Page 26 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 27. Device Abstraction Layer – Device Function Summary Page 27 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 29. Device Abstraction Layer – An example • Print all online devices. final ServiceReference[] deviceSRefs = context.getServiceReferences( Device.class.getName(), '(' + Device.PROPERTY_STATUS + '=' + Device.STATUS_ONLINE + ')'); if (null == deviceSRefs) { return; // no such services } for (int i = 0; i < deviceSRefs.length; i++) { printDevice(deviceSRefs[i]); } Page 29 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14
  • 30. Device Abstraction Layer – Example •The code snippet sets to true all BinaryControl functions. final ServiceReference[] binaryControlSRefs = context.getServiceReferences(BinaryControl.class.getName(), null); if (null == binaryControlSRefs) { return; // no such services } for (int i = 0; i < binaryControlSRefs.length; i++) { final BinaryControl binaryControl = (BinaryControl) context.getService(binaryControlSRefs[i]); if (null != binaryControl) { binaryControl.setTrue(); } } Page 30 COPYRIGHT © 2009-2013 OSGi Alliance. All Rights Reserved 30.01.14