SlideShare a Scribd company logo
Gluing the IoT world
with Java and LoRaWAN
Pance Cavkovski, Netcetera, jug.ch 12.09.2017
June 2014
whoamisenior software engineer @ Netcetera
jug.mk Leader
codefu.mk admin
hardware & IoT enthusiast
TTN SK initiator
http://pance.mk/ and @hsilomedus
In the agenda for today
LoRaWAN crash-course
Hardware prototyping
Rules & Architecture for IoT systems
Software Development
Extras
Warning
The video you’re about to see is made completely by a software
developer, and it is for demonstration purposes only.
If something similar is to meet the general public, it *will* be re-
implemented by a trained professional 
SkopjePulse
Problems
- extreme air pollution
- excessive urban noise
- flash floods
No clear means for improvement
Solution
- leverage technology
- crowdsourced sensor network
- data analysis and availability
- warnings
- clearer insights and basis for
action
https://skopjepulse.mk/faq
LoRaWAN
Crash-course
LoRa
LongRange
Chirp Spread-spectrum radio modulation (~ OSI physical layer)
Low-power, long-range, low-cost communication enabler
Proprietary by Semtech
Can work on license-free ISM bands (433, 868, 915 MHz)
Multiple channels, multiple spreading factors
LoRaWAN
Long Range Wide Area Network
MAC layer on top of LoRa
De-facto the new IoT communication standard
Specification and development guided by LoRa Alliance
LoRaWAN features
http://www.semtech.com/wireless-rf/internet-of-things/what-is-lora/
Architecture
Limitations
Low-Speed: 250 – 5470 bps (configurable with SF and BW, distance
dependable)
Very small packages: (by provider) ~ 20 bytes
Less frequent: (by provider): 2-200 up/ 1-10 down
Class A LoRaWAN devices
One Uplink followed by two downlink windows (at 1s period)
OTAA or ABP authorization
Can be done with:
- RN2483 chip and sending MAC commands.
- RFM95w or similar with the LMIC library
LoRaWAN MAC example
mac reset 868
mac set rx2 3 869525000
mac set devaddr <devaddr>
mac set appskey <appSkey>
mac set nwkskey <nwkSkey>
mac set adr off
mac set ar off
…
…
mac set pwridx 1
mac set dr <datarate> (0 to 5)
mac save
mac join abp
mac tx uncnf 1 <dataToSend>
TheThingsNetwork
Global, crowdsourced Internet
Of Things data network:
- community driven
- provided network/back-end
- free (fair use)
- LoRaWAN as base tech.
TheThingsNetwork - Zurich
https://www.thethingsnetwork.org/community/zurich/
MakeZurich
https://makezurich.ch/
TheThingsNetwork - Switzerland
https://www.thethingsnetwork.org/country/switzerland/
TheThingsNetwork ZH - Contact
Gonzalo Casas
TTN ZH Initiator
https://www.thethingsnetwork.org/u/gonzalo
https://twitter.com/gnz
How to use TTN
Register at https://console.thethingsnetwork.org/
- Applications / devices
- Keys, UIDs, credentials
- Plugins / Integrations
Also in Switzerland
Swisscom LPN: http://lpn.swisscom.ch/e/
- Nationwide LoRa coverage
- Different offers based on intended traffic
Loriot
- provide distributed backend
- you provide the network devices and coverage
Hardware
Prototyping and coding
The basic package
And finally
Embedded Development
Arduino C
Restricted environment (16MHz, 32KB flash, 2KB memory)
Perpetual non-observed execution
Rules & architecture
How to build an IoT system
Decouple
Clear separation of concern
- data acquisition and transmission
- data offering
- web
- analytics / processing
Robustness, resilience, scaling, fallbacks
tl;dr: containers and orchestrators
Optimize
(almost) No overhead
- binary protocols
- always on
- react and store fast
- short physical distance
* Optimized MQTT is a good way to go.
Store
IoT data is almost always time-series based
Redundant and impartial data
Append only
Don’t aggregate, but process
Live with eventual consistency
* Apache Cassandra is a good way to go
Skopje Pulse serverSkopje Pulse server Cassanda DBCassanda DB
LoRa GatewayLoRa Gateway
The Things NetworkThe Things Network Public data sourcePublic data source
MQTTMQTT
Sensor
RN2483
Sensor
RN2483
Sensor
RN2483
Data Collection
MicroService
Data Collection
MicroService
Software development
Putting everything together
Getting to TTN
Spring Boot + Eclipse Paho client + Gson
- @Component client implementing MqttCallback
- connect in @PostConstruct
- @Scheduled(fixedrate = …) watchdog @Component
Details on MQTT URL, credentials and message formats:
https://www.thethingsnetwork.org/docs/network/migrate.html#mqtt
Storing data
Spring Boot + Cassandra Driver Core + Extras
- Cassandra Cluster wrapped in @Service
- InstantCodec for java.time interoperability
- QueryBuilder
- No data filtering.
spring-data-cassandra seems like a poor choice.
Web (public)
Interactive cockpit on landing page
- d3js client-side visualizations
- leaflet + OpenStreetMap + Stamen
Web (admin)
Full-blown SPA
- Angular2
- ng2-admin
- SpringMVC
Extras
Additions, currently in the oven, inspirations and insights
WiFi devices
Where you *really* can’t do LoRaWAN
- ESP8266 powered device
- use TLS!!!
- provision device address securely
- implement own address -> key mapping
More: http://pance.mk/index.php/securing-esp8266-communication/
In the oven 1
Nostradamus – Time-series forecast service
- trainer + executor based on Python + StatsModels + Pandas & ARIMA.
Averaging service
- periodically scheduled scenarios, processing and decisions
Watchdog – sanity checker
- notifies sensor downtime and data irregularities
Water level sensors
- still in early phase. Based on water or sonic sensors.
In the oven 2
Notifications and warning service
- periodically analyses recent data
- sends digests to users
- filters out excessive situations and sends out warnings
- tweets for every digest and warning
Story 1: Hardware (dis)trust
Carefully select and inspect sensors
Test for correctness (if possible)
Beware of factory defects (cold sensitive RN2483)
Story 2: When it’s more than a number
Thunderstorm
PM10:
Forest fire (5km outside of the city)
Story 3: Share & inspire
Student projects ongoing
- Best café to sit at right now?
- Smart trash collection
- SkopjeDashboard
http://tiny.cc/awsttn
Q & A
@hsilomedus ; pance.cavkovski@netcetera.com
http://pance.mk/
https://skopjepulse.mk/
https://www.netcetera.com/home/stories/expertise/20170203-SkopjePulse-IoT.html
https://thethingsnetwork.org/c/sofia/
https://console.thethingsnetwork.org/
http://kicad-pcb.org/
https://www.thethingsnetwork.org/docs/network/migrate.html#mqtt
http://tiny.cc/awsttn

More Related Content

What's hot

газарзүйн зураг 7class
 газарзүйн зураг 7class газарзүйн зураг 7class
газарзүйн зураг 7classUUUUR
 
МКонт 01
МКонт 01МКонт 01
МКонт 01
Babaa Naya
 
800.mn 2013 physics c by byambaa avirmed
800.mn   2013 physics c by byambaa avirmed800.mn   2013 physics c by byambaa avirmed
800.mn 2013 physics c by byambaa avirmed
Бямбаа Авирмэд
 
Lekts presentation3
Lekts presentation3Lekts presentation3
Lekts presentation3ganzorigb
 
хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25
хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25
хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25
GeoMedeelel
 
Gazriin gadarga a jd nuluuluh ni
Gazriin gadarga a jd nuluuluh niGazriin gadarga a jd nuluuluh ni
Gazriin gadarga a jd nuluuluh niBMunguntuul
 
11 mal aj ahui.pptx
11 mal aj ahui.pptx11 mal aj ahui.pptx
11 mal aj ahui.pptx
JijihkhvvDawaanyam
 
Lecture 10,11 xt ur chadbar, xoriglox zuils
Lecture 10,11 xt ur chadbar, xoriglox zuilsLecture 10,11 xt ur chadbar, xoriglox zuils
Lecture 10,11 xt ur chadbar, xoriglox zuilsmunkhuu_a
 
гадаргын ус, гол мөрнүүд
гадаргын ус, гол мөрнүүд гадаргын ус, гол мөрнүүд
гадаргын ус, гол мөрнүүд Erdenetuya Galbadrah
 
Agnuuriin aj nuuts
Agnuuriin aj nuutsAgnuuriin aj nuuts
Agnuuriin aj nuutsBMunguntuul
 
Ulaanburhan dugnelt 2015-05-20
Ulaanburhan dugnelt 2015-05-20Ulaanburhan dugnelt 2015-05-20
Ulaanburhan dugnelt 2015-05-20
Tumuruu Shiileg
 
Innomed-2014 уралдаан ЭМШУИС СС 3-р курс
Innomed-2014 уралдаан ЭМШУИС СС 3-р курсInnomed-2014 уралдаан ЭМШУИС СС 3-р курс
Innomed-2014 уралдаан ЭМШУИС СС 3-р курс
Medimpex Mongolia
 
800.mn 2014 physics b by byambaa avirmed
800.mn   2014 physics b by byambaa avirmed800.mn   2014 physics b by byambaa avirmed
800.mn 2014 physics b by byambaa avirmed
Бямбаа Авирмэд
 
MRI
MRIMRI
Belcheer zagwar 3
Belcheer zagwar 3Belcheer zagwar 3
Belcheer zagwar 3
hi_bmb
 
Шинжилгээний бэлтгэл
Шинжилгээний бэлтгэлШинжилгээний бэлтгэл
Шинжилгээний бэлтгэл
Мэндбаяр Мөнхдөл
 
Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/
Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/ Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/
Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/
Хотгойд Шанж Болдбаатар Ууганбаяр
 

What's hot (20)

газарзүйн зураг 7class
 газарзүйн зураг 7class газарзүйн зураг 7class
газарзүйн зураг 7class
 
МКонт 01
МКонт 01МКонт 01
МКонт 01
 
800.mn 2013 physics c by byambaa avirmed
800.mn   2013 physics c by byambaa avirmed800.mn   2013 physics c by byambaa avirmed
800.mn 2013 physics c by byambaa avirmed
 
инээвэл залуужина
инээвэл залуужинаинээвэл залуужина
инээвэл залуужина
 
Physics
PhysicsPhysics
Physics
 
Lekts presentation3
Lekts presentation3Lekts presentation3
Lekts presentation3
 
хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25
хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25
хиймэл дагуулын мэдээ ашиглан ойн биомассийг тооцох 12 25
 
Gazriin gadarga a jd nuluuluh ni
Gazriin gadarga a jd nuluuluh niGazriin gadarga a jd nuluuluh ni
Gazriin gadarga a jd nuluuluh ni
 
11 mal aj ahui.pptx
11 mal aj ahui.pptx11 mal aj ahui.pptx
11 mal aj ahui.pptx
 
Lecture 10,11 xt ur chadbar, xoriglox zuils
Lecture 10,11 xt ur chadbar, xoriglox zuilsLecture 10,11 xt ur chadbar, xoriglox zuils
Lecture 10,11 xt ur chadbar, xoriglox zuils
 
гадаргын ус, гол мөрнүүд
гадаргын ус, гол мөрнүүд гадаргын ус, гол мөрнүүд
гадаргын ус, гол мөрнүүд
 
Zurag
ZuragZurag
Zurag
 
Agnuuriin aj nuuts
Agnuuriin aj nuutsAgnuuriin aj nuuts
Agnuuriin aj nuuts
 
Ulaanburhan dugnelt 2015-05-20
Ulaanburhan dugnelt 2015-05-20Ulaanburhan dugnelt 2015-05-20
Ulaanburhan dugnelt 2015-05-20
 
Innomed-2014 уралдаан ЭМШУИС СС 3-р курс
Innomed-2014 уралдаан ЭМШУИС СС 3-р курсInnomed-2014 уралдаан ЭМШУИС СС 3-р курс
Innomed-2014 уралдаан ЭМШУИС СС 3-р курс
 
800.mn 2014 physics b by byambaa avirmed
800.mn   2014 physics b by byambaa avirmed800.mn   2014 physics b by byambaa avirmed
800.mn 2014 physics b by byambaa avirmed
 
MRI
MRIMRI
MRI
 
Belcheer zagwar 3
Belcheer zagwar 3Belcheer zagwar 3
Belcheer zagwar 3
 
Шинжилгээний бэлтгэл
Шинжилгээний бэлтгэлШинжилгээний бэлтгэл
Шинжилгээний бэлтгэл
 
Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/
Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/ Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/
Хотын соёл /Хүүхдийн их эмч, хоол судлагч, АУ-ны доктор Ч.Өлзийбүрэн/
 

Similar to Gluing the IoT world with Java and LoRaWAN

Gluing the iot world (ICT)
Gluing the iot world (ICT)Gluing the iot world (ICT)
Gluing the iot world (ICT)
Pance Cavkovski
 
IoT and connected devices
IoT and connected devicesIoT and connected devices
IoT and connected devices
Pascal Bodin
 
Supercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSupercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-RED
Simen Sommerfeldt
 
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, ParisThe complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
OW2
 
webthing-floss-iot-20180607rzr
webthing-floss-iot-20180607rzrwebthing-floss-iot-20180607rzr
webthing-floss-iot-20180607rzr
Phil www.rzr.online.fr
 
The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
Samsung Open Source Group
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Julien Vermillard
 
Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...
Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...
Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...
Cloud Native Day Tel Aviv
 
tizen-rt-javascript-20181011
tizen-rt-javascript-20181011tizen-rt-javascript-20181011
tizen-rt-javascript-20181011
Phil www.rzr.online.fr
 
Web-controlled Christmas Lights
Web-controlled Christmas LightsWeb-controlled Christmas Lights
Web-controlled Christmas Lights
Sakir Temel
 
Open Source Edge Computing Platforms - Overview
Open Source Edge Computing Platforms - OverviewOpen Source Edge Computing Platforms - Overview
Open Source Edge Computing Platforms - Overview
Krishna-Kumar
 
Connect Everything with NATS - Cloud Expo Europe
Connect Everything with NATS - Cloud Expo EuropeConnect Everything with NATS - Cloud Expo Europe
Connect Everything with NATS - Cloud Expo Europe
wallyqs
 
Spark Streaming the Industrial IoT
Spark Streaming the Industrial IoTSpark Streaming the Industrial IoT
Spark Streaming the Industrial IoT
Jim Haughwout
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of Things
Paul Fremantle
 
The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2
Haggai Philip Zagury
 
Kumar cscl final
Kumar cscl finalKumar cscl final
Kumar cscl final
Kumar Gaurav
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT Meetup
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
Giacomo Vacca
 
Mmsys slideshare-intel-nokia
Mmsys slideshare-intel-nokiaMmsys slideshare-intel-nokia
Mmsys slideshare-intel-nokia
Rufael Mekuria
 
OCCIware@OW2con 2016
OCCIware@OW2con 2016OCCIware@OW2con 2016
OCCIware@OW2con 2016
Marc Dutoo
 

Similar to Gluing the IoT world with Java and LoRaWAN (20)

Gluing the iot world (ICT)
Gluing the iot world (ICT)Gluing the iot world (ICT)
Gluing the iot world (ICT)
 
IoT and connected devices
IoT and connected devicesIoT and connected devices
IoT and connected devices
 
Supercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSupercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-RED
 
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, ParisThe complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
 
webthing-floss-iot-20180607rzr
webthing-floss-iot-20180607rzrwebthing-floss-iot-20180607rzr
webthing-floss-iot-20180607rzr
 
The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
 
Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...
Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...
Brain in the Cloud: Machine Learning on OpenStack & Kubernetes Done Right - E...
 
tizen-rt-javascript-20181011
tizen-rt-javascript-20181011tizen-rt-javascript-20181011
tizen-rt-javascript-20181011
 
Web-controlled Christmas Lights
Web-controlled Christmas LightsWeb-controlled Christmas Lights
Web-controlled Christmas Lights
 
Open Source Edge Computing Platforms - Overview
Open Source Edge Computing Platforms - OverviewOpen Source Edge Computing Platforms - Overview
Open Source Edge Computing Platforms - Overview
 
Connect Everything with NATS - Cloud Expo Europe
Connect Everything with NATS - Cloud Expo EuropeConnect Everything with NATS - Cloud Expo Europe
Connect Everything with NATS - Cloud Expo Europe
 
Spark Streaming the Industrial IoT
Spark Streaming the Industrial IoTSpark Streaming the Industrial IoT
Spark Streaming the Industrial IoT
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of Things
 
The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2The 2nd half. Scaling to the next^2
The 2nd half. Scaling to the next^2
 
Kumar cscl final
Kumar cscl finalKumar cscl final
Kumar cscl final
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
Mmsys slideshare-intel-nokia
Mmsys slideshare-intel-nokiaMmsys slideshare-intel-nokia
Mmsys slideshare-intel-nokia
 
OCCIware@OW2con 2016
OCCIware@OW2con 2016OCCIware@OW2con 2016
OCCIware@OW2con 2016
 

More from Pance Cavkovski

Jprofessionals co create the future of your city
Jprofessionals co create the future of your cityJprofessionals co create the future of your city
Jprofessionals co create the future of your city
Pance Cavkovski
 
Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)
Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)
Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)
Pance Cavkovski
 
VDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & KubernetesVDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & Kubernetes
Pance Cavkovski
 
DIY Java & Kubernetes
DIY Java & KubernetesDIY Java & Kubernetes
DIY Java & Kubernetes
Pance Cavkovski
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101
Pance Cavkovski
 
Hands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPiHands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPiPance Cavkovski
 
Micro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry PiMicro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry Pi
Pance Cavkovski
 
Web sockets in Java
Web sockets in JavaWeb sockets in Java
Web sockets in Java
Pance Cavkovski
 

More from Pance Cavkovski (8)

Jprofessionals co create the future of your city
Jprofessionals co create the future of your cityJprofessionals co create the future of your city
Jprofessionals co create the future of your city
 
Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)
Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)
Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)
 
VDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & KubernetesVDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & Kubernetes
 
DIY Java & Kubernetes
DIY Java & KubernetesDIY Java & Kubernetes
DIY Java & Kubernetes
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101
 
Hands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPiHands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPi
 
Micro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry PiMicro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry Pi
 
Web sockets in Java
Web sockets in JavaWeb sockets in Java
Web sockets in Java
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

Gluing the IoT world with Java and LoRaWAN

  • 1. Gluing the IoT world with Java and LoRaWAN Pance Cavkovski, Netcetera, jug.ch 12.09.2017
  • 3. whoamisenior software engineer @ Netcetera jug.mk Leader codefu.mk admin hardware & IoT enthusiast TTN SK initiator http://pance.mk/ and @hsilomedus
  • 4.
  • 5.
  • 6. In the agenda for today LoRaWAN crash-course Hardware prototyping Rules & Architecture for IoT systems Software Development Extras
  • 7. Warning The video you’re about to see is made completely by a software developer, and it is for demonstration purposes only. If something similar is to meet the general public, it *will* be re- implemented by a trained professional 
  • 8.
  • 9. SkopjePulse Problems - extreme air pollution - excessive urban noise - flash floods No clear means for improvement Solution - leverage technology - crowdsourced sensor network - data analysis and availability - warnings - clearer insights and basis for action https://skopjepulse.mk/faq
  • 11. LoRa LongRange Chirp Spread-spectrum radio modulation (~ OSI physical layer) Low-power, long-range, low-cost communication enabler Proprietary by Semtech Can work on license-free ISM bands (433, 868, 915 MHz) Multiple channels, multiple spreading factors
  • 12. LoRaWAN Long Range Wide Area Network MAC layer on top of LoRa De-facto the new IoT communication standard Specification and development guided by LoRa Alliance
  • 15. Limitations Low-Speed: 250 – 5470 bps (configurable with SF and BW, distance dependable) Very small packages: (by provider) ~ 20 bytes Less frequent: (by provider): 2-200 up/ 1-10 down
  • 16. Class A LoRaWAN devices One Uplink followed by two downlink windows (at 1s period) OTAA or ABP authorization Can be done with: - RN2483 chip and sending MAC commands. - RFM95w or similar with the LMIC library
  • 17. LoRaWAN MAC example mac reset 868 mac set rx2 3 869525000 mac set devaddr <devaddr> mac set appskey <appSkey> mac set nwkskey <nwkSkey> mac set adr off mac set ar off … … mac set pwridx 1 mac set dr <datarate> (0 to 5) mac save mac join abp mac tx uncnf 1 <dataToSend>
  • 18. TheThingsNetwork Global, crowdsourced Internet Of Things data network: - community driven - provided network/back-end - free (fair use) - LoRaWAN as base tech.
  • 22. TheThingsNetwork ZH - Contact Gonzalo Casas TTN ZH Initiator https://www.thethingsnetwork.org/u/gonzalo https://twitter.com/gnz
  • 23. How to use TTN Register at https://console.thethingsnetwork.org/ - Applications / devices - Keys, UIDs, credentials - Plugins / Integrations
  • 24. Also in Switzerland Swisscom LPN: http://lpn.swisscom.ch/e/ - Nationwide LoRa coverage - Different offers based on intended traffic Loriot - provide distributed backend - you provide the network devices and coverage
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 34. Embedded Development Arduino C Restricted environment (16MHz, 32KB flash, 2KB memory) Perpetual non-observed execution
  • 35. Rules & architecture How to build an IoT system
  • 36. Decouple Clear separation of concern - data acquisition and transmission - data offering - web - analytics / processing Robustness, resilience, scaling, fallbacks tl;dr: containers and orchestrators
  • 37. Optimize (almost) No overhead - binary protocols - always on - react and store fast - short physical distance * Optimized MQTT is a good way to go.
  • 38. Store IoT data is almost always time-series based Redundant and impartial data Append only Don’t aggregate, but process Live with eventual consistency * Apache Cassandra is a good way to go
  • 39. Skopje Pulse serverSkopje Pulse server Cassanda DBCassanda DB LoRa GatewayLoRa Gateway The Things NetworkThe Things Network Public data sourcePublic data source MQTTMQTT Sensor RN2483 Sensor RN2483 Sensor RN2483 Data Collection MicroService Data Collection MicroService
  • 41.
  • 42. Getting to TTN Spring Boot + Eclipse Paho client + Gson - @Component client implementing MqttCallback - connect in @PostConstruct - @Scheduled(fixedrate = …) watchdog @Component Details on MQTT URL, credentials and message formats: https://www.thethingsnetwork.org/docs/network/migrate.html#mqtt
  • 43. Storing data Spring Boot + Cassandra Driver Core + Extras - Cassandra Cluster wrapped in @Service - InstantCodec for java.time interoperability - QueryBuilder - No data filtering. spring-data-cassandra seems like a poor choice.
  • 44. Web (public) Interactive cockpit on landing page - d3js client-side visualizations - leaflet + OpenStreetMap + Stamen
  • 45. Web (admin) Full-blown SPA - Angular2 - ng2-admin - SpringMVC
  • 46. Extras Additions, currently in the oven, inspirations and insights
  • 47. WiFi devices Where you *really* can’t do LoRaWAN - ESP8266 powered device - use TLS!!! - provision device address securely - implement own address -> key mapping More: http://pance.mk/index.php/securing-esp8266-communication/
  • 48. In the oven 1 Nostradamus – Time-series forecast service - trainer + executor based on Python + StatsModels + Pandas & ARIMA. Averaging service - periodically scheduled scenarios, processing and decisions Watchdog – sanity checker - notifies sensor downtime and data irregularities Water level sensors - still in early phase. Based on water or sonic sensors.
  • 49. In the oven 2 Notifications and warning service - periodically analyses recent data - sends digests to users - filters out excessive situations and sends out warnings - tweets for every digest and warning
  • 50. Story 1: Hardware (dis)trust Carefully select and inspect sensors Test for correctness (if possible) Beware of factory defects (cold sensitive RN2483)
  • 51. Story 2: When it’s more than a number Thunderstorm PM10: Forest fire (5km outside of the city)
  • 52. Story 3: Share & inspire Student projects ongoing - Best café to sit at right now? - Smart trash collection - SkopjeDashboard
  • 54. Q & A @hsilomedus ; pance.cavkovski@netcetera.com http://pance.mk/ https://skopjepulse.mk/ https://www.netcetera.com/home/stories/expertise/20170203-SkopjePulse-IoT.html https://thethingsnetwork.org/c/sofia/ https://console.thethingsnetwork.org/ http://kicad-pcb.org/ https://www.thethingsnetwork.org/docs/network/migrate.html#mqtt http://tiny.cc/awsttn