i love apis 2015: iot lab

Post on 15-Apr-2017

451 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

IoT Lab !@mdobs

@adammagaluk

Our Project

2

Our Project

3 ©2015 Apigee. All Rights Reserved.

Our Project

4 ©2015 Apigee. All Rights Reserved.

Zetta Server

hub

zs

Mic Buzzer

API

Browser API

Our Project – Home Security

5 ©2015 Apigee. All Rights Reserved.

Building an open source security system Our process

a. Intro to the Internet of Things b. Intro to our technology c. Building our first circuit. (Using a buzzer) d. Building our second circuit. (Using a microphone) e. Coordinating them with JavaScript

We’ll Learn a. How to create basic circuits b. How to work with the BeagleBone Black c. How to harness the Zetta toolchain for creating IoT Apps d. What else can be done with Zetta

Intro to the Internet of Things

6

•  A growing ubiquitous network of devices. •  Made up of Sensors and Actuators •  Sensors

–  Sense the world around you. –  Report data back

•  Actuators –  Act on the world around you –  Give feedback

The Internet of Things

•  Data –  What to store? –  What to use?

•  Interfaces and Protocols –  Many protocols exist for IoT? –  What to use?

•  Devices in large systems –  How to coordinate devices in large systems?

•  Quality of Tooling –  How to build tools for people building products?

Issues within the Internet of Things

Zetta is an open source platform for the Internet of Things. It harnesses JavaScript to make things quick and easy. Zetta tackles all these problems in an elegant, and efficient way.

Intro to Zetta

•  Data –  Broadcasting data over websockets. –  Make collection and analysis easy

•  Interfaces and Protocols –  Use HTTP to communicate with devices –  Every device gets an API generated from Node.js

•  Devices in large systems –  Coordinate devices across the globe with ease

•  Quality of Tooling –  Designed with the developer in mind –  Multiple tools for helping develop quickly

Solving these problems

Intro to our Technology

11

•  Evented and Async •  Open source •  Every developer knows JavaScript •  Can run on many different platforms

Why Node.js?

•  Single board computer, runs Linux and similar to Raspberry Pi •  Low cost and community supported •  Comes with Node.js pre-installed •  Has a node module for accessing hardware •  Browser based IDE for programming right on the board

Why BeagleBone Black?

•  Tool for prototyping electronic circuits •  Great for circuits without soldering

Intro to Breadboard

•  Create a new file to put some code in

Getting Started

Let’s write a snippet of Zetta and see what happens!

Writing some Zetta code

Our First Circuit

17

First Circuit

18 ©2015 Apigee. All Rights Reserved.

Black - Bottom / Pin 1 White - Top / Pin 7

Our Second Circuit

19

Second Circuit

20 ©2015 Apigee. All Rights Reserved.

Pins from right: Green - Top / Pin 6 Red - Top / Pin 8 Resistor: 2.2 K

A Coordination

21

Linking

22

23 ©2015 Apigee. All Rights Reserved.

Problem: How do we expose our API to the world?

What does linking do?

24 ©2015 Apigee. All Rights Reserved.

Z1 Z2

F i r e w a l l

Tunneled Connection HTTP Request

Linking creates a secure tunnel out of home networks allowing you to expose your API to the world.

•  Built an open source security system •  Our process

a. We learned how to use Zetta b. We learned about it’s development tools and best practices c. We built circuitry to power our system d. We coordinated these devices using JavaScript and interacted with them via API.

•  We Learned a. How to create basic circuits b. How to work with the BeagleBone Black c. Harnessing the Zetta toolchain

Our Completed Project - Home Security

1. Zetta Github - http://github.com/zettajs/zetta 2. Workshop Code - https://github.com/zettajs/zetta-security-system 3. Zetta Mailing List - https://groups.google.com/forum/#!forum/zetta-discuss 4. IoT Craft - https://groups.google.com/forum/#!forum/iot-craft 5. Apigee Community – http://community.apigee.com/ 6. My Personal Email - matt@apigee.com

Additional Resources

27 ©2015 Apigee. All Rights Reserved.

Congratulations! The kit is yours to keep.

top related