waziup cloud platform hands-on · socials & notifications social backend send messages on...

32
WAZIUP CLOUD PLATFORM HANDS-ON

Upload: others

Post on 19-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

WAZIUP CLOUD PLATFORM

HANDS-ON

Page 2: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Outline

Cloud platform

Dashboard app

Kibana

API tutorial

Browser app

Page 3: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

CLOUD PLATFORM OVERVIEW

Page 4: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Architecture

Page 5: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Architecture

Page 6: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Authorization

Page 7: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Data management

Mongo

Store data for display and management

Short term

Tight coupling: same lifecycle than sensors

ElasticSearch

Store data for analytics

Long term

Loose coupling: not connected to sensor lifecycle

Flat, contextualized

Page 8: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Socials & Notifications

Social backend

Send messages on Twitter, SMS, Facebook, Voice, USSD

Uniform interface

Store the message sent

Notifications

Based on Orion for subscriptions

Use the social backend

Page 9: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

API

Page 10: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Dashboard

• http://dashboard.waziup.io

Page 11: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Dashboard

• http://dashboard.waziup.io

Page 12: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Documentation

• http://www.waziup.io

Page 13: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Mobile app

Page 14: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Mobile app

Page 15: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

WaziApps

No programming

Dashboard + Kibana

Browser application

HTML + Javascript only, Github hosting, Waziup

backend

Full-stack application

REACTJS + own backend, Waziup for data collection

Page 16: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

DASHBOARD & KIBANA APP

Page 17: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Prerequisite

You should already have:

Working sensor node

Gateway switched on and configured

Page 18: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Tutorials

Dashboard tutorial is at:

www.waziup.io/tutorials/software/dashboard/

Kibana tutorial is at:

www.waziup.io/tutorials/software/dashboard/kibana_tuto

rial.pdf

Page 19: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

API

Page 20: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Prerequisite

You should already have:

Working sensor node

Gateway switched on and configured

Curl command installed

Page 21: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercise 1: Use Swagger

Open http://api.waziup.io/docs

1. See the sensors

Open GET /domains/{domain}/sensors

Click on execute

2. Create a simple sensor

Open POST /domains/{domain}/sensors

Setup with Name: your group name and Domain: Aceiot

Delete all the other fields

Page 22: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercise 1: Use Swagger

1. See your new sensor

Open GET /domains/{domain}/sensors/{sensor_id}

Change the fields

Click on execute

Also visualize your sensor on http://dashboard.waziup.io

2. Update name

Open PUT /domains/{domain}/sensors/{sensor_id}/name

Setup with Name

Click on execute

Page 23: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercise 1: Use Swagger

1. Add a measurement

Open POST /domains/{domain}/sensors/{sensor_id}/measurements

Setup the fields

Click on execute

2. Inject data points

Open POST

/domains/{domain}/sensors/{sensor_id}/measurements/{measureme

nt_id}/values

Setup with datapoint value and timestamp

Click on execute

Page 24: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercise 1: Use Swagger

1. Delete your sensor

Open DELETE/domains/{domain}/sensors/{sensor_id}

Setup the fields

Click on execute

Page 25: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercise 2: Use cURL command

Tutorial is at:

http://www.waziup.io/documentation/api/api_tutorial/

Page 26: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

BROWSER APP

Page 27: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Prerequisite

You should already have:

Working sensor node

Gateway switched on and configured

Page 28: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Basic setup

Download and extract zip file:

https://github.com/Waziup/WaziApps-examples/archive/master.zip

Page 29: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercice 1: simple app

In the « simple » folder:

1. Modify the code with your sensor Id in index.html

2. Open the file with a web browser

3. You should see the sensor value appear on your app

Page 30: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercice 2: list the sensors

In the « complex » folder:

1. Add the sensor name to the output

2. Add the measurement names for each sensor

Docs: https://github.com/Waziup/waziup-js/blob/master/docs

Page 31: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercice 3: create a graph

In the « graph » subfolder:

1. Modify the colors of the graph

2. Collect data for one full day (instead of 20 points

currently)

3. Modify Y-axis to place the timestamp in the right

position

Doc: http://www.chartjs.org

Page 32: WAZIUP CLOUD PLATFORM HANDS-ON · Socials & Notifications Social backend Send messages on Twitter, SMS, Facebook, Voice, USSD Uniform interface Store the message sent Notifications

Exercice 4: create a map

In the « map » subfolder:

1. Modify the colors of the maker

2. Add all sensors to the map

Doc: http://leafletjs.com/