xgsn: an open-source semantic sensing middleware for the web of things
DESCRIPTION
SSN presentation on OpenIoT X-GSN sensor middlewareTRANSCRIPT
XGSN: An Open-source Semantic Sensing Middleware
for the Web of ThingsSome Afterthoughts
Jean-Paul Calbimonte, Sofiane Sarni, Julien Eberle, Karl AbererLSIR EPFL
Semantic Sensor Networks SSN 2014. International Semantic Web Conference ISWC 2014
Riva del Garda, 20.10.2014
@jpcik
Sensor deployments everywhereMountainsGlaciersSnow regionsSea CoastalAgriculture…
DIYMobileParticipatory
People want the data!
So what can I do with it?
• Get data from my sensors (API, web interface) • Store and archive the data• Put it online, available for download• Put it online, available for discovery and querying• Apply post-processing to the data• Combine different data sources• Use the data from an R script• More stuff…
OSPER - Swiss ExperimentOpen support platform for environmental research
Multidisciplinary research team• Real world data + problems
Facilitating research in:• Precipitation patterns in mountains• Evaporation in Africa• Return periods of Natural Hazards• Stream flows in Alpine catchments• Permafrost in the Alps
managing environmental sensor data &metadata
Platform
http://swiss-experiment.chD
ata
heterogeneous sensing devices
summarization, filtering, compression, interpolation
continuous processing, streaming, geospatial, aggregation
pattern discovery, correlation, regression
metadata management, semantics
data services, visualization, standards
acquisition
processing
querying
analysis
discovery
provision
OpenSense2global concernhighly location-dependenttime-dependent
Crowdsourcing High-Resolution Air Quality Sensing
Air Pollution
Accurate location-dependent and real-time information on air pollution is needed
Integrated air quality measurement platform
Heterogeneous devices and data Human activity assessment, lifestyle and health data
• Link high-quality and low-quality data • Integration of pure statistical models and physical
dispersion models• Better coverage through crowdsensing• Incentives for crowd data provision• Finer temporal and spatial resolutions• Utilitarian approach for trade-off between model
complexity, privacy and accuracy• Higher accuracy of pollution maps models
http://opensense.epfl.ch
Institutional stations
OpenSense infrastructure
Personal mobile sensors CrowdSense
OpenIoT FP7
Open Source Cloud solution for the Internet of Things
http://openiot.eu
Established Open-source platform for IoT
• Integrate sensors & things with cloud computing • Configure, deploy and use IoT services• Auditing/assessing privacy of IoT apps in the cloud• Semantic annotations of internet-connected objects• Energy-efficient data harvesting• Publish/subscribe for continuous processing and
sensor data filtering• Mobility of sensors and QoS aspects in IoT
https://github.com/OpenIotOrg/openiot
Use cases and validation scenariosSmart
Manufacturing Campus Guide Air MonitoringAgriculture
Sensing
The OpenIoT Architecture
Sensor data management
Semantic data management
X-GSN goes here
GSN: Global Sensor Networks
Managing sensor datasets
Publishing sensor observations
Discovery and exploration of datasets
Processing sensor time series
Open source project: Available in Github
• Open Source License• Mainly in Java• Community Support• Used in several projects
Releases available in Github
The OpenIoT Architecture
Sensor data management
Semantic data management
X-GSN goes here
Discovery & Exploitations
Request Definition & Presentation
12
Everything nice if your data is also nice
Issues: here, there and everywhere
13
GSN architecture
14
data acquisition
storage
query processing
data access interfaces
security
preprocessing
GSN: distributed deployment
15
pluggable input
pluggable output
standards?
discovery?
vocabularies?
semantics?
GSN REST interfaces: e.g JSON
16
Request all sensors in this GSN instance
Standard vocabs?Semantics?
SSN Ontology, for sure
17
ssn:Sensor
ssn:Platform
ssn:FeatureOfInterest
ssn:Deployment
ssn:Property
cf-prop:air_temperature
ssn:observes
ssn:onPlatform
dul:Place
dul:hasLocation
ssn:SensingDevicessn:inDeployment
ssn:MeasurementCapability
ssn:MeasurementProperty
geo:lat, geo:lng
xsd:double
ssn:hasMeasurementProperty
ssn:Accuracy
ssn:ofFeature
aws:TemperatureSensor
aws:Thermistor
ssn:Latency
dim:Temperature
qu:QuantityKind
cf-prop:soil_temperature
cf-feat:Wind
cf-feat:Surface
cf-feat:Medium
cf-feat:aircf-feat:soil
dim:VelocityOrSpeedcf-prop:wind_speedcf-prop:rainfall_rate
aws:CapacitiveBead …
…
…
Where to look for vocabs?
When do we set up the onto?
Who sets it up?http://lsm.deri.ie/resource/4039002668863045
http://lsm.deri.ie/ont/lsm.owl#unit
"Percent"
Ontologies in OpenIoT
18
‘configure’ ontologieshere
But sensors and wrappers configured here
Virtual Sensors
Data in GSN through Wrappers
19
Common abstractions, independent of applications, hardware
Simple integration & data correlation.
5140
GS
N
Various
Applications
Plug & Play
deployment
On-the-fly
reconfiguration
GS
N
GSN
Virtual Sensor configuration
20
<virtual-sensor name="room-monitor" >
<addressing>
<predicate key="geographical">BC143</predicate>
<predicate key="usage">room monitoring</predicate>
</addressing>
<life-cycle pool-size="10" />
<output-structure>
<field name="image" type="binary:image/jpeg" />
<field name="temp" type="int" />
</output-structure>
<storage permanent="true" history-size="10h" />
<input-streams>
<input-stream name="cam">
<stream-source alias="cam" storage-size="1“ sampling-rate=“1”>
<address wrapper=“tinyos2.x">
<predicate key=“host">tinybox.epfl.ch
</predicate>
<predicate key=“port">9001</predicate>
</address>
select * from WRAPPER
</stream-source>
<stream-source alias="temperature1“
storage-size="1m“ sampling-rate=“1”>
<address wrapper="remote">
<predicate key="type">temperature</predicate>
<predicate key="geographical">BC143-N </predicate>
</address>
select AVG(temp1) as T1 from WRAPPER
</stream-source>
<stream-source alias="temperature2“
storage-size="1m“>
<address wrapper="remote">
<predicate key="type“>temperature</predicate>
<predicate key="geographical“>BC143-S </predicate>
</address>
select AVG(temp2) as T2 from WRAPPER
</stream-source>
<query>
select cam.picture as image, temperature.T1
as temp from cam, temperature1
where temperature1.T1 > 30 AND
temperature1.T1 = temperature2.T2
</query>
</input-stream>
</input-streams>
</virtual-sensor>
Some metadata is here
Sensor metadata configuration
Some available mappings
21
• HTTP generic wrapper
• devices accessible via HTTP GET or POST requests, e.g., the AXIS206W wireless camera
• Serial forwarder wrapper
• enables interaction with TinyOS compatible motes (standard access in TinyOS)
• USB camera wrapper
• local USB connection.
• supports cameras with OV518 and OV511 chips.
• RFID wrapper
• access to Texas Instruments Series 6000 S6700 multi-protocol RFID readers
• Alien Technologies long range RFID reader 8950 EU.
• WiseNode wrapper
• access to WiseNode sensors (CSEM, Switzerland, http://www.csem.ch/)
• Generic UDP wrapper
• any device using the UDP protocol
• Generic serial/bluetooth wrapper
• supports sensing devices which send data through the serial port, e.g., EPuck robots, etc.
Register metadata
22
If ontologies change…
If we add new types of sensors?
Do I have control over my sensor metadata?
Metadata properties
23
sensorID="http://lsm.deri.ie/resource/1099207032411018"sensorName=closedsensesource=“Some source"sourceType=lausannesensorType=lausanneinformation=Air Quality Sensors from Lausanne station 1author=opensensefeature="http://lsm.deri.ie/OpenIoT/opensensefeature"fields="humidity,temperature"field.temperature.propertyName="http://lsm.deri.ie/OpenIoT/Temperature"field.temperature.unit=Cfield.humidity.propertyName="http://lsm.deri.ie/OpenIoT/Humidity"field.humidity.unit=Percentfield.co.propertyName="http://lsm.deri.ie/OpenIoT/CO"field.co.unit=PPMlatitude=46.529838longitude=6.596818
Turtle RDF registration
24
<sensor/5010> rdf:type aws:CapacitiveBead,ssn:Sensor;rdfs:label "Sensor 5010";ssn:observes aws:air_temperature ;phenonet:hasSerialNumber
<sensor/5010/serial/serial2> ;ssn:onPlatform <site/narrabri/Pweather> ;ssn:ofFeature <site/narrabri/sf/sf_narrabri> ;ssn:hasMeasurementProperty
<sensor/5010/accuracy/acc_1> ;prov:wasGeneratedBy "AuthorName";DUL:hasLocation <place/location1>;lsm:hasSensorType <sensorType1>;lsm:hasSourceType "SourceType".
<sensorType1> rdfs:label "TypeName".
<sensor/5010/serial/serial2> rdf:type phenonet:SerialNumber; phenonet:hasId "5010" .
<sensor/5010> rdf:type aws:CapacitiveBead,ssn:Sensor;rdfs:label "Sensor 5010";ssn:observes aws:air_temperature ;phenonet:hasSerialNumber
<sensor/5010/serial/serial2> ;ssn:onPlatform <site/narrabri/Pweather> ;ssn:ofFeature <site/narrabri/sf/sf_narrabri> ;ssn:hasMeasurementProperty
<sensor/5010/accuracy/acc_1> ;prov:wasGeneratedBy "AuthorName";DUL:hasLocation <place/location1>;lsm:hasSensorType <sensorType1>;lsm:hasSourceType "SourceType".
<sensorType1> rdfs:label "TypeName".
<sensor/5010/serial/serial2> rdf:type phenonet:SerialNumber; phenonet:hasId "5010" .
A bit more of semantics
Need tools for this
OpenIoT Schema Editor
25
Mobile sensors issues
26
ssn:Sensor
ssn:FeatureOfInterest
ssn:Propertyssn:observes
ssn:SensingDevice
ssn:ofFeature
ssn:Platform
ssn:Deployment
dul:Place
dul:hasLocation
ssn:inDeployment
geo:lat, geo:lng
xsd:double
But sensors move!
‘Mobility context’
Places where the sensor is usually in…
URI issues
27
• Auto-generated URIs: problematic naming
• Generate a sensor URI: templating
• Producing Duplicated Sensor registrations
28
Push observations there?
Push observations
Push observations
29
RDF observation annotations
30
CQELS stream processing
When to store, when to stream?
A-priori knowledge of the data usage
Why Streams?
Web standardsData discoveryData sharingWeb queriesG
o W
eb
SemanticsVocabulariesData HarvestingData linkingMatchingIn
tegr
atio
n OntologiesExpressivityInferenceRule processingKnowledge basesR
eas
on
ing
Query languagesQuery answeringEfficient processingQuery Federation
Pro
cess
ing
Do we always require these?
31
In Practice?
Discussion
32
•Annotation in IoT• Dynamic sensor data streams• Scalability
•Ontologies & Vocabularies• Reuse, definition, policies
•OpenIoT platform• Modules available• System integration
Muchas gracias!
Jean-Paul CalbimonteLSIR EPFL
@jpcik