SlideShare a Scribd company logo
1 of 50
Download to read offline
Public
Intelligent IoT Gateway
on OpenWrt
Andrzej Wieczorek Bartosz Markowski
Public
Introduction
IoT
gateways
standards
IoT home alone
concept
© Tieto Corporation
Public
IoT is big! Infinite!
„Bigger than the biggest thing ever and then some.
Much bigger than that in fact, really amazingly immense, a
totally stunning size, "wow, that's big", time. Infinity is just so
big that by comparison, bigness itself looks really titchy.”
[Douglas Adams, The Restaurant at the End of the Universe]
3
replacement of standard IoT intro 
© Tieto Corporation
Public
4
Edge
”things”
Aggregation
gateways
Network Access /
Backhaul / Core
Network
Cloud / Backend
/ IT
IoT structure
© Tieto Corporation
Public
Gateways role evolves (home)
5
From single application to ecosystem enabler
© Tieto Corporation
Public
Ecosystem applications
6
„Hot today!”
Purpose build apps
[Vertical]
Ecosystem enabled apps
[Horizontal]
© Tieto Corporation
Public
IoT Alliances and Consortia
8
© Tieto Corporation
Public
9
© Tieto Corporation
Public
Application Layer
Profiles
Physical/ Link Layer
(PHY/ MAC)
Network Layer
Transport Layer
10
Bluetooth Link
Layer
IEEE 802.11ac
(vht rate)
IEEE 802.15.4g IEEE 802.15.4 (low power)
Bluetooth Host
Stack
(optionally
6LoWPAN)
TCP / UDP
IPv4 / IPv6
6LoWPAN
ZigBee
AllSeen OIC IoTivity
LW
M2M
Home
Kit
Weave …
Connectivity complexity
Smart home applications
© Tieto Corporation
Public
11
Door [un]locked
by a bug
Expensive
Information
hacked
Smart Home – concerns
© Tieto Corporation
Public
Smart Home – key drivers
12
Source:
http://www.icontrol.com/blog/2015-state-of-the-smart-home-report/
Personal and
family security
Cost
savings
Programming
(yes!)
© Tieto Corporation
Public
„One to rule them all”
13
Interoperability
FreedomSelf learning
Scalability
Intelligent IoT Gateway on
© Tieto Corporation
Public
Intelligent IoT Gateway concept
14
…
Container
Orchestration
Containers
VirtualizationMultiradio Linux/ mbed Gateway
+ +
Intelligence
Ecosystem enabler for horizontal applications
Public
Implementation
platform
radio(s)
layers
security
apps
demo
© Tieto Corporation
Public
• Platform: mid-range router / ~$100 / + we have it at home
• HW: TP-LINK Archer C5 v1.20
• CPU: Qualcomm Atheros QCA9558 (720 MHz) / mips arch
• RAM: 128 MiB / 16MiB Flash
• Networking: Wi-Fi (dual-band / 2.4GHz 11n + 5GHz 11ac) + eth switch
• USB ports
• OpenWrt ready:
• Target System (Atheros AR7xxx/AR9xxx)
• Target Profile (TP-LINK Archer C5/C7)
• Chaos Calmer, trunk r46693
16
Platform
Specification
© Tieto Corporation
Public
1. Prepare development environment
• git clone trunk OpenWrt sources (git clone git://git.openwrt.org/openwrt.git)
• from menuconfig pick target system/profile + utilities at your own preference
Target System (Atheros AR7xxx/AR9xxx)
Target Profile (TP-LINK Archer C5/C7)
2. Reflash the router from the TP-LINK web UI
• for later easy-use it’s good to enable luci feeds in OpenWrt
luci-mod-admin-full. LuCI Administration - full-featured for full control
17
Platform
Deploying OpenWrt
© Tieto Corporation
Public
ApplicationLayer
Profiles
Physical/ Link Layer
(PHY/ MAC)
Network Layer
Transport Layer
18
Bluetooth Link
Layer
IEEE 802.15.4g IEEE 802.15.4 (low power)
Bluetooth Host
Stack
(optionally
6LoWPAN)
TCP / UDP
IPv4 / IPv6
6LoWPAN
ZigBee
AllSeen OIC IoTivity
LW
M2M
Home
Kit
Weave …
Adding PHY/MAC
IEEE 802.11ac
(vht rate)
© Tieto Corporation
Public
19
• „Wave 2” devices
• Spatial Division Multiplexing
(SDM)
• Advanced form of
beamforming
• Simultaneous AP-to-multiple-
clients transmission
Boosting WiFi
MU-MIMO
© Tieto Corporation
Public
20
• Benefits
• Spectrum efficiency
• improved combined DL throughput
• Lower latencies
• Limitations?
• Clients also have to support MU-MIMO (beamformees)
• Downstream only – From AP to clients (sophisticated
antenna systems and signal processing)
• Limited number of clients can be supported (NSS-1)
Boosting WiFi
MU-MIMO
© Tieto Corporation
Public
22
CUS223 -> CUS239 (Compex WLE1200V5-22)
PCIe
© Tieto Corporation
Public
23
• PHY: Replace wifi NICs hardware
• CUS223 (3x3 11ac) ---> WLE1200V5-22 CUS239 (4x4 11ac + mu-MIMO)
• SW: Upgrade ath10k driver (QCA99X0 support in 4.3-rc1)
• FW: ath10k 10.4.1.00007-1
Boosting WiFi
MU-MIMO – upgrading router
© Tieto Corporation
Public
• Create your own backports package from e.g. ath.git / linux-next or …*
• It’s just important to make sure the QCA99X0 support is there
• Cross-compile the backports to get the wireless LKMs
toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.10/initial/bin/mips-openwrt-
linux-musl-
• Upload (replace) the backports *.ko modules and firmware to FS,
depmod etc.
• Problems?
• Firmware for QCA99X0 crashes during bootup on BE mach with ath10k… (under
investigation)
• Processing power of the QCA9558 platform (do not expect maximum performance)
24
Boosting WiFi
MU-MIMO – how to
© Tieto Corporation
Public
Adding BLE
• One of the most popular local connectivity protocols
• Many small cheap multi-purpose devices
• Low and ultra-low energy
• Easy for building various use cases
• 6LowPAN supported
• IPv6 networking over BLE link
• BT SIG: ISPS 1.0
• Since kernel 3.17 (OpenWrt trunk for ar71xx has 4.1 now)
25
© Tieto Corporation
Public
27
CUS223 -> CUS239 (Compex WLE1200V5-22) LogiLink Bluetooth4.0 (BT0015)
PCIe USB
© Tieto Corporation
Public
• HW: Extend AP by plugging in BLE USB dongle
• SW:
• Fetch and install: bluez-utils, bluez-libs, ip feeds
• Enable kernel modules: kmod-bluetooth, kmod-bluetooth_6lowpan
• Compile new openwrt-ar71xx-generic-archer-c5-
squashfs-*.bin and flash the router
28
Adding BLE support
How to do it
© Tieto Corporation
Public
• Consider btmgmt ctrl tool (new tool)
• Check for bt0 interface now
• Play around with networking interface and firewall settings
for packet forwarding
29
root@OpenWrt:# modprobe bluetooth_6lowpan
root@OpenWrt:# echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
root@OpenWrt:# hciconfig hci0 reset
root@OpenWrt:# hcitool lescan
root@OpenWrt:# echo "connect 00:1B:DC:07:32:7E 1" > /sys/kernel/debug/bluetooth/6lowpan_control}
Adding BLE support
How to enable it
© Tieto Corporation
Public
• use dynamic_debugs for bt kernel messages
• enable it from menuconfig:
• Global build settings ---> [*] Compile the kernel with dynamic printk
• check readlog –f
• check if you have all required crypto modules
30
Adding BLE support
Debugging
© Tieto Corporation
Public
Extending with Thread
• New standard designed for Smart Home/ IoT, all-in-one
• mesh
• IPv6
• low energy
• security
• First devices coming soon (beginning 2016)
• Same radio as in ZigBee
• Thread Group with big names: Nest, Samsung, Freescale,
Qualcomm, …
31
© Tieto Corporation
Public
33
CUS223 -> CUS239 (Compex WLE1200V5-22) LogiLink Bluetooth4.0 (BT0015) Freescale Freedom-K64F+
Atmel 802.15.4radio (at86rf233)
PCIe USB Eth
© Tieto Corporation
Public
Extending with Thread
How to do it
• Add Thread Border Router
(mbed OS) over Ethernet
• Static IPv6 addressing to
communicate with OpenWrt br-lan
interface
• Alternative way: implement
Thread stack and Border Router
in Linux/ OpenWrt + connect
802.15.4 radio
34
© Tieto Corporation
Public
35
About Thread
• Based on 802.15.4 radio, IPv6 and low power
networking (6loWPAN) standard (existing IEEE
and RFC documents)
• Designed mainly for Connected Home apps with
high impact on security aspects.
• Mesh topology with No Single Point of Failure to
guarantee reliability
• Device types: Boarder Router, Router, REED
(router-eligible end device), End Device
© Tieto Corporation
Public
ApplicationLayer
Profiles
Physical/ Link Layer
(PHY/ MAC)
Network Layer
Transport Layer
36
Bluetooth Link
Layer
IEEE 802.15.4g IEEE 802.15.4 (low power)
Bluetooth Host
Stack
(optionally
6LoWPAN)
TCP / UDP
IPv4 / IPv6
6LoWPAN
ZigBee
AllSeen OIC IoTivity
LW
M2M
Home
Kit
Weave …
Unifying transport
IEEE 802.11ac
(vht rate)
© Tieto Corporation
Public
IPv6 to unify
37
© Tieto Corporation
Public
• Fragmentation and reassembiling
• 1280 bytes IPv6 packets fragmented to fit into 127 bytes 802.15.4
frames
• Header compression mechanism
• IPv6 header is 40bytes long! – reducing transmission overhead
• Link layer packet forwarding
• Thread is using IP layer routing with link layer packet forwarding
38
6LoWPAN - focus on low energy
© Tieto Corporation
Public
40
Archer C7 (OpenWrt Linux)
+ Mbed 6LoWPAN (thread gateway router)
+ BLE
Gateway
IEEE 802.15.4/6LoWPAN
(Thread)
Frdm-k64f board + atmel 802.15.4 radio
Client Endpoint
IEEE 802.11n/ac
Device Server /
Connected Home App.
ETH
ETH
BLE/6LoWPAN
IPv6 networking
fd00:ff1:ce0b:a5e0::1/64
fd00:ff1:ce0b:a5e0:fec2:3dff:fe04:c11f
fd00:0ff1:ce0b:a5e0:fcc2:3d00:4:a5ee
© Tieto Corporation
Public
ApplicationLayer
Profiles
Physical/ Link Layer
(PHY/ MAC)
Network Layer
Transport Layer
41
Bluetooth Link
Layer
IEEE 802.15.4g IEEE 802.15.4 (low power)
Bluetooth Host
Stack
(optionally
6LoWPAN)
TCP / UDP
IPv4 / IPv6
6LoWPAN
ZigBee
AllSeen OIC IoTivity
LW
M2M
Home
Kit
Weave …
Selecting application layer
IEEE 802.11ac
(vht rate)
© Tieto Corporation
Public
App transfer protocols
42
CoAP
CoRE
IoT Web/Internet
…
© Tieto Corporation
Public
What is CoAP?
43
“The Constrained Application Protocol (CoAP) is a specialized web transfer
protocol for use with constrained nodes and constrained networks in the
Internet of Things.
The protocol is designed for
machine-to-machine (M2M) applications
such as smart energy and building
automation.” (res. http://coap.technology/)
• Open standard
• REST model (resource access)
• GET, PUT, POST, DELETE, …methods to
© Tieto Corporation
Public
CoAP over Thread – demo
44
Thread Node
CoAP_service_app
Thread Border RouterRouter – „Device Server”
libcoap-client
libcoap-server
POST
CoAP ACK
LED
GET
RESP (counter)
BUTTON Counter
IEEE 802.15.4/6LoWPAN
(Thread)
IEEE 802.11
console
coap-client -m post coap://[fd00:0ff1:ce0b:a5e0:fcc2:3d00:4:a5ee]/resources/led
cnt=$(/root/coap-client coap://[fd00:0ff1:ce0b:a5e0:fcc2:3d00:4:a5ee]/resources/button)
© Tieto Corporation
Public
Applications and containers
Examples
45
Smart Home (routing,
notifications, rules)
Spook Home
(smart home + AI)
Docker
Hello world Hello world
© Tieto Corporation
Public
AI in applications
• Mining and analysis for aggregated data
• Learning trends = habits
• Levels of notifications based on probability
• Fuzzy logic
• Cost saving (water, electricity)
• Security improvement
• Feedback based learning
• Example below
46
© Tieto Corporation
Public
47
Containers
OPKG
Native apps
packages
LXC
(available via feeds)
…
© Tieto Corporation
Public
Security
50
Application
Fine grained security
Data aggregation and privacy protection (for cloud)
Information integrity check by AI (data correlation, trends analysis etc)
System
Security holes like Heartblead, ShellShock or backdoors in devices
Keep your system up to date - security on the level of last patch
Open source
Protocol
Security services for link layer (auth, data integrity, confidentiality, reply protection)
IP networking based security mechanisms (access control, firewalls, …)
Keep to standards, e.g. DTLS (RFC6347 v1.2)
© Tieto Corporation
Public
Demo - „Spook House”
example smart application for lighting
• Light control system
• Learning light usage trends
• Notifications based on deviations and likeliness
• Focused on cost saving (i.e. recommendations) and security
(notifications when out of trend)
51
© Tieto Corporation
Public
• running on IOT Gateway and receives data from the IoT network
sensors
• monitor usage of home lights and detect unusual events. For instance
if someone forgets to turn off the light.
• Application gathers statistical information about how often and how
long light are turned on.
• Since users activity changes during the week (for instance on
weekends) the algorithm takes into account not only time of day but
also day of week.
• Application will notice if lights in some room are turned on for
unusually long time.
52
Demo - „Spook House”
Description
© Tieto Corporation
Public
• StateTracker
• Receives data in form of events about state change
{"Device": "light3", "EventType": "SHStateChange", "State": "On", "Timestamp": 122848.71204376257}
{"Device": "light3", "EventType": "SHStateChange", "State": "Off", "Timestamp": 123907.1497501683}
• Communiate with TrendMonitor and external modules
• TrendMonitor (learning)
• Keeps a data base with statistics
• Implements algorithm to calculate and detect unusual situations (deviations) and notify
ActionManager about such.
• ActionManager (learning)
• Receives ‚SHActionRequests’ about deviations and makes decission on what to do with it (e.g.
notify user)
• Options: User feedback loop
• Clock or internal interrupt to throw ‚SHtimer’ event – check the House state.
53
Demo - „Spook House”
Internals
Public
Wrap-up
© Tieto Corporation
Public
58
Public
Q&A
Public
IntelligentIoTGatewayon OpenWrt
Andrzej Wieczorek Bartosz Markowski
Thank you!

More Related Content

What's hot

UVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdfUVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdf
SamHoney6
 
Lte radio network planning huawei
Lte radio network planning huaweiLte radio network planning huawei
Lte radio network planning huawei
tharinduwije
 
Ericsson BTS commisioning
Ericsson BTS commisioningEricsson BTS commisioning
Ericsson BTS commisioning
Shahid Rasool
 

What's hot (20)

5G NR parameters
5G NR parameters5G NR parameters
5G NR parameters
 
Broadband
BroadbandBroadband
Broadband
 
Drive Test Explain
Drive Test ExplainDrive Test Explain
Drive Test Explain
 
Benefits of vlan
Benefits of vlanBenefits of vlan
Benefits of vlan
 
Rede Definida Por Software - SDN
Rede Definida Por Software - SDNRede Definida Por Software - SDN
Rede Definida Por Software - SDN
 
Huawei DBS 3900 Hardware Structure
Huawei DBS 3900 Hardware StructureHuawei DBS 3900 Hardware Structure
Huawei DBS 3900 Hardware Structure
 
UVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdfUVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdf
 
5G
5G5G
5G
 
Lte radio network planning huawei
Lte radio network planning huaweiLte radio network planning huawei
Lte radio network planning huawei
 
Lte Presentation.Ppt
Lte Presentation.PptLte Presentation.Ppt
Lte Presentation.Ppt
 
EMEA Airheads- Instant AP- Instant AP Best Practice Configuration
EMEA Airheads- Instant AP- Instant AP Best Practice ConfigurationEMEA Airheads- Instant AP- Instant AP Best Practice Configuration
EMEA Airheads- Instant AP- Instant AP Best Practice Configuration
 
Ericsson BTS commisioning
Ericsson BTS commisioningEricsson BTS commisioning
Ericsson BTS commisioning
 
RF Matching Guidelines for WIFI
RF Matching Guidelines for WIFIRF Matching Guidelines for WIFI
RF Matching Guidelines for WIFI
 
Irat handover basics
Irat handover basicsIrat handover basics
Irat handover basics
 
5G: a revolution or an evolution for IoT by Merouane DEBBAH, Huawei
5G: a revolution or an evolution for IoT by Merouane DEBBAH, Huawei5G: a revolution or an evolution for IoT by Merouane DEBBAH, Huawei
5G: a revolution or an evolution for IoT by Merouane DEBBAH, Huawei
 
5G Network Architecture and Design
5G Network Architecture and Design5G Network Architecture and Design
5G Network Architecture and Design
 
Tutorial on SDN data plane evolution
Tutorial on SDN data plane evolutionTutorial on SDN data plane evolution
Tutorial on SDN data plane evolution
 
Introduction to OpenFlow
Introduction to OpenFlowIntroduction to OpenFlow
Introduction to OpenFlow
 
Control Potencia
Control PotenciaControl Potencia
Control Potencia
 
RF Antenna Planning
RF Antenna PlanningRF Antenna Planning
RF Antenna Planning
 

Viewers also liked

An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...
An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...
An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...
Alex Kritikos
 

Viewers also liked (17)

OSGi -Simplifying the IoT Gateway - Walt Bowers
OSGi -Simplifying the IoT Gateway - Walt BowersOSGi -Simplifying the IoT Gateway - Walt Bowers
OSGi -Simplifying the IoT Gateway - Walt Bowers
 
IoT based Industrial Gateway (IoT-SDK) built around Sitara™ AM437x processors...
IoT based Industrial Gateway (IoT-SDK) built around Sitara™ AM437x processors...IoT based Industrial Gateway (IoT-SDK) built around Sitara™ AM437x processors...
IoT based Industrial Gateway (IoT-SDK) built around Sitara™ AM437x processors...
 
Володимир Шиманський “Роль спільноти і OpenSource в IoT бізнесі” {R0boCamp}
Володимир Шиманський “Роль спільноти і OpenSource в IoT бізнесі” {R0boCamp} Володимир Шиманський “Роль спільноти і OpenSource в IoT бізнесі” {R0boCamp}
Володимир Шиманський “Роль спільноти і OpenSource в IoT бізнесі” {R0boCamp}
 
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
Blockchain Software for Hardware: The Canaan AvalonMiner Open Source Embedded...
 
3 Software Stacks for IoT Solutions
3 Software Stacks for IoT Solutions3 Software Stacks for IoT Solutions
3 Software Stacks for IoT Solutions
 
Blueprint for creating a Secure IoT Product
Blueprint for creating a Secure IoT ProductBlueprint for creating a Secure IoT Product
Blueprint for creating a Secure IoT Product
 
An Open Source Project for the IoT
An Open Source Project for the IoTAn Open Source Project for the IoT
An Open Source Project for the IoT
 
OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015
 
Developing Robust IoT Gateway Applications from Building Blocks
Developing Robust IoT Gateway Applications from Building BlocksDeveloping Robust IoT Gateway Applications from Building Blocks
Developing Robust IoT Gateway Applications from Building Blocks
 
An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...
An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...
An IOT gateway Architecture using an MQTT bundle transport & LTP Convergence ...
 
IoTlondon - mbed based IoT Gateway talk
IoTlondon - mbed based IoT Gateway talkIoTlondon - mbed based IoT Gateway talk
IoTlondon - mbed based IoT Gateway talk
 
Євген Філяк “Як підняти продажі продукту за домомогою Win/Loss аналізу в 3 ра...
Євген Філяк “Як підняти продажі продукту за домомогою Win/Loss аналізу в 3 ра...Євген Філяк “Як підняти продажі продукту за домомогою Win/Loss аналізу в 3 ра...
Євген Філяк “Як підняти продажі продукту за домомогою Win/Loss аналізу в 3 ра...
 
An Introduction to Eclipse Kura - Eclipse Day Florence 2014
An Introduction to Eclipse Kura - Eclipse Day Florence 2014An Introduction to Eclipse Kura - Eclipse Day Florence 2014
An Introduction to Eclipse Kura - Eclipse Day Florence 2014
 
Raspberry Pi as IoT gateway
Raspberry Pi  as IoT gatewayRaspberry Pi  as IoT gateway
Raspberry Pi as IoT gateway
 
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
 
Internet of Things - Advantech IoT Gateway Starter Kit
Internet of Things - Advantech IoT Gateway Starter KitInternet of Things - Advantech IoT Gateway Starter Kit
Internet of Things - Advantech IoT Gateway Starter Kit
 
Kura M2M IoT Gateway
Kura M2M IoT GatewayKura M2M IoT Gateway
Kura M2M IoT Gateway
 

Similar to Intelligent IoT gateway on openwrt

ch5-Fog Networks and Cloud Computing
ch5-Fog Networks and Cloud Computingch5-Fog Networks and Cloud Computing
ch5-Fog Networks and Cloud Computing
ssuser06ea42
 
Connecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptx
Connecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptxConnecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptx
Connecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptx
ssuser52b751
 
Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
Sasa Klopanovic
 
Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
Sasa Klopanovic
 

Similar to Intelligent IoT gateway on openwrt (20)

Intelligent IoT Gateway on OpenWrt
Intelligent IoT Gateway on OpenWrtIntelligent IoT Gateway on OpenWrt
Intelligent IoT Gateway on OpenWrt
 
ch5-Fog Networks and Cloud Computing
ch5-Fog Networks and Cloud Computingch5-Fog Networks and Cloud Computing
ch5-Fog Networks and Cloud Computing
 
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
 
Virtualization of motes, gateways and networks new.pptx
Virtualization of motes, gateways and networks new.pptxVirtualization of motes, gateways and networks new.pptx
Virtualization of motes, gateways and networks new.pptx
 
Mellanox Approach to NFV & SDN
Mellanox Approach to NFV & SDNMellanox Approach to NFV & SDN
Mellanox Approach to NFV & SDN
 
Brocade Ethernet Fabrics and the ODDC
Brocade Ethernet Fabrics and the ODDCBrocade Ethernet Fabrics and the ODDC
Brocade Ethernet Fabrics and the ODDC
 
Open Ethernet: an open-source approach to modern network design
Open Ethernet: an open-source approach to modern network designOpen Ethernet: an open-source approach to modern network design
Open Ethernet: an open-source approach to modern network design
 
Presentation cloud computing and the internet
Presentation   cloud computing and the internetPresentation   cloud computing and the internet
Presentation cloud computing and the internet
 
Connecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptx
Connecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptxConnecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptx
Connecting_Things_2.01_Instructor Supplemental Materials_Chapter4.pptx
 
Connectivity for the data centric era
Connectivity for the data centric eraConnectivity for the data centric era
Connectivity for the data centric era
 
Scalable Service-Oriented Middleware over IP
Scalable Service-Oriented Middleware over IPScalable Service-Oriented Middleware over IP
Scalable Service-Oriented Middleware over IP
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 
Getting ready for wi-fi 6 and IOT
Getting ready for wi-fi 6 and IOTGetting ready for wi-fi 6 and IOT
Getting ready for wi-fi 6 and IOT
 
מונחים טכנולוגים למנהלי הדרכה באמדוקס
מונחים טכנולוגים למנהלי הדרכה באמדוקסמונחים טכנולוגים למנהלי הדרכה באמדוקס
מונחים טכנולוגים למנהלי הדרכה באמדוקס
 
Introduction to Fog
Introduction to FogIntroduction to Fog
Introduction to Fog
 
Cisco Multi-Service FAN Solution
Cisco Multi-Service FAN SolutionCisco Multi-Service FAN Solution
Cisco Multi-Service FAN Solution
 
Ceph Day Amsterdam 2015 - Deploying flash storage for Ceph without compromisi...
Ceph Day Amsterdam 2015 - Deploying flash storage for Ceph without compromisi...Ceph Day Amsterdam 2015 - Deploying flash storage for Ceph without compromisi...
Ceph Day Amsterdam 2015 - Deploying flash storage for Ceph without compromisi...
 
Track 3 session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iot
Track 3   session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iotTrack 3   session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iot
Track 3 session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iot
 
Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
 
Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Intelligent IoT gateway on openwrt

  • 1. Public Intelligent IoT Gateway on OpenWrt Andrzej Wieczorek Bartosz Markowski
  • 3. © Tieto Corporation Public IoT is big! Infinite! „Bigger than the biggest thing ever and then some. Much bigger than that in fact, really amazingly immense, a totally stunning size, "wow, that's big", time. Infinity is just so big that by comparison, bigness itself looks really titchy.” [Douglas Adams, The Restaurant at the End of the Universe] 3 replacement of standard IoT intro 
  • 4. © Tieto Corporation Public 4 Edge ”things” Aggregation gateways Network Access / Backhaul / Core Network Cloud / Backend / IT IoT structure
  • 5. © Tieto Corporation Public Gateways role evolves (home) 5 From single application to ecosystem enabler
  • 6. © Tieto Corporation Public Ecosystem applications 6 „Hot today!” Purpose build apps [Vertical] Ecosystem enabled apps [Horizontal]
  • 7. © Tieto Corporation Public IoT Alliances and Consortia 8
  • 9. © Tieto Corporation Public Application Layer Profiles Physical/ Link Layer (PHY/ MAC) Network Layer Transport Layer 10 Bluetooth Link Layer IEEE 802.11ac (vht rate) IEEE 802.15.4g IEEE 802.15.4 (low power) Bluetooth Host Stack (optionally 6LoWPAN) TCP / UDP IPv4 / IPv6 6LoWPAN ZigBee AllSeen OIC IoTivity LW M2M Home Kit Weave … Connectivity complexity Smart home applications
  • 10. © Tieto Corporation Public 11 Door [un]locked by a bug Expensive Information hacked Smart Home – concerns
  • 11. © Tieto Corporation Public Smart Home – key drivers 12 Source: http://www.icontrol.com/blog/2015-state-of-the-smart-home-report/ Personal and family security Cost savings Programming (yes!)
  • 12. © Tieto Corporation Public „One to rule them all” 13 Interoperability FreedomSelf learning Scalability Intelligent IoT Gateway on
  • 13. © Tieto Corporation Public Intelligent IoT Gateway concept 14 … Container Orchestration Containers VirtualizationMultiradio Linux/ mbed Gateway + + Intelligence Ecosystem enabler for horizontal applications
  • 15. © Tieto Corporation Public • Platform: mid-range router / ~$100 / + we have it at home • HW: TP-LINK Archer C5 v1.20 • CPU: Qualcomm Atheros QCA9558 (720 MHz) / mips arch • RAM: 128 MiB / 16MiB Flash • Networking: Wi-Fi (dual-band / 2.4GHz 11n + 5GHz 11ac) + eth switch • USB ports • OpenWrt ready: • Target System (Atheros AR7xxx/AR9xxx) • Target Profile (TP-LINK Archer C5/C7) • Chaos Calmer, trunk r46693 16 Platform Specification
  • 16. © Tieto Corporation Public 1. Prepare development environment • git clone trunk OpenWrt sources (git clone git://git.openwrt.org/openwrt.git) • from menuconfig pick target system/profile + utilities at your own preference Target System (Atheros AR7xxx/AR9xxx) Target Profile (TP-LINK Archer C5/C7) 2. Reflash the router from the TP-LINK web UI • for later easy-use it’s good to enable luci feeds in OpenWrt luci-mod-admin-full. LuCI Administration - full-featured for full control 17 Platform Deploying OpenWrt
  • 17. © Tieto Corporation Public ApplicationLayer Profiles Physical/ Link Layer (PHY/ MAC) Network Layer Transport Layer 18 Bluetooth Link Layer IEEE 802.15.4g IEEE 802.15.4 (low power) Bluetooth Host Stack (optionally 6LoWPAN) TCP / UDP IPv4 / IPv6 6LoWPAN ZigBee AllSeen OIC IoTivity LW M2M Home Kit Weave … Adding PHY/MAC IEEE 802.11ac (vht rate)
  • 18. © Tieto Corporation Public 19 • „Wave 2” devices • Spatial Division Multiplexing (SDM) • Advanced form of beamforming • Simultaneous AP-to-multiple- clients transmission Boosting WiFi MU-MIMO
  • 19. © Tieto Corporation Public 20 • Benefits • Spectrum efficiency • improved combined DL throughput • Lower latencies • Limitations? • Clients also have to support MU-MIMO (beamformees) • Downstream only – From AP to clients (sophisticated antenna systems and signal processing) • Limited number of clients can be supported (NSS-1) Boosting WiFi MU-MIMO
  • 20. © Tieto Corporation Public 22 CUS223 -> CUS239 (Compex WLE1200V5-22) PCIe
  • 21. © Tieto Corporation Public 23 • PHY: Replace wifi NICs hardware • CUS223 (3x3 11ac) ---> WLE1200V5-22 CUS239 (4x4 11ac + mu-MIMO) • SW: Upgrade ath10k driver (QCA99X0 support in 4.3-rc1) • FW: ath10k 10.4.1.00007-1 Boosting WiFi MU-MIMO – upgrading router
  • 22. © Tieto Corporation Public • Create your own backports package from e.g. ath.git / linux-next or …* • It’s just important to make sure the QCA99X0 support is there • Cross-compile the backports to get the wireless LKMs toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.10/initial/bin/mips-openwrt- linux-musl- • Upload (replace) the backports *.ko modules and firmware to FS, depmod etc. • Problems? • Firmware for QCA99X0 crashes during bootup on BE mach with ath10k… (under investigation) • Processing power of the QCA9558 platform (do not expect maximum performance) 24 Boosting WiFi MU-MIMO – how to
  • 23. © Tieto Corporation Public Adding BLE • One of the most popular local connectivity protocols • Many small cheap multi-purpose devices • Low and ultra-low energy • Easy for building various use cases • 6LowPAN supported • IPv6 networking over BLE link • BT SIG: ISPS 1.0 • Since kernel 3.17 (OpenWrt trunk for ar71xx has 4.1 now) 25
  • 24. © Tieto Corporation Public 27 CUS223 -> CUS239 (Compex WLE1200V5-22) LogiLink Bluetooth4.0 (BT0015) PCIe USB
  • 25. © Tieto Corporation Public • HW: Extend AP by plugging in BLE USB dongle • SW: • Fetch and install: bluez-utils, bluez-libs, ip feeds • Enable kernel modules: kmod-bluetooth, kmod-bluetooth_6lowpan • Compile new openwrt-ar71xx-generic-archer-c5- squashfs-*.bin and flash the router 28 Adding BLE support How to do it
  • 26. © Tieto Corporation Public • Consider btmgmt ctrl tool (new tool) • Check for bt0 interface now • Play around with networking interface and firewall settings for packet forwarding 29 root@OpenWrt:# modprobe bluetooth_6lowpan root@OpenWrt:# echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable root@OpenWrt:# hciconfig hci0 reset root@OpenWrt:# hcitool lescan root@OpenWrt:# echo "connect 00:1B:DC:07:32:7E 1" > /sys/kernel/debug/bluetooth/6lowpan_control} Adding BLE support How to enable it
  • 27. © Tieto Corporation Public • use dynamic_debugs for bt kernel messages • enable it from menuconfig: • Global build settings ---> [*] Compile the kernel with dynamic printk • check readlog –f • check if you have all required crypto modules 30 Adding BLE support Debugging
  • 28. © Tieto Corporation Public Extending with Thread • New standard designed for Smart Home/ IoT, all-in-one • mesh • IPv6 • low energy • security • First devices coming soon (beginning 2016) • Same radio as in ZigBee • Thread Group with big names: Nest, Samsung, Freescale, Qualcomm, … 31
  • 29. © Tieto Corporation Public 33 CUS223 -> CUS239 (Compex WLE1200V5-22) LogiLink Bluetooth4.0 (BT0015) Freescale Freedom-K64F+ Atmel 802.15.4radio (at86rf233) PCIe USB Eth
  • 30. © Tieto Corporation Public Extending with Thread How to do it • Add Thread Border Router (mbed OS) over Ethernet • Static IPv6 addressing to communicate with OpenWrt br-lan interface • Alternative way: implement Thread stack and Border Router in Linux/ OpenWrt + connect 802.15.4 radio 34
  • 31. © Tieto Corporation Public 35 About Thread • Based on 802.15.4 radio, IPv6 and low power networking (6loWPAN) standard (existing IEEE and RFC documents) • Designed mainly for Connected Home apps with high impact on security aspects. • Mesh topology with No Single Point of Failure to guarantee reliability • Device types: Boarder Router, Router, REED (router-eligible end device), End Device
  • 32. © Tieto Corporation Public ApplicationLayer Profiles Physical/ Link Layer (PHY/ MAC) Network Layer Transport Layer 36 Bluetooth Link Layer IEEE 802.15.4g IEEE 802.15.4 (low power) Bluetooth Host Stack (optionally 6LoWPAN) TCP / UDP IPv4 / IPv6 6LoWPAN ZigBee AllSeen OIC IoTivity LW M2M Home Kit Weave … Unifying transport IEEE 802.11ac (vht rate)
  • 34. © Tieto Corporation Public • Fragmentation and reassembiling • 1280 bytes IPv6 packets fragmented to fit into 127 bytes 802.15.4 frames • Header compression mechanism • IPv6 header is 40bytes long! – reducing transmission overhead • Link layer packet forwarding • Thread is using IP layer routing with link layer packet forwarding 38 6LoWPAN - focus on low energy
  • 35. © Tieto Corporation Public 40 Archer C7 (OpenWrt Linux) + Mbed 6LoWPAN (thread gateway router) + BLE Gateway IEEE 802.15.4/6LoWPAN (Thread) Frdm-k64f board + atmel 802.15.4 radio Client Endpoint IEEE 802.11n/ac Device Server / Connected Home App. ETH ETH BLE/6LoWPAN IPv6 networking fd00:ff1:ce0b:a5e0::1/64 fd00:ff1:ce0b:a5e0:fec2:3dff:fe04:c11f fd00:0ff1:ce0b:a5e0:fcc2:3d00:4:a5ee
  • 36. © Tieto Corporation Public ApplicationLayer Profiles Physical/ Link Layer (PHY/ MAC) Network Layer Transport Layer 41 Bluetooth Link Layer IEEE 802.15.4g IEEE 802.15.4 (low power) Bluetooth Host Stack (optionally 6LoWPAN) TCP / UDP IPv4 / IPv6 6LoWPAN ZigBee AllSeen OIC IoTivity LW M2M Home Kit Weave … Selecting application layer IEEE 802.11ac (vht rate)
  • 37. © Tieto Corporation Public App transfer protocols 42 CoAP CoRE IoT Web/Internet …
  • 38. © Tieto Corporation Public What is CoAP? 43 “The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things. The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.” (res. http://coap.technology/) • Open standard • REST model (resource access) • GET, PUT, POST, DELETE, …methods to
  • 39. © Tieto Corporation Public CoAP over Thread – demo 44 Thread Node CoAP_service_app Thread Border RouterRouter – „Device Server” libcoap-client libcoap-server POST CoAP ACK LED GET RESP (counter) BUTTON Counter IEEE 802.15.4/6LoWPAN (Thread) IEEE 802.11 console coap-client -m post coap://[fd00:0ff1:ce0b:a5e0:fcc2:3d00:4:a5ee]/resources/led cnt=$(/root/coap-client coap://[fd00:0ff1:ce0b:a5e0:fcc2:3d00:4:a5ee]/resources/button)
  • 40. © Tieto Corporation Public Applications and containers Examples 45 Smart Home (routing, notifications, rules) Spook Home (smart home + AI) Docker Hello world Hello world
  • 41. © Tieto Corporation Public AI in applications • Mining and analysis for aggregated data • Learning trends = habits • Levels of notifications based on probability • Fuzzy logic • Cost saving (water, electricity) • Security improvement • Feedback based learning • Example below 46
  • 42. © Tieto Corporation Public 47 Containers OPKG Native apps packages LXC (available via feeds) …
  • 43. © Tieto Corporation Public Security 50 Application Fine grained security Data aggregation and privacy protection (for cloud) Information integrity check by AI (data correlation, trends analysis etc) System Security holes like Heartblead, ShellShock or backdoors in devices Keep your system up to date - security on the level of last patch Open source Protocol Security services for link layer (auth, data integrity, confidentiality, reply protection) IP networking based security mechanisms (access control, firewalls, …) Keep to standards, e.g. DTLS (RFC6347 v1.2)
  • 44. © Tieto Corporation Public Demo - „Spook House” example smart application for lighting • Light control system • Learning light usage trends • Notifications based on deviations and likeliness • Focused on cost saving (i.e. recommendations) and security (notifications when out of trend) 51
  • 45. © Tieto Corporation Public • running on IOT Gateway and receives data from the IoT network sensors • monitor usage of home lights and detect unusual events. For instance if someone forgets to turn off the light. • Application gathers statistical information about how often and how long light are turned on. • Since users activity changes during the week (for instance on weekends) the algorithm takes into account not only time of day but also day of week. • Application will notice if lights in some room are turned on for unusually long time. 52 Demo - „Spook House” Description
  • 46. © Tieto Corporation Public • StateTracker • Receives data in form of events about state change {"Device": "light3", "EventType": "SHStateChange", "State": "On", "Timestamp": 122848.71204376257} {"Device": "light3", "EventType": "SHStateChange", "State": "Off", "Timestamp": 123907.1497501683} • Communiate with TrendMonitor and external modules • TrendMonitor (learning) • Keeps a data base with statistics • Implements algorithm to calculate and detect unusual situations (deviations) and notify ActionManager about such. • ActionManager (learning) • Receives ‚SHActionRequests’ about deviations and makes decission on what to do with it (e.g. notify user) • Options: User feedback loop • Clock or internal interrupt to throw ‚SHtimer’ event – check the House state. 53 Demo - „Spook House” Internals