Mainstreaming Zero: Large Scale Commercial Net Zero Energy Buildings, AGC 2013
Towards a Zero-Configuration Wireless Sensor Network ... a Zero-Configuration Wireless Sensor...
Transcript of Towards a Zero-Configuration Wireless Sensor Network ... a Zero-Configuration Wireless Sensor...
Lars SchorPhilipp SommerRoger Wattenhofer
Towards a Zero-Configuration Wireless Sensor Network Architecture
for Smart Buildings
Smart Buildings
40% of total energy use is for buildings• Make buildings greener and save money
Building control systems get smarter• Learn where energy is used and how it
can be saved• Increase comfort, health and safety of
people • Integration with traditional IT systems
Philipp Sommer, ETH Zurich @ BuildSys‘09
Sensor nodes• Report current energy usage, temperature, ...
Actuator nodes• Control small subsystems
Central control unit• Coordinates different subsystems (actuators/sensors)
Philipp Sommer, ETH Zurich @ BuildSys‘09
System Overview
Goals:
1. Integrate wireless sensor nodes into an existingIP-based infrastructure
2. Plug-and-Play system for building automation
Philipp Sommer, ETH Zurich @ BuildSys‘09
Integration of Sensor Nodes into IP-based Networks
Connectivity• Connect sensor with other devices in the Intranet/Internet• No application layer gateway required
Use of standard networking tools/protocols in WSNs• ping, telnet, http, web services, ...
Scalability• 128-bit address space
Philipp Sommer, ETH Zurich @ BuildSys‘09
Advantages of using IPv6 for Wireless Sensor Nodes
How can we connect devices which are fundamentally different?
Philipp Sommer, ETH Zurich @ BuildSys‘09
Target Platforms
Sensor Node Central Unit
CPU 8 MHz 2.4 GHz (4x)
RAM 8 kB 8 GB
Program Storage 128 kB 250 GB
Philipp Sommer, ETH Zurich @ BuildSys‘09
Communication Stack: WSN vs. IP
Classical Stack Internet Stack
Problem:
Solution:
Philipp Sommer, ETH Zurich @ BuildSys‘09
IPv6 over LoW Power wireless Area Networks (6LoWPAN)
802.15.4 Header IPv6 Header TCP Header TCP Payload
39 Bytes 40 Bytes 20 Bytes 28 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
TF HC2
Source Addr
Dest Addr
Next Header
IPv6 Hop Limit
802.15.4 Header TCP Header
Fragment Header
IPv6 Header Compression
TCP Payload
How does…… a device know about
other devices?
Philipp Sommer, ETH Zurich @ BuildSys‘09
Service announcements using multicast DNS packets• Implemented by Zeroconf/Bonjour/Rendez-vous• Service announcements using DNS SRV records (RFC 2782)• Implemented using UDP packets • Integrate new devices without additional configuration
Philipp Sommer, ETH Zurich @ BuildSys‘09
Service Discovery
Service: _rest._tcp.localHostname: sensor-1.localAddress: 2001:db8:0:8d3:0:8a2e:70:7344
How does…… a device know which
functionality another device provides
Philipp Sommer, ETH Zurich @ BuildSys‘09
Web services enable machine-to-machine interaction
Classic solution: SOAP and XML• Not optimal for memory-constrained sensor nodes
Lightweight solution: REST and JSON
Philipp Sommer, ETH Zurich @ BuildSys‘09
Web Services for Sensor Networks
ServiceRequester
ServiceProviderData
SOAP: Simple Object Access ProtocolXML: Extensible Markup LanguageREST: Representational State TransferJSON: Java Script Object Notation
Functionality provided by a system is a set of resources
Each resource can be identified using its distinct URI• Example: The red LED of a node can be accessed at “/Leds/Red”
Web service based on REST: • Resources can be accessed using four basic operations provided by
the HTTP protocol (GET, PUT, POST and DELETE)
Not limited to sensor nodes!
Philipp Sommer, ETH Zurich @ BuildSys‘09
Representational State Transfer (REST)
Example:
Philipp Sommer, ETH Zurich @ BuildSys‘09
REST: Resource Discovery and Access
Sensor Node
Leds
Red Green Blue
Temperature
Node
Collection
Member
GET /Leds/Red HTTP/1.1
All Data of the Member
JavaScript Object Notation (JSON)
Philipp Sommer, ETH Zurich @ BuildSys‘09
Response from the Sensor Node
{ "device": "temperature", // name of the resource "method": [ // supported methods "G" // of the resource (GET) ], "param": [ // array with all parameters { "n": "celcius", // name "v": 26, // value "t": "i", // data type (integer) "u": 0 // updatable } ]}
Atmel ZigBit900 module• Cheap and flexible platform for prototyping sensor networks• Atmega1281 microcontroller + ATRF212 radio transceiver• Various IO pins (GPIO, SPI, I2C, UART)
Philipp Sommer, ETH Zurich @ BuildSys‘09
Pixie Prototyping Platform
8 Kbytes RAM128 Kbytes ROM
IEEE 802.15.4
We use blip: 6LoWPAN stack for TinyOS 2.1.1
Implemented a small HTTP web server on each sensor node
Service announcements using multicast DNS (mDNS) over UDP
Philipp Sommer, ETH Zurich @ BuildSys‘09
TinyOS Implementation
How does…… this help to make
buildings smarter
Philipp Sommer, ETH Zurich @ BuildSys‘09
Central unit• Get information from the sensors• Control the actuators
Web application• Listen to service announcements from nodes• Rule-based control of actuators
Philipp Sommer, ETH Zurich @ BuildSys‘09
Integration into Smart Buildings
Philipp Sommer, ETH Zurich @ BuildSys‘09
Web Application
Response time for HTTP requests to the sensor node• Performance improvement by using persistent TCP connections
Philipp Sommer, ETH Zurich @ BuildSys‘09
Evaluation
0
50
100
150
200
250
300
350
400
450
94 Bytes, Closed TCP Connection
94 Bytes, Estab. TCP Connection
201 Bytes, Closed TCP Connection
201 Bytes, Estab. TCP Connection
335 Bytes, Closed TCP Connection
335 Bytes, Estab. TCP Connection
Aver
age
Res
pons
e Ti
me
[ms]
Connected sensor nodes using standard Internet protocols• Lightweight web services based on REST/HTTP
Zero-configuration approach• Service discovery using multicast DNS• Clients can fetch a list of services offered by a device
And all this fits into less than 128kB ROM / 8kB RAM
Philipp Sommer, ETH Zurich @ BuildSys‘09
Summary
Service: „_rest._tcp.local“Hostname: sensor-1.localAddress: 2001:db8:0:8d3:0:8a2e:70:7344