Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Open Sensor Networks with LoRa TTN and SensorThings API


Published on

Presentation at LoRaWAN TheThingsNetwork makers event (make a Pet-Tracker with LoRa) organized by Ruimteschepper at Warehouse of Innovation Eindhoven (also home to IoT Eindhoven Meetup Group). Summarizes Smart Emission architecture, thoughts on tech for Spatio-Temporal Data, Internet of Things sorry Internet of Silos. Ending with a demo on LoRaWAN TheThingsNetwork integration with the OGC SensorThings API using MQTT Bridging.

Published in: Technology

Open Sensor Networks with LoRa TTN and SensorThings API

  1. 1. Open Sensor 
 Networks Just van den Broecke Just Objects B.V. Info Kenniskring - Ruimteschepper
 Warehouse of Innovation Eindhoven 11 dec, 2018 Met dank aan
  2. 2. ABOUT Independent Open Source Geospatial Professional Member of the OpenGeoGroep (NL) Chair 1. Intro
  3. 3. Air Quality Sensor Projects • 2014/2015 - SOSPilot - Geonovum en RIVM
 RIVM LML Data via OGC Sensor Observation Service (SOS) 
 • 2015-2017 - Smart Emission Nijmegen - Consortium
 Burgers meten zelf luchtkwaliteit en geluid, opbouw SE Platform 
 • 2017-2018 - Smart Emission - Consolidatie en Opschaling
 Smart City Living Lab (meerdere steden),
 Green Challenge Nijmegen, AirSensEUR (EU JRC)
 SE Platform Migratie naar PDOK - Kadaster 
 • 2018- AirSensEUR - Open HW Sensor Box - European Commission JRC
 deploy 5 AirSensEUR Boxes, connect to Smart Emission Platform
  4. 4. Inclusive Citizen Sensing ▪ Citizen-sensor-networks for fine-grained measurements, with new low-cost sensing devices ▪ Transparency and democracy of pollution monitoring, ‘making the externalities (e.g. noise, air pollution) visible’ ▪ Cost-effective environmental monitoring with 
 Open Source, Open Data, Open Standards (APIs) Smart Emission Nijmegen
  5. 5. Which type of low cost sensors to deploy? Quality and Price Number of sensors applied in a city Smart Emission “Jose” Aireas “Airbox” “Smart Citizen Kit” RIVM National AQ Stations Smart Emission Nijmegen
  6. 6. Smart Emission Nijmegen
  7. 7. Smart Emission Platform
  8. 8. Smart Emission Platform WMS WFS SOS STA Client Apps/Viewers web-APIs sensors Collector APIs SE Platform - The Big Picture Dataflow
  9. 9. Smart 
 Emission Platform WMS WFS SOS STA CityGIS Data Collector Intemo Data Collector InfluxDB Data Collector RIVM LML SOSInfluxDB HTTP Whale API Harvesters ETL LML Influx HTTP Sensors API API Outbound Inbound Dataflow SE Platform - Dataflow and APIs Whale API Decoupling
 Data Collectors +Harvesters MQTTMQTT
  10. 10. Viewers talk to (OGC) APIs (data platform) Heron Viewer Smart App 52North SOS Viewer Grafana Extern
  11. 11. Viewers
  12. 12. Thoughts
  13. 13. All Data 
 Spatio-Temporal Spatial Temporal Geo IoT
  14. 14. Internet of Silos Convenience over 
  15. 15. Open APIs & Tech for Spatio-temporal to the Rescue?
  16. 16. Spatio-temporal DB: PostgreSQL with
 PostGIS+TimescaleDB OGC SensorThings API Other Talk
  17. 17. OGC SensorThings API Showcase Modern Standard (REST) API-based: HTTP Verbs Data Model is First Class Citizen Multiple FOSS Implementations Linked Data, Paging, OData Pub/Sub via MQTT GOST SOS-Killer? (Geo)JSON Encoding
  18. 18. SensorThings API - Model
  19. 19. SensorThings API - Example SE Entity Mapping
  20. 20. STA Entity Real World Entity Instance Thing Vogelhut Natuurmon. Vogelhut #234 Location Plaats Vogelhut Mosselseweg 64, 1245AF Otterlo Sensor Verrekijker Swarovski Swarovision 1900 10x40 ObservedProperty Diersoort Vogels Observation Aantal + Tijd 1 op 2018-12-11T18:09:05 Datastream (Verbindt T, S, OP en O) FeatureOfInterest Soort en Locatie Vogel Merel op 4.9344, 52.567 SensorThings API - Not just Sensor Devices
  21. 21. Geodan GOST - Open Source STA in GoLang
  22. 22. Fun PoC 
 Bridging IoT with Geo: TheThingsNetwork to SensorThings API
  23. 23. Setup GOST API Dataflow GOST Dashboard Node-Red ThingsNode MQTT MQTT STA Process MQTTBridge ttn2sta PySense + LoPy Docker 
 Postman ProvisioningAny LoRa/TTN Device Docker Containers
  24. 24. Steps • Install ThingsNode as TTN App and Device as usual • Test MQTT uplink: 
 $ mosquitto_sub -h -t ‘+/devices/+/ up'-u 'mythingsnode1' -P ‘ttn-account-v2.*****’ -v • Install SensorThings Geodan GOST Stack
 $ wget
 $ docker-compose up • Postman: provision STA Entities, Examples: 2017_foss4g_boston • Node-Red (or regular Python): develop MQTT Bridge
 MQTT from TTN:
 MQTT to STA: see “GOST FOSS4G Boston” workshop above
 ttn2sta: copy TTN Payload data to STA result and 
 result- and/or phenomenonTime

  25. 25. TTN to STA Mapping
  26. 26. All the Code needed!
  27. 27. STA Observations
  28. 28. ▪ All Entities (root)
 http://localhost:8080/v1.0 ▪ All Observations from all Things (paged)
 http://localhost:8080/v1.0/Observations ▪ All Observations Thing with id=3
 http://localhost:8080/v1.0/Things(3)?$expand=Datastreams/Observations ▪ Last Observation Thing(3)
 http://localhost:8080/v1.0/Things(3)?$expand=Datastreams/Observations($top=1) ▪ All Observations after Dec 11, 2018 20:57 UTC
 http://localhost:8080/v1.0/Observations?$filter=resultTime%20gt %20%272018-12-11T20:57:00.000Z%27 ▪ Etc, more examples: STA REST/OData Queries
  29. 29. Links (data platform) (source code) (documentation) (SensorSDI) (support and comms) (SensorThings API, STA) (Geodan STA Open Source Implementation) (Just’s Blog) (EU AirSensEUR) We would like to acknowledge for their valuable input: All partners of the Smart Emission Consortium Dank U!