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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

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