Citizen Sensing with the SenosrThings API

56
CITIZEN SENSING WITH THE SENSORTHINGS API Joseph Chang Senior Software Developer, SensorUp Inc. March 17, 2016

Transcript of Citizen Sensing with the SenosrThings API

Page 1: Citizen Sensing with the SenosrThings API

CITIZENSENSINGWITHTHE

SENSORTHINGSAPI

JosephChangSeniorSoftwareDeveloper,SensorUpInc.

March17,2016

Page 2: Citizen Sensing with the SenosrThings API

WHATISSENSORTHINGS?

Page 3: Citizen Sensing with the SenosrThings API

WHATISSENSORTHINGS?

Page 4: Citizen Sensing with the SenosrThings API

WHATISSENSORTHINGS?

ConnectIoTdevicesanddataOGCStandardOpenUsesHTTP,JSON,MQTTandothergoodstuff

Page 5: Citizen Sensing with the SenosrThings API

WHATISCITIZENSENSING?OrdinarypeoplehavesensorsParticipation,empowerment,connectionKindacool

Page 6: Citizen Sensing with the SenosrThings API

SENSORTHINGS+CITIZENSENSINGCanwebuildasimplecitizensensingplatformwithSensorThings?

Page 7: Citizen Sensing with the SenosrThings API

SENSORTHINGS+CITIZENSENSINGCanwebuildasimplecitizensensingplatformwithSensorThings?Ofcourse.

Page 8: Citizen Sensing with the SenosrThings API

SENSORTHINGS+CITIZENSENSINGCanwebuildasimplecitizensensingplatformwithSensorThings?Ofcourse.CitizenSensing?

Page 9: Citizen Sensing with the SenosrThings API

SENSORTHINGS+CITIZENSENSINGCanwebuildasimplecitizensensingplatformwithSensorThings?Ofcourse.CitizenSensing?

Page 10: Citizen Sensing with the SenosrThings API

SENSORTHINGS+CITIZENSENSINGCanwebuildasimplecitizensensingplatformwithSensorThings?Ofcourse.CitizenSensing?CitizenSensorThings

Page 11: Citizen Sensing with the SenosrThings API

SENSORTHINGS+CITIZENSENSINGCanwebuildasimplecitizensensingplatformwithSensorThings?Ofcourse.CitizenSensing?CitizenSensorThings-ing

Page 12: Citizen Sensing with the SenosrThings API

ARCTICCITIZENSENSORS(INASSOCIATIONWITHGEOCONNECTIONS)

Page 13: Citizen Sensing with the SenosrThings API
Page 14: Citizen Sensing with the SenosrThings API
Page 15: Citizen Sensing with the SenosrThings API
Page 16: Citizen Sensing with the SenosrThings API
Page 17: Citizen Sensing with the SenosrThings API
Page 18: Citizen Sensing with the SenosrThings API
Page 19: Citizen Sensing with the SenosrThings API

TODAY'SSPECIALBUILDINGASIMPLIFIEDVERSIONOFARCTICCITIZENSENSORS

CreateandlinkSensorThingsentities

Page 20: Citizen Sensing with the SenosrThings API

TODAY'SSPECIALBUILDINGASIMPLIFIEDVERSIONOFARCTICCITIZENSENSORS

CreateandlinkSensorThingsentities

Page 21: Citizen Sensing with the SenosrThings API

ENTITIESANDRELATIONSHIPS

Observation

+phenomenonTime:TM_Object+resultTime:TM_Instant+result:Any+resultQuality:DQ_Element[0..*]+validTime:TM_Period[0..1]+parameters:NamedValue[0..*]

Thing

+description:CharacterString+properties:JSON_Object[0..1]

Datastream

+description:CharacterString+observationType:ValueCode+unitOfMeasurement:JSON_Object+observedArea:GM_Envelope[0..1]+phenomenonTime:TM_Period[0..1]+resultTime:TM_Period[0..1]+datastreams

0..*

+thing1

ObservedProperty

+name:CharacterString+definition:URI+description:CharacterString

+observedProperty1

+datastreams0..*

Sensor

+description:CharacterString+encodingType:ValueCode+metadata:Any

+sensor1

+datastreams

0..* +datastream

1

+observations

0..*

FeatureOfInterest

+description:CharacterString+encodingType:ValueCode+feature:Any

+observations0..*

+featureOfInterest1

HistoricalLocation

+time:TM_Instant

Location

+description:CharacterString+encodingType:ValueCode+location:Any

+things

1

+historicalLocations0..*

+location

1..*

+historicalLocations0..*

+things0..*

+locations0..*

«CodeList»ValueCode

Page 22: Citizen Sensing with the SenosrThings API
Page 23: Citizen Sensing with the SenosrThings API

CREATINGATHING

Page 24: Citizen Sensing with the SenosrThings API

LINKITONE

Page 25: Citizen Sensing with the SenosrThings API

REQUESTPOST /v1.0/Things HTTP/1.1Host: example.sensorup.comContent-Type: application/json

{ "description": "LinkIt ONE"}

Page 26: Citizen Sensing with the SenosrThings API

RESPONSE{ "@iot.id": 1, "description": "LinkIt ONE", "properties": {} ...}

Page 27: Citizen Sensing with the SenosrThings API
Page 28: Citizen Sensing with the SenosrThings API

CREATINGALOCATION

Page 29: Citizen Sensing with the SenosrThings API

ALERT,NUNAVUT,CANADA

Photo:NationalOceanic&AtmosphericAdministration,retrievedfromhttps://commons.wikimedia.org/wiki/File:NOAA_-_Alert_observatory.jpg

Page 30: Citizen Sensing with the SenosrThings API

REQUESTPOST /v1.0/Locations HTTP/1.1Host: example.sensorup.comContent-Type: application/json

{ "description": "Alert", "encodingType": "application/vnd.geo+json", "location": { "type": "Point", "coordinates": [ -62.358, 82.521 ] }, "Things": [{ "@iot.id": 1 }]}

Page 31: Citizen Sensing with the SenosrThings API

RESPONSE{ "@iot.id": 2, "encodingType": "application/vnd.geo+json", "description": "Alert", "location": { "coordinates": [ -62.358, 82.521 ], "type": "Point" }, ...}

Page 32: Citizen Sensing with the SenosrThings API
Page 33: Citizen Sensing with the SenosrThings API

FeatureofInterestautomaticallycreatedbySensorThingslater

TWOFORTHEPRICEOFONE

Page 34: Citizen Sensing with the SenosrThings API

CREATINGANOBSERVEDPROPERTY

Page 35: Citizen Sensing with the SenosrThings API

REQUESTPOST /v1.0/ObservedProperties HTTP/1.1Host: example.sensorup.comContent-Type: application/json

{ "name": "dust", "definition": "http://dbpedia.org/page/Dust", "description": "Dust is composed of particles in the..."}

Page 36: Citizen Sensing with the SenosrThings API

RESPONSE{ "@iot.id": 3, "name": "dust", "description": "Dust is composed of particles in the...", "definition": "http://dbpedia.org/page/Dust", ...}

Page 37: Citizen Sensing with the SenosrThings API
Page 38: Citizen Sensing with the SenosrThings API

CREATINGASENSOR

Page 39: Citizen Sensing with the SenosrThings API

DUSTSENSOR

Page 40: Citizen Sensing with the SenosrThings API

REQUESTPOST /v1.0/Sensors HTTP/1.1Host: example.sensorup.comContent-Type: application/json

{ "description": "dust", "encodingType": "text/html", "metadata": "http://www.seeedstudio.com/wiki/Grove_-_Dust_Sensor"}

Page 41: Citizen Sensing with the SenosrThings API

RESPONSE{ "@iot.id": 4, "description": "dust" "encodingType": "text/html", "metadata": "http://www.seeedstudio.com/wiki/Grove_-_Dust_Sensor", ...}

Page 42: Citizen Sensing with the SenosrThings API

SENSORNOTSHOWNINUIStillhavetocreateitProvidescontextFuturequeryingoptions

Page 43: Citizen Sensing with the SenosrThings API

SENSORNOTSHOWNINUIStillhavetocreateitProvidescontextFuturequeryingoptionsIt'sgoodpractice,likeeatingyourvegetables

Page 44: Citizen Sensing with the SenosrThings API

CREATINGADATASTREAM

Page 45: Citizen Sensing with the SenosrThings API

REQUESTPOST /v1.0/Datastreams HTTP/1.1Host: example.sensorup.comContent-Type: application/json

{ "description": "LinkIt ONE Datastream", "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "unitOfMeasurement": { "name": "pieces per 0.01 cubic feet", "symbol": "pcs/0.01cf", "definition": "N/A" }, "Thing": { "@iot.id": 1 }, "ObservedProperty": { "@iot.id": 3 }, "Sensor": { "@iot.id": 4 }}

Page 46: Citizen Sensing with the SenosrThings API

RESPONSE{ "@iot.id": 5, "description": "LinkIt ONE Datastream", "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "unitOfMeasurement": { "symbol": "pcs/0.01cf", "name": "pieces per 0.01 cubic feet", "definition": "N/A" }, ...}

Page 47: Citizen Sensing with the SenosrThings API
Page 48: Citizen Sensing with the SenosrThings API

CREATINGANOBSERVATION

Page 49: Citizen Sensing with the SenosrThings API

REQUESTPOST /v1.0/Datastreams(5)/Observations HTTP/1.1Host: example.sensorup.comContent-Type: application/json

{ "result": "334.6"}

Page 50: Citizen Sensing with the SenosrThings API

RESPONSE{ "@iot.id": 6, "result": "334.6", "phenomenonTime": "2016-03-02T20:37:00.598Z", ...}

Page 51: Citizen Sensing with the SenosrThings API

THEFINISHEDPICTURE

Page 52: Citizen Sensing with the SenosrThings API
Page 53: Citizen Sensing with the SenosrThings API
Page 54: Citizen Sensing with the SenosrThings API
Page 55: Citizen Sensing with the SenosrThings API
Page 56: Citizen Sensing with the SenosrThings API