SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
Python for IoT
A return of experience
Alexandre Abadie, Inria
Outline
What IoT are we talking about ?
The usual protocols for IoT
Pyaiot, connecting objects to the web
How we built Pyaiot
Lessons learned
Conclusion
What IoT are we talking about ?
The Internet of Things today
High-end devices
Low-end devices
⇒ adapted protocols are required
Outline
What IoT are we talking about ?
⇒ The usual protocols for IoT
Pyaiot, connecting objects to the web
How we built Pyaiot
Lessons learned
Conclusion
Usual protocols for IoT: CoAP
Core WG at IETF specifications (2010)
RFC 7252
Similar to HTTP REST:
GET/PUT/POST/DELETE + OBSERVE
Works on UDP with small payload
overhead
More information at http://coap.technology/
source: https://fr.wikipedia.org/wiki/CoAP
CoAP: available implementations in Python
3 available implementations:
TxThings: Twisted based, Python 2 & 3
https://github.com/mwasilak/txThings
Aiocoap: asyncio based, Python 3 only
https://github.com/chrysn/aiocoap
CoaPthon: Threading based, Python 2 & 3
https://github.com/Tanganelli/CoAPthon
Implementations exist for other languages: http://coap.technology/impls.html
Usual protocols for IoT: MQTT
Based on publication/subscriptions to topics pattern
Topics have a path form: this/is/a/topic
MQTT v3.1.1 is an OASIS standard
MQTT Sensor Network (MQTT-SN): adapted for constrained devices
source: https://dev.to/kenwalger/overview-of-the-mqtt-protocol
MQTT: available implementations in Python
2 available implementations:
Paho-mqtt: threading based, considered as the reference implementation
https://pypi.python.org/pypi/paho-mqtt
HBMQTT: asyncio based
https://github.com/beerfactory/hbmqtt
Outline
What IoT are we talking about ?
The usual protocols for IoT
⇒ Pyaiot, connecting objects to the web
How we built Pyaiot
Lessons learned
Conclusion
Why Pyaiot?
Need for a web application able to communicate with contrained devices
⇒ but constrained devices cannot use usual web protocols
Why Pyaiot?
Need for a web application able to communicate with contrained devices
⇒ but constrained devices cannot use usual web protocols
Need for multi-site support
⇒ but constrained devices cannot be exposed directly to the web
Why Pyaiot?
Need for a web application able to communicate with contrained devices
⇒ but constrained devices cannot use usual web protocols
Need for multi-site support
⇒ but constrained devices cannot be exposed directly to the web
Heterogeneous protocol support
⇒ various IoT protocols exist
General guidelines
Open-Source and simple design⇒ can be deployed by anyone
https://github.com/pyaiot/pyaiot
General guidelines
Open-Source and simple design⇒ can be deployed by anyone
https://github.com/pyaiot/pyaiot
Multiprotocol: CoAP, MQTT, etc ⇒ interoperability
General guidelines
Open-Source and simple design⇒ can be deployed by anyone
https://github.com/pyaiot/pyaiot
Multiprotocol: CoAP, MQTT, etc ⇒ interoperability
Modular ⇒ extensible
General guidelines
Open-Source and simple design⇒ can be deployed by anyone
https://github.com/pyaiot/pyaiot
Multiprotocol: CoAP, MQTT, etc ⇒ interoperability
Modular ⇒ extensible
Bi-directionnal and real time access to nodes ⇒ reactive
General guidelines
Open-Source and simple design⇒ can be deployed by anyone
https://github.com/pyaiot/pyaiot
Multiprotocol: CoAP, MQTT, etc ⇒ interoperability
Modular ⇒ extensible
Bi-directionnal and real time access to nodes ⇒ reactive
No constraint regarding the backend language ⇒ let's choose Python!
General guidelines
Open-Source and simple design⇒ can be deployed by anyone
https://github.com/pyaiot/pyaiot
Multiprotocol: CoAP, MQTT, etc ⇒ interoperability
Modular ⇒ extensible
Bi-directionnal and real time access to nodes ⇒ reactive
No constraint regarding the backend language ⇒ let's choose Python!
Pyaiot targets contrained nodes running RIOT: https://riot-os.org
Pyaiot overview
Permanent web showcase for RIOT available at
http://riot-demo.inria.fr
Pyaiot: The web dashboard
Outline
What IoT are we talking about ?
The usual protocols for IoT
Pyaiot, connecting objects to the web
⇒ How we built Pyaiot
Lessons learned
Conclusion
Pyaiot overview
Pyaiot services
Gateways are clients running in private networks
Nodes are kept isolated from Internet
Messages exchanged in JSON format
Works with low-end devices (RIOT) and high-end devices (Python)
Technical choices
Web dashboard developed with Vue.js   http://vuejs.org
Service applications based on Tornado framework with:
HTTP server
Websocket server and client
Aiocoap for CoAP protocol support
HBMQTT for MQTT protocol support
Technical choices
Web dashboard developed with Vue.js   http://vuejs.org
Service applications based on Tornado framework with:
HTTP server
Websocket server and client
Aiocoap for CoAP protocol support
HBMQTT for MQTT protocol support
⇒ All python packages are asyncio based/compatible ⇒ simplify integration
The MQTT gateway in detail
MQTT-SN is required for low-end device
⇒ a MQTT to MQTT-SN gateway/broker is required
No implementation in Python
⇒ let's go for mosquitto.rsmb
The MQTT gateway in detail
MQTT-SN is required for low-end device
⇒ a MQTT to MQTT-SN gateway/broker is required
No implementation in Python
⇒ let's go for mosquitto.rsmb
Node/Gateway
subscribe/publish to topic publish/subscribe to topics
gateway//discover node/check
node//resources
node//
Outline
What IoT are we talking about ?
The usual protocols for IoT
Pyaiot, connecting objects to the web
How we built Pyaiot
⇒ Lessons learned
Conclusion
Using asyncio
Easy to read asynchronous programming language
Using asyncio
Easy to read asynchronous programming language
Asyncio new syntax available with Python >= 3.5
Using asyncio
Easy to read asynchronous programming language
Asyncio new syntax available with Python >= 3.5
... but Python 3.4.2 available on Raspbian
@asyncio.coroutine
def my_coroutine():
my_long_call()
yield from my_coroutine() # wait until done
asyncio.get_event_loop().create_task(my_coroutine) # scheduled in ioloop
asyncio.ensure_future(my_coroutine) # scheduled in ioloop, requires python 3.4.4
Using asyncio
Easy to read asynchronous programming language
Asyncio new syntax available with Python >= 3.5
... but Python 3.4.2 available on Raspbian
@asyncio.coroutine
def my_coroutine():
my_long_call()
yield from my_coroutine() # wait until done
asyncio.get_event_loop().create_task(my_coroutine) # scheduled in ioloop
asyncio.ensure_future(my_coroutine) # scheduled in ioloop, requires python 3.4.4
with python 3.5 new syntax:
async def my_coroutine():
my_long_call()
await my_coroutine() # wait until done
asyncio.ensure_future(my_coroutine) # scheduled in ioloop
The benefits of Python
Develop fast, even with complex things
The benefits of Python
Develop fast, even with complex things
Can run on any high-end device : from a Raspberry PI to a Cloud server
The benefits of Python
Develop fast, even with complex things
Can run on any high-end device : from a Raspberry PI to a Cloud server
Off-the-shelf packages for IoT available: Aiocoap, HBMQTT
The benefits of Python
Develop fast, even with complex things
Can run on any high-end device : from a Raspberry PI to a Cloud server
Off-the-shelf packages for IoT available: Aiocoap, HBMQTT
⇒ Python is adapted to IoT
Conclusion
Widely used protocol in IoT is MQTT
Adapted protocols are required for constrained devices (microcontrollers)
⇒ CoAP, MQTT-SN
Conclusion
Widely used protocol in IoT is MQTT
Adapted protocols are required for constrained devices (microcontrollers)
⇒ CoAP, MQTT-SN
We easily built an application following the initial requirements
⇒ Pyaiot: https://github.com/pyaiot/pyaiot
Conclusion
Widely used protocol in IoT is MQTT
Adapted protocols are required for constrained devices (microcontrollers)
⇒ CoAP, MQTT-SN
We easily built an application following the initial requirements
⇒ Pyaiot: https://github.com/pyaiot/pyaiot
Asyncio made things simpler... after some headaches
Conclusion
Widely used protocol in IoT is MQTT
Adapted protocols are required for constrained devices (microcontrollers)
⇒ CoAP, MQTT-SN
We easily built an application following the initial requirements
⇒ Pyaiot: https://github.com/pyaiot/pyaiot
Asyncio made things simpler... after some headaches
Pyaiot is still work in progress... even if it works pretty well
Demo!
http://riot-demo.inria.fr
Thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
From Python to smartphones: neural nets @ Saint-Gobain, François SaussetFrom Python to smartphones: neural nets @ Saint-Gobain, François Sausset
From Python to smartphones: neural nets @ Saint-Gobain, François SaussetPôle Systematic Paris-Region
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applicationsRoman Podoliaka
 
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceOSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceNETWAYS
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microserviceGiulio De Donato
 
WebRTC と Native とそれから、それから。
WebRTC と Native とそれから、それから。 WebRTC と Native とそれから、それから。
WebRTC と Native とそれから、それから。 tnoho
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golangRamit Surana
 
Wonders of Golang
Wonders of GolangWonders of Golang
Wonders of GolangKartik Sura
 
Inroduction to golang
Inroduction to golangInroduction to golang
Inroduction to golangYoni Davidson
 
10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about goDvir Volk
 
Network Test Automation - Net Ops Coding 2015
Network Test Automation - Net Ops Coding 2015Network Test Automation - Net Ops Coding 2015
Network Test Automation - Net Ops Coding 2015Hiroshi Ota
 
Beachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JITBeachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JITKouji Matsui
 
Polyglot Applications with GraalVM
Polyglot Applications with GraalVMPolyglot Applications with GraalVM
Polyglot Applications with GraalVMjexp
 
Reactive Programming by UniRx for Asynchronous & Event Processing
Reactive Programming by UniRx for Asynchronous & Event ProcessingReactive Programming by UniRx for Asynchronous & Event Processing
Reactive Programming by UniRx for Asynchronous & Event ProcessingYoshifumi Kawai
 
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...Tom Limoncelli
 
Golang from Scala developer’s perspective
Golang from Scala developer’s perspectiveGolang from Scala developer’s perspective
Golang from Scala developer’s perspectiveSveta Bozhko
 

Was ist angesagt? (20)

Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
From Python to smartphones: neural nets @ Saint-Gobain, François SaussetFrom Python to smartphones: neural nets @ Saint-Gobain, François Sausset
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applications
 
Lua vs python
Lua vs pythonLua vs python
Lua vs python
 
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceOSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
 
Golang
GolangGolang
Golang
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microservice
 
WebRTC と Native とそれから、それから。
WebRTC と Native とそれから、それから。 WebRTC と Native とそれから、それから。
WebRTC と Native とそれから、それから。
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
Wonders of Golang
Wonders of GolangWonders of Golang
Wonders of Golang
 
Inroduction to golang
Inroduction to golangInroduction to golang
Inroduction to golang
 
10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about go
 
Network Test Automation - Net Ops Coding 2015
Network Test Automation - Net Ops Coding 2015Network Test Automation - Net Ops Coding 2015
Network Test Automation - Net Ops Coding 2015
 
Beachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JITBeachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JIT
 
Polyglot Applications with GraalVM
Polyglot Applications with GraalVMPolyglot Applications with GraalVM
Polyglot Applications with GraalVM
 
Reactive Programming by UniRx for Asynchronous & Event Processing
Reactive Programming by UniRx for Asynchronous & Event ProcessingReactive Programming by UniRx for Asynchronous & Event Processing
Reactive Programming by UniRx for Asynchronous & Event Processing
 
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
 
Golang from Scala developer’s perspective
Golang from Scala developer’s perspectiveGolang from Scala developer’s perspective
Golang from Scala developer’s perspective
 
Caffe2 on Android
Caffe2 on AndroidCaffe2 on Android
Caffe2 on Android
 

Ähnlich wie Using Python for IoT: a return of experience, Alexandre Abadie

Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTStéphanie Roger
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceSamsung Open Source Group
 
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...Next Big Thing AG
 
APIs at the Edge
APIs at the EdgeAPIs at the Edge
APIs at the EdgeRed Hat
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSCisco Russia
 
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....Marcin Bielak
 
PyQt Application Development On Maemo
PyQt Application Development On MaemoPyQt Application Development On Maemo
PyQt Application Development On Maemoachipa
 
IoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & SparkIoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & SparkRed Hat Developers
 
P4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxP4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxtampham61268
 
ORTC Library - Introduction
ORTC Library - IntroductionORTC Library - Introduction
ORTC Library - IntroductionErik Lagerway
 
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSerial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSanjay Kumar
 
An hour with WebRTC FIC UDC
An hour with WebRTC FIC UDCAn hour with WebRTC FIC UDC
An hour with WebRTC FIC UDCQuobis
 
From the internet of things to the web of things course
From the internet of things to the web of things courseFrom the internet of things to the web of things course
From the internet of things to the web of things courseDominique Guinard
 
Master-Master Replication and Scaling of an Application Between Each of the I...
Master-Master Replication and Scaling of an Application Between Each of the I...Master-Master Replication and Scaling of an Application Between Each of the I...
Master-Master Replication and Scaling of an Application Between Each of the I...vsoshnikov
 
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...Ivan Kravets
 
End-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTEnd-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTBenjamin Cabé
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Henry Schreiner
 

Ähnlich wie Using Python for IoT: a return of experience, Alexandre Abadie (20)

Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
 
Tranquilizer
TranquilizerTranquilizer
Tranquilizer
 
La web de las Cosas
La web de las CosasLa web de las Cosas
La web de las Cosas
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
 
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
 
Monkey Server
Monkey ServerMonkey Server
Monkey Server
 
APIs at the Edge
APIs at the EdgeAPIs at the Edge
APIs at the Edge
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OS
 
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
 
PyQt Application Development On Maemo
PyQt Application Development On MaemoPyQt Application Development On Maemo
PyQt Application Development On Maemo
 
IoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & SparkIoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & Spark
 
P4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxP4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptx
 
ORTC Library - Introduction
ORTC Library - IntroductionORTC Library - Introduction
ORTC Library - Introduction
 
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSerial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
 
An hour with WebRTC FIC UDC
An hour with WebRTC FIC UDCAn hour with WebRTC FIC UDC
An hour with WebRTC FIC UDC
 
From the internet of things to the web of things course
From the internet of things to the web of things courseFrom the internet of things to the web of things course
From the internet of things to the web of things course
 
Master-Master Replication and Scaling of an Application Between Each of the I...
Master-Master Replication and Scaling of an Application Between Each of the I...Master-Master Replication and Scaling of an Application Between Each of the I...
Master-Master Replication and Scaling of an Application Between Each of the I...
 
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
 
End-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTEnd-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoT
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 

Mehr von Pôle Systematic Paris-Region

OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...Pôle Systematic Paris-Region
 
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...Pôle Systematic Paris-Region
 
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...Pôle Systematic Paris-Region
 
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...Pôle Systematic Paris-Region
 
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick MoyOsis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick MoyPôle Systematic Paris-Region
 
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAOsis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAPôle Systematic Paris-Region
 
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentOsis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentPôle Systematic Paris-Region
 
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...Pôle Systematic Paris-Region
 
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riotOSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riotPôle Systematic Paris-Region
 
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...Pôle Systematic Paris-Region
 
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...Pôle Systematic Paris-Region
 
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...Pôle Systematic Paris-Region
 
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)Pôle Systematic Paris-Region
 
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelatPyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelatPôle Systematic Paris-Region
 

Mehr von Pôle Systematic Paris-Region (20)

OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
 
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
 
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
 
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
 
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
 
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
 
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
 
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick MoyOsis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
 
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?
 
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin
 
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAOsis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
 
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentOsis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
 
Osis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritageOsis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritage
 
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
 
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riotOSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
 
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
 
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
 
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
 
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
 
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelatPyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelat
 

Kürzlich hochgeladen

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Using Python for IoT: a return of experience, Alexandre Abadie

  • 1. Python for IoT A return of experience Alexandre Abadie, Inria
  • 2. Outline What IoT are we talking about ? The usual protocols for IoT Pyaiot, connecting objects to the web How we built Pyaiot Lessons learned Conclusion
  • 3. What IoT are we talking about ? The Internet of Things today
  • 5. Low-end devices ⇒ adapted protocols are required
  • 6. Outline What IoT are we talking about ? ⇒ The usual protocols for IoT Pyaiot, connecting objects to the web How we built Pyaiot Lessons learned Conclusion
  • 7. Usual protocols for IoT: CoAP Core WG at IETF specifications (2010) RFC 7252 Similar to HTTP REST: GET/PUT/POST/DELETE + OBSERVE Works on UDP with small payload overhead More information at http://coap.technology/ source: https://fr.wikipedia.org/wiki/CoAP
  • 8. CoAP: available implementations in Python 3 available implementations: TxThings: Twisted based, Python 2 & 3 https://github.com/mwasilak/txThings Aiocoap: asyncio based, Python 3 only https://github.com/chrysn/aiocoap CoaPthon: Threading based, Python 2 & 3 https://github.com/Tanganelli/CoAPthon Implementations exist for other languages: http://coap.technology/impls.html
  • 9. Usual protocols for IoT: MQTT Based on publication/subscriptions to topics pattern Topics have a path form: this/is/a/topic MQTT v3.1.1 is an OASIS standard MQTT Sensor Network (MQTT-SN): adapted for constrained devices source: https://dev.to/kenwalger/overview-of-the-mqtt-protocol
  • 10. MQTT: available implementations in Python 2 available implementations: Paho-mqtt: threading based, considered as the reference implementation https://pypi.python.org/pypi/paho-mqtt HBMQTT: asyncio based https://github.com/beerfactory/hbmqtt
  • 11. Outline What IoT are we talking about ? The usual protocols for IoT ⇒ Pyaiot, connecting objects to the web How we built Pyaiot Lessons learned Conclusion
  • 12. Why Pyaiot? Need for a web application able to communicate with contrained devices ⇒ but constrained devices cannot use usual web protocols
  • 13. Why Pyaiot? Need for a web application able to communicate with contrained devices ⇒ but constrained devices cannot use usual web protocols Need for multi-site support ⇒ but constrained devices cannot be exposed directly to the web
  • 14. Why Pyaiot? Need for a web application able to communicate with contrained devices ⇒ but constrained devices cannot use usual web protocols Need for multi-site support ⇒ but constrained devices cannot be exposed directly to the web Heterogeneous protocol support ⇒ various IoT protocols exist
  • 15. General guidelines Open-Source and simple design⇒ can be deployed by anyone https://github.com/pyaiot/pyaiot
  • 16. General guidelines Open-Source and simple design⇒ can be deployed by anyone https://github.com/pyaiot/pyaiot Multiprotocol: CoAP, MQTT, etc ⇒ interoperability
  • 17. General guidelines Open-Source and simple design⇒ can be deployed by anyone https://github.com/pyaiot/pyaiot Multiprotocol: CoAP, MQTT, etc ⇒ interoperability Modular ⇒ extensible
  • 18. General guidelines Open-Source and simple design⇒ can be deployed by anyone https://github.com/pyaiot/pyaiot Multiprotocol: CoAP, MQTT, etc ⇒ interoperability Modular ⇒ extensible Bi-directionnal and real time access to nodes ⇒ reactive
  • 19. General guidelines Open-Source and simple design⇒ can be deployed by anyone https://github.com/pyaiot/pyaiot Multiprotocol: CoAP, MQTT, etc ⇒ interoperability Modular ⇒ extensible Bi-directionnal and real time access to nodes ⇒ reactive No constraint regarding the backend language ⇒ let's choose Python!
  • 20. General guidelines Open-Source and simple design⇒ can be deployed by anyone https://github.com/pyaiot/pyaiot Multiprotocol: CoAP, MQTT, etc ⇒ interoperability Modular ⇒ extensible Bi-directionnal and real time access to nodes ⇒ reactive No constraint regarding the backend language ⇒ let's choose Python! Pyaiot targets contrained nodes running RIOT: https://riot-os.org
  • 21. Pyaiot overview Permanent web showcase for RIOT available at http://riot-demo.inria.fr
  • 22. Pyaiot: The web dashboard
  • 23. Outline What IoT are we talking about ? The usual protocols for IoT Pyaiot, connecting objects to the web ⇒ How we built Pyaiot Lessons learned Conclusion
  • 25. Pyaiot services Gateways are clients running in private networks Nodes are kept isolated from Internet Messages exchanged in JSON format Works with low-end devices (RIOT) and high-end devices (Python)
  • 26. Technical choices Web dashboard developed with Vue.js   http://vuejs.org Service applications based on Tornado framework with: HTTP server Websocket server and client Aiocoap for CoAP protocol support HBMQTT for MQTT protocol support
  • 27. Technical choices Web dashboard developed with Vue.js   http://vuejs.org Service applications based on Tornado framework with: HTTP server Websocket server and client Aiocoap for CoAP protocol support HBMQTT for MQTT protocol support ⇒ All python packages are asyncio based/compatible ⇒ simplify integration
  • 28. The MQTT gateway in detail MQTT-SN is required for low-end device ⇒ a MQTT to MQTT-SN gateway/broker is required No implementation in Python ⇒ let's go for mosquitto.rsmb
  • 29. The MQTT gateway in detail MQTT-SN is required for low-end device ⇒ a MQTT to MQTT-SN gateway/broker is required No implementation in Python ⇒ let's go for mosquitto.rsmb Node/Gateway subscribe/publish to topic publish/subscribe to topics gateway//discover node/check node//resources node//
  • 30. Outline What IoT are we talking about ? The usual protocols for IoT Pyaiot, connecting objects to the web How we built Pyaiot ⇒ Lessons learned Conclusion
  • 31. Using asyncio Easy to read asynchronous programming language
  • 32. Using asyncio Easy to read asynchronous programming language Asyncio new syntax available with Python >= 3.5
  • 33. Using asyncio Easy to read asynchronous programming language Asyncio new syntax available with Python >= 3.5 ... but Python 3.4.2 available on Raspbian @asyncio.coroutine def my_coroutine(): my_long_call() yield from my_coroutine() # wait until done asyncio.get_event_loop().create_task(my_coroutine) # scheduled in ioloop asyncio.ensure_future(my_coroutine) # scheduled in ioloop, requires python 3.4.4
  • 34. Using asyncio Easy to read asynchronous programming language Asyncio new syntax available with Python >= 3.5 ... but Python 3.4.2 available on Raspbian @asyncio.coroutine def my_coroutine(): my_long_call() yield from my_coroutine() # wait until done asyncio.get_event_loop().create_task(my_coroutine) # scheduled in ioloop asyncio.ensure_future(my_coroutine) # scheduled in ioloop, requires python 3.4.4 with python 3.5 new syntax: async def my_coroutine(): my_long_call() await my_coroutine() # wait until done asyncio.ensure_future(my_coroutine) # scheduled in ioloop
  • 35. The benefits of Python Develop fast, even with complex things
  • 36. The benefits of Python Develop fast, even with complex things Can run on any high-end device : from a Raspberry PI to a Cloud server
  • 37. The benefits of Python Develop fast, even with complex things Can run on any high-end device : from a Raspberry PI to a Cloud server Off-the-shelf packages for IoT available: Aiocoap, HBMQTT
  • 38. The benefits of Python Develop fast, even with complex things Can run on any high-end device : from a Raspberry PI to a Cloud server Off-the-shelf packages for IoT available: Aiocoap, HBMQTT ⇒ Python is adapted to IoT
  • 39. Conclusion Widely used protocol in IoT is MQTT Adapted protocols are required for constrained devices (microcontrollers) ⇒ CoAP, MQTT-SN
  • 40. Conclusion Widely used protocol in IoT is MQTT Adapted protocols are required for constrained devices (microcontrollers) ⇒ CoAP, MQTT-SN We easily built an application following the initial requirements ⇒ Pyaiot: https://github.com/pyaiot/pyaiot
  • 41. Conclusion Widely used protocol in IoT is MQTT Adapted protocols are required for constrained devices (microcontrollers) ⇒ CoAP, MQTT-SN We easily built an application following the initial requirements ⇒ Pyaiot: https://github.com/pyaiot/pyaiot Asyncio made things simpler... after some headaches
  • 42. Conclusion Widely used protocol in IoT is MQTT Adapted protocols are required for constrained devices (microcontrollers) ⇒ CoAP, MQTT-SN We easily built an application following the initial requirements ⇒ Pyaiot: https://github.com/pyaiot/pyaiot Asyncio made things simpler... after some headaches Pyaiot is still work in progress... even if it works pretty well