Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices...

29
Intel Corporation Brillo OS: Implementing Miniature Smart Home Constantin Musca Intel Corporation

Transcript of Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices...

Page 1: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Intel Corporation

Brillo OS: Implementing Miniature Smart HomeConstantin Musca – Intel Corporation

Page 2: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Outline

2

I. Context

II. Problem statement

III. Solution

IV. Implementation details

V. Conclusions

VI. Future work

Page 3: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Context

Source: pixabay.com3

Page 4: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Problem statement

Source: pixabay.com4

• IoT Standardization and compatibility

• Device integration

• Open devices and products

Page 5: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

• Embedded OS

• Core services

• Developer kit

What is Brillo?

Source: Google

Page 6: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

• Open Source

• Maintained

• Supports devices with a small footprint

• CustomizableHardware

Linux Kernel

Android HAL

Device

Admin

System

Services

OTA

updates…Connectivity

The Brillo Operating System

Source: Google

Page 7: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

• Weave

• Metrics

• Crash reporting

• OTAs

The Brillo Core Services

Source: Google

Page 8: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

• Based on the Android.mk architecture

• Standard testing

• Android debug bridge (adb)

The Brillo Developer Kit

Source: Google

Page 9: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

• Protocol for device discovery, provisioning, authentication, and interaction

• Schema Driven (JSON)

• OAuth 2.0 Authentication

Weave

Source: Google

Page 10: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Edison Arduino board

10

• High performance dual core Intel CPU

• Wi-Fi antenna within the Edison chip

• 4GB EMMC storage

• Support for USB, I2C, SPI & GPIOs

Source: intel.com

Page 11: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Philips Hue RGB Bulb

11

• High quality light that you can dim smoothly

• Large range of colors

• Away-from-home control

• Smart control through an open REST interface

Source: www.newscenter.philips.com

Page 12: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Nest thermostat

12

• Automatically adapts to life and season changes

• Helps saving energy

• Smart control through an open REST interface

Source: nest.com/press

Page 13: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

13

• Relays

• Motors

• Buzzers

• Temperature Sensor

• Light Sensor

• LEDs

• Buttons

Grove Starter Kit

Page 14: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Product Design

14

Edison

Bedroom 2 Bedroom 1

Living RoomGarage

Alarm system based on sensors

Automatic

Garage Door

Source: nest.com/press, www.newscenter.Philips.com

Page 15: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

15

Page 16: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Hardware System Connections

16

Edison ArduinoHTTP REST HTTP REST

I2C/SPI/GPIO

Source: nest.com/press, www.newscenter.Philips.com

Page 17: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Software System Architecture

17

SHWeaveService

Philips Hue Support

SHBinderService

Nest Cloud Support

Grove Starter Kit Support

SHBinderClient

Binder

Weave Enabled

Applications

Weave Developer Console

Android Application

Weave

Brillo OS

Page 18: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Implementation: SHWeaveService

18

• Connects to the SHBinderService via Binder

• Acts as a middleman for all Weave – SHBinderService

communication

• Maintains and updates the Weave device state

SHBinderClient

SHWeaveService

Source: developers.google.com/weave

Page 19: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Implementation: Weave Commands Schema

19

"commands": {

"set_bedroom_1_door_state“: { … }

"set_garage_door_state": { … },

"set_target_temperature": {

"parameters": {

"temperature": {

"type": "number"

}

}

},

"set_light": {

"parameters": {

"onState": {

"type": "string"

},

"saturation": {

"type": "number"

},

"brightness": {

"type": "number"

},

"hue": {

"type": "number"

}

}

}

} Source: developers.google.com/weave

Page 20: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Implementation: Weave State Schema

20

"state": {

"bedroom_1_door": {

"type": "string",

"enum": ["locked", "unlocked"]

},

...

"garage_door": {

"type": "string",

"enum": ["opened", "closed"]

},

"nest_thermostat": {

"target_temperature": {

"type": "number"

},

"current_temperature": {

"type": "number"

}

},

"philips_hue_light“: { … },

}

Source: developers.google.com/weave

Page 21: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Implementation: SHBinderService

21

• Exposes all the connected devices through a Binder interface

• Interacts with the Philips Hue & Nest thermostat via a HTTP

client

• Exposes the I2C connected sensors via the Sensors HAL

• Uses libmraa to control the GPIOs and libupm for the motors

Philips Hue Support

SHBinderService

Nest Cloud Support

Grove Starter Kit Support

Page 22: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Implementation: SHBinderService details

22

SHBinderService

PhilipsHue NestThermostat HomePeripherals

getLight();

setLight(bri, sat, hue);

getTemperature();

setTemperature(target);

getDoorState(id);

setDoorState(id);

getLight();

setLight(bri, sat, hue);

getTemperature();

setTemperature(target);

getHumidity();

getDoorState(id);

setDoorState(id);

Page 23: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Implementation: SHBinderService AIDL interface

23

interface ISHBinderService {

boolean set_bedroom1_door_state(String state);

boolean set_garage_door_state(String state);

double get_temperature();

boolean set_target_temperature(double temp);

void set_light(boolean on, double saturation,

double brightness, double hue);

}

Source: pixabay.com

Page 24: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

24

Philips Hue Support

Example for changing the light bulb state

Address http://<bridge ip address>/api/<user>/lights/1/state

Body {"on":true, "sat":230, "bri":180,"hue":10000}

Method PUT

Philips Hue Bridge

Source: www.newscenter.philips.com

Page 25: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

25

Nest Thermostat Support

Example for changing the thermostat target temperature

Address https://developer-api.nest.com/devices/thermostats/$THERMOSTAT_ID?auth=$AUTH

Body {"target_temperature_c": 22.5}

Method PUT

NEST Cloud

Source: nest.com/press

Page 26: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Grove Starter Kit Support

26

Sensors HAL

libmraa/upm

Kernel

Sensors Motors, Relays, LEDS & Buzzers

SHBinderService

Page 27: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Conclusions

27

Brillo OS

Smart

Home

Secure Flexible

Easy Extensible

Page 28: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Future work

28

- Real life project implementation

- Add intelligence to the house

- Integrate more devices

Source: www.flickr.com/photos/thecourtyard/4213586581

Page 29: Brillo OS: Implementing Miniature Smart Home · • Open Source • Maintained • Supports devices with a small footprint • Customizable Hardware Linux Kernel Android HAL Device

Legal Notices and Disclaimers

Intel technologies’ features and benefits depend on system configuration and may require enabled

hardware, software or service activation. Learn more at intel.com, or from the OEM or retailer.

No computer system can be absolutely secure.

Tests document performance of components on a particular test, in specific systems. Differences in

hardware, software, or configuration will affect actual performance. Consult other sources of

information to evaluate performance as you consider your purchase. For more complete information

about performance and benchmark results, visit http://www.intel.com/performance.

Intel, the Intel logo and others are trademarks of Intel Corporation in the U.S. and/or other countries.

*Other names and brands may be claimed as the property of others.

© 2016 Intel Corporation.