Remote Control Framework for Smart Home Components, HS Offenburg

31
Hochschule Offenburg University of Applied Sciences An android based remote control framework for smart home components Prof. Dr. Hartwig Grabowski [email protected]

description

 

Transcript of Remote Control Framework for Smart Home Components, HS Offenburg

Page 1: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

An android based remote control framework

for smart home components

Prof. Dr. Hartwig Grabowski

[email protected]

Page 2: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Smarthome The home residential gateway is the core component

2

Source: http://www.jvrb.org/4.2007/1110

Residential Gateway:

Core component

Connecting devices /

appliances

Controlling devices

Offering (intelligent)

services

Serving as a bridge to

the outer world

Providing UI

Support (hot) service

deployment

14.2.2012 Hartwig Grabowski, droidcon Berlin, 2012

Page 3: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Smarthome Many requirements must be fulfilled to pave the way to mass market

Hartwig Grabowski, droidcon Berlin, 2012 3

Source: http://www.jvrb.org/4.2007/1110

Residential Gateway –

a long way to go:

(Open) platform for

building new services

Widely accepted by

industry

Godfather pushing the

technology

SDK (emulator, etc.)

and community

Market for services

Low-cost hardware

through mass-market

14.2.2012

Page 4: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Smarthome Android already fulfills the demands

Hartwig Grabowski, droidcon Berlin, 2012 4

Source: http://www.jvrb.org/4.2007/1110

Android provides:

(Open) platform for

building new services

Widely accepted by

industry

Godfather pushing the

technology

SDK (emulator, etc.)

and community

Market for Services

Low-cost hardware

through mass-market

14.2.2012

Page 5: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Smarthome The residential gateway can be substituted

Hartwig Grabowski, droidcon Berlin, 2012 5

Source: http://www.jvrb.org/4.2007/1110

Substitute residential

gateway by

Smartphone +

WLAN-DSL-Router +

appliance controller:

14.2.2012

Page 6: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Smarthome Three components build the “new” residential gateway

6

Smartphone The intelligence:

Offers UI

Implements the “smart” services

“Low-cost” hardware (~100 €)

The connector:

Connectivity: LAN and WAN

“Low-cost” hardware, already available

WLAN-Router

The controller:

Connectivity: Home Appliances

“Low-cost”(?) hardware (~200 €)

Appliance Controller

Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Page 7: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Smarthome A large set of sensors and actuators is already available

7 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

EZcontrol XS1

Source: http://www.ezcontrol.de

power

switch

actuators

power

dimmer heating

blinds

control

wind

sensors

water temp. door

contacts

FS20 HTTP

FS20

Page 8: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Smarthome The android device can be used in-house and out-house

8 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

internet

home appliances

multimedia

Laptop, PC, printer

Page 9: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

The android framework There are three major domains for smarthome applications

9 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Energy

Comfort

Security

power metering

remote control

surveillance

Page 10: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Energy Smart metering is demanded

10 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Energy

Comfort

Security

power metering

remote control

surveillance

Page 11: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Energy Smart metering option 1: replace current power meters by smart meters

11 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Limited acceptance:

Cost intensive

Lost of privacy

Bound to energy

provider

No open platform /

access to data

Page 12: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Energy Smart metering option 2: update current power meters

12 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

web-server

in the cloud

Page 13: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Energy All computation (UI, forecasts, etc.) is implemented on the android device

13 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Page 14: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

The android framework Three domains for smarthome applications

14 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Energy

Comfort

Security

power metering

remote control

surveillance

Page 15: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control The remote control app provides basic functionality

15 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

actuators

sensors

Page 16: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control The remote control app implements the basic functions

16 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

The app serves as a interface to the appliance

controller

All available functions are to be implemented

Remote control of actuators

Receive data from sensors

Add components sensors / actuators

Remove components sensors / actuators

Subscription service: Automatically inform

about new events

Page 17: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control The remote control app offers intuitive user interface

17 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

With the remote control app, basic control function can be executed:

Login-screen:

configure once List all actuators List all sensors

Page 18: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control The subscription service is implemented through chunked encoding

18 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

How to push information without having a server running on the mobile

device?

Use the HTTP chunked encoding:

- the Content-Length header is not

used

- server transmits response with

dynamically-generated “chunks”

- The size of each chunk is sent right

before the chunk

- The data transfer is terminated by a

final chunk of length zero.

Page 19: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control The subscription service is implemented as an android service

19 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Implementation of HTTP

chunked encoding:

HTTP connection is left open

“endless”

Implemented as an android

service, running in the

background.

Service records the events in

a list

Activity reads the recorded

list.

Page 20: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control ”Smart services” can be easily build on top of the basic functions

20 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

set of basic functions

actuators

sensors

proximity

alert

timer

functions

macros

sensors

QR-Codes

?

additional functions

+

smart services

Page 21: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control Smart service example 1: QR-codes + power switch

21 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

smart services

You:

(web-interface)

Me:

(android app)

Page 22: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control Smart service example 1: QR-codes + power switch

22 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

smart services

extract tag,

obtain switch-id

start app,

jump to switch

toggle the

switch

take picture

Page 23: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control Smart service example 2: QR-code + gravity sensor + dimmer

23 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

smart services

Page 24: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Remote control Multimedia

24 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

What about multimedia? - It’s all there already!

Samsung

Remote

LG

Remote

Grundig

Remote

… … …

Page 25: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

The android framework Three domains for smarthome applications

25 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Energy

Comfort

Security

power metering

remote control

surveillance

Page 26: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Security One stationary device is needed

26 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

internet

home appliances

multimedia

Laptop, PC, printer

Source: http://www.monitorhalterung.de/

Page 27: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Security The stationary device is used for computation and notification

27 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

home area

sensors

door contacts

motion detection

wind, humidity, …

sensors

webcam

actuator

(fake) TV

actuator

binds, lights, etc.

outside

push notification:

SMS or C2DM

computation

&

notification

Page 28: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

The android framework How to bring the bricks together?

28 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Programmatically

(source code available)

Implicit intents / open intents ( onActivityResult() )

Just start the external app ( LAUNCHER intent ) Security

Multimedia Energy

Comfort

Page 29: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

Conclusion Navigation systems are going to be substituted by mobile devices. Residential

gateways will be substituted, too. Android offers all we need.

29 Hartwig Grabowski, droidcon Berlin, 2012 14.2.2012

Page 30: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

30

Thank you!

Page 31: Remote Control Framework for Smart Home Components, HS Offenburg

Hochschule Offenburg University of Applied Sciences

31

Appendix