Home and System – an Overview Ambient intelligence: technology and design

Fulvio Corno, Dario Bonino

Politecnico di Torino, 2013/2014 Outline

• Wired systems – MyOpen – KNX – ModBus • systems – ZigBee – EnOcean

2013/2014 Ambient intelligence: technology and design 2 MyOpen BTICINO PROTOCOL FOR MYHOME SYSTEM MyOpen / OpenWebNet

• MyOpen system – Initially proposed by Bticino (Legrand group) – Proprietary (SCS) – Proprietary low-level protocol – Simple configuration • Jumpers (can be carried by electricians) • Software – Accessible via OpenWebNet gateways

2013/2014 Ambient intelligence: technology and design 4 OpenWebNet

• Allows external applications to communicate, monitor and control MyHome devices • Open Specification • Open protocol designed to work on minimal network requirements – E.g., phone connections

2013/2014 Ambient intelligence: technology and design 5 OpenWebNet

• DTMF compatible – E.g., *1*1*12##  Light 12, On • Defines 2 types of communication sessions – Command session • To send commands • To ask for device states • To require measure values – Event session • To monitor all the bus events, asynchronously

2013/2014 Ambient intelligence: technology and design 6 OpenWebNet - Messages

• Tag structure – *tag1*tag2*tag3*...*tagN## • Tag – Allowed characters • {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, #} – Delimitator • * – Message end • ## • Content and structure changes for – Commands / State requests – Requests of measure values

2013/2014 Ambient intelligence: technology and design 7 OpenWebNet – Commands/States • 3-tag structure WHO Functionality Description – *WHO*WHAT*WHERE## 0 Scenarios • WHO 1 Lighting – The command/request functionality 2 Actuators (among a set of pre-defined values) 3 Load control • WHAT 4 Temperature control – The action to perform 5 Anti-burglar systems – Possible actions are specified for each 6 Intercom WHO value • WHERE 7 Multimedia – Identifies the message destination 13 Gateway management • Single device, device groups, scenarios, 15 CEN commands zones, etc. 16 / 22 Sound diffusion • WHAT and WHERE can have 17 Scenarios for MH200N gateways additional parameters 18 Energy management – WHAT#PAR1#PAR2...#PARn – WHERE#PAR1#PAR2...#PARn 25 CEN plus/ plus scenarios/ clean contacts 1001 Automation diagnostics 1004 Thermal control diagnostics 1013 Device diagnostics

2013/2014 Ambient intelligence: technology and design 8 OpenWebNet – Commands/States

• Switch on the lamp with id=12 – *1*1*12## • Switch on the webcam with id=4000 – *7*0*4000## • Switch off the temperature control for the zone 1 – *4*303*1## • Switch off all lights – *1*0*0##

2013/2014 Ambient intelligence: technology and design 9 Idiosyncrasies / Peculiarities

• Explicit State Notion • Same format for State changes and Commands • State change events only in monitoring sessions • State change events only for “active devices”, buttons and switches do not generate events. • States and commands only “defined” for “active” devices – Buttons and switches do not have an explicit state (independent from the controlled object)

2013/2014 Ambient intelligence: technology and design 10 More info

• Open community at – http://www.myopen-legrandgroup.com/ – Free registration • Documentation, software, discussion groups, application showcase • Direct contact with Bticino engineers

2013/2014 Ambient intelligence: technology and design 11 KNX THE EUROPEAN DE-FACTO STANDARD (ALMOST)

KNX is a standardized (EN 50090, ISO/IEC 14543), OSI-based network communications protocol for intelligent buildings. KNX is the successor to, and convergence of, three previous standards: the European Home Systems Protocol (EHS), BâtiBUS, and the European Installation Bus (EIB or Instabus). The KNX standard is administered by the KNX Association.. KNX

• Formal merger of 3 leading systems for Home and Building Automation – EIB – EHS – BatiBus

2013/2014 Ambient intelligence: technology and design 13 KNX

• All devices carry a “bit” of intelligence on-board • 2 Operating modes – S-MODE (System Mode) • Requires centralized binding & parameterization (with ETS) – E-MODE • Simple manipulation without PCs • Similar to MyOpen

2013/2014 Ambient intelligence: technology and design 14 Basic Principles

• Based on the idea of distributed applications • Every device carries a BIT of «intelligence» on board • 2 Main operating modes

• Requires centralized binding & S-MODE parameterization (with ETS (System Mode) software)

• Simple manipulation without PCs E-MODE • Similar to MyOpen

2013/2014 Ambient intelligence: technology and design 15 Logic Architecture

S-MODE E-MODE

CONFIGURATION

APPLICATION

LINK

2013/2014 Ambient intelligence: technology and design 16 Application

• Device implement “Distributed Applications” – Based on Datapoints • Distributed Applications = Datapoint Binding • Datapoints: – Represent process and control variables in the system – May be inputs, outputs, parameters, diagnostic data,… – Standardized Datapoint types – Grouped into Functional Blocks

2013/2014 Ambient intelligence: technology and design 17 KNX – Application (2)

• Communication System and Protocol offer a reduced instruction set to – Read and Write (set and get) Datapoint values • Application semantics is mapped to – Data format – Bindings • 3 binding schemes – Free – Structured – Tagged binding

2013/2014 Ambient intelligence: technology and design 18 Datapoint Addressing example

2013/2014 Ambient intelligence: technology and design 19 Functional blocks: Lighting

* Excerpt from 07_20_02 Lighting Actuators v1.4 AS – The KNX 2.0 specification 2013/2014 Ambient intelligence: technology and design 20 Datapoints: Lighting

* Excerpt from 07_20_02 Lighting Actuators v1.4 AS – The KNX 2.0 specification

2013/2014 Ambient intelligence: technology and design 21 Datapoint specification: Blinds

2013/2014 Ambient intelligence: technology and design 22 Application = Datapoints Binding

GroupAddress (multicast access to a datapoint)

Binding

GroupAddress (multicast access to

2013/2014 Ambient intelligence: technology and design a datapoint)23 KNX - Binding

• Free binding: – No a priori prescription on which Datapoints may be linked – Free addressing – Customized multicast grouping at the level of individual Datapoints – Central to S-Mode • Structured binding – Precise pattern for linking a whole set of Datapoints, usually corresponding to a Functional Block or Channel – Free-address • E.g., Controller and Push-button Modes • Tagged binding – … too complex …

2013/2014 Ambient intelligence: technology and design 24 Link - Connections TP 1 RF PL 110 Twisted pair cabling 868,3 MHz band for Short Communication over the mains SELV network and supply system Range supply network Asynchronous character Frequency Shift Keying, Spread frequency shift keying oriented data transfer and half maximum duty cycle of 1% signaling duplex bi-directional 32768 cps (chips per second) Asynchronous transmission of data communication Manchester data encoding packets and half duplex bi- Transmission rate: 9600 bit/s directional communication CSMA/CA collision avoidance Central frequency 110 kHZ All topologies may be used and Transmission rate: 1200 bit/s mixed (line, star, tree, ….) KNXNet/IP CSMA, compliant to EN 50065-1 Standard protocol for KNX devices connected to an IP network IP network as a fast backbone in KNX installations Tunnels KNX Frames over IP 2013/2014 Ambient intelligence: technology and design 25 KNX – Network technology

• TP 1 (basic medium inherited from EIB) – Twisted pair cabling – SELV network and supply system – Asynchronous character oriented data transfer and half duplex bi-directional communication – Transmission rate: 9600 bit/s – CSMA/CA collision avoidance – All topologies may be used and mixed (line, star, tree, ….)

2013/2014 Ambient intelligence: technology and design 26 KNX – Network technology

• PL 110 – Communication over the mains supply network – Spread frequency shift keying signaling – Asynchronous transmission of data packets and half duplex bi-directional communication – Central frequency 110 kHZ – Transmission rate:1200 bit/s – CSMA, compliant to EN 50065-1

2013/2014 Ambient intelligence: technology and design 27 KNX – Network technology

• RF – 868,3 MHz band for Short Range – Frequency Shift Keying, maximum duty cycle of 1% – 32768 cps (chips per second) – Manchester data encoding

2013/2014 Ambient intelligence: technology and design 28 KNX – Network technology

• KNXnet/IP – Standard protocol for KNX devices connected to an IP network – IP network as a fast backbone in KNX installations – Tunnels KNX Frames over IP

2013/2014 Ambient intelligence: technology and design 29 Link - Topology

• LINE • Up to 256 devices • Connected into Areas via a Main Line • AREA • Up to 16 lines per area • Up to 16 Areas • Connected via a Backbone Line • Max. Number of devices • 65536

2013/2014 Ambient intelligence: technology and design 30 KNX on Stage

2013/2014 Ambient intelligence: technology and design 31 Idiosyncrasies / Peculiarities

• Implicit State Notion – Only a subset of device states can be queried • State Events • State change events can be published by carefully configuring the KNX devices – S-MODE – Specific group address for notifications – Pass-through gateway configuration • All devices can publish state changes • In-operation events available • KNXNet/IP – Tunnel mode  event-based – Supports partial device discovery • EIBNet/IP – Requires participation to a multicast delivery group: • 239.192.39.238

2013/2014 Ambient intelligence: technology and design 32 Modbus ONE OF THE MOST DIFFUSED INDUSTRIAL PROTOCOLS

Modbus is a serial communications protocol originally published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs). Simple and robust, it has since become a de facto standard , and it is now a commonly available means of connecting industrial electronic devices Basic Principles

• Application layer messaging protocol (level 7 of the OSI model) – client/server communication between devices – different types of buses or networks • Industry serial de facto standard since 1979 • Request/reply protocol – Services specified by function codes

2013/2014 Ambient intelligence: technology and design 34 Logic Architecture

2013/2014 Ambient intelligence: technology and design 35 Modbus - Addressing • precise PDU addressing rules – Each data block is addressed from 0 to 65535 – Each element within a data block is numbered from 1 to n • pre-mapping between the MODBUS data model and the device application is totally vendor device specific

2013/2014 Ambient intelligence: technology and design 36 Data Model

• 4 primary tables – up to 65536 data items, each • Distinctions between – inputs and outputs – bit-addressable and word-addressable data items • Read or write of items can span multiple consecutive data blocks

2013/2014 Ambient intelligence: technology and design 37 Function codes

• Function Code – Indicates to the server what kind of action to perform – Is coded in one byte – Valid codes are in the range of 1 ... 255 decimal • the range 128 – 255 is reserved and used for exception responses – Function code "0" is not valid – Sub-function codes are added to some function codes to define multiple actions

2013/2014 Ambient intelligence: technology and design 38 Function Codes

2013/2014 Ambient intelligence: technology and design 39 Request/reply protocol

SUCCESSFUL TRANSACTION

FAILING TRANSACTION 2013/2014 Ambient intelligence: technology and design 40 Protocol structure

• Simple protocol data unit (PDU) – Independent of the underlying communication layers – Specific buses can introduce additional fields on the application data unit (ADU)

2013/2014 Ambient intelligence: technology and design 41 Modbus – Data Model

Multiple data blocks Single data block

2013/2014 Ambient intelligence: technology and design 42 Modbus - Transaction

2013/2014 Ambient intelligence: technology and design 43 Link - Connection

RS485 Modbus TCP/IP Serial cable (1 or 2 pairs) Ethernet cable (Fiber for longer distances) Variable transmission speed from 9600 to 115200 baud Transmission speed depends on the underlying hardware / network

2013/2014 Ambient intelligence: technology and design 44 Modbus – Network technology (2)

• TCP/IP over Ethernet • Asynchronous serial transmission over a variety of media – wire : EIA/TIA-232-E, EIA-422, EIA/TIA-485-A – fiber, radio, etc. • MODBUS PLUS – high speed token passing network

2013/2014 Ambient intelligence: technology and design 45 Link - Topology

• Depends on the link technology – RS485 • serial (daisy chain) • 1 master, many slaves (up to 255) – Modbus TCP/IP • Multiple masters • Multiple slaves

2013/2014 Ambient intelligence: technology and design 46 Network Architecture

2013/2014 Ambient intelligence: technology and design 47 Modbus on Stage

2013/2014 Ambient intelligence: technology and design 48 Idiosyncrasies / Peculiarities

• Explicit State Notion – Can only be queried (read) • No command notion – Only write operations on registers • Client/Server approach – Does not support event-based interaction • Polling • No explicit device notion – Registers exposed through a Modbus Gateway – Devices identified by their slave id • No device discovery – Available registers are defined by the vendor

2013/2014 Ambient intelligence: technology and design 49 Wireless systems A comparison (source: Z-Wave)

2013/2014 Ambient intelligence: technology and design 51 ZigBee WIRELESS CONTROL THAT SIMPLY WORKS (?)

ZigBee is a specification for a suite of high level communication protocols used to create personal area networks built from small, low-power digital radios. ZigBee is based on an IEEE 802.15 standard. Though low-powered, ZigBee devices often transmit data over longer distances by passing data through intermediate devices to reach more distant ones, creating a mesh network; i.e., a network with no centralized control or high-power transmitter/receiver able to reach all of the networked devices. Basic Principles

• Low cost, very low power consumption, two way, wireless communications standard – Built on top of IEEE 802.15.4 • Secure – Messages are encrypted • Defines several profiles – Standard: , Smart Energy, etc. – Custom • Each profile includes one or more ZCL (ZigBee Cluster Library) specification

2013/2014 Ambient intelligence: technology and design 53 Basic principles

Group of devices / functionalities pertaining a given application domain, e.g., ZigBee Profiles Home Automation (ZigBee HA), Smart Energy (ZigBee SE), etc.

Device functionalities ZigBee Cluster Libraries described in terms of client-server interactions

2013/2014 Ambient intelligence: technology and design 54 Logic Architecture

2013/2014 Ambient intelligence: technology and design 55 ZDO – ZigBee Device Objects

Initialize the application support interface sub-layer (APS), the network layer (NWK), APPLICATION OBJECTS and the Security Service Provider. interface Assemble configuration information from LOWER PORTIONS the end applications to determine and implement discovery, security OF THE ZIGBEE management, network management, and PROTOCOL STACK binding management. 2013/2014 Ambient intelligence: technology and design 56 Application Framework THE ENVIRONMENT IN WHICH APPLICATION OBJECTS ARE HOSTED ON ZIGBEE DEVICES

Agreements for messages, message formats, and processing actions that enable developers to create an interoperable, distributed application employing ZigBee Profiles application entities that reside on separate devices. These application profiles enable applications to send commands, request data, and process commands and requests.

Clusters are identified by a cluster identifier, which is associated with data flowing out of, or into, the device. ZigBee Clusters Cluster identifiers are unique within the scope of a particular application profile.

2013/2014 Ambient intelligence: technology and design 57 Profiles HOME AUTOMATION This profile defines device descriptions and standard SMART ENERGY practices for applications needed in a residential or This profile defines device descriptions and standard light commercial environment. Installation scenarios range from a single room to an entire home up to practices for Demand Response and Load 20,000 square feet (approximately 1850m2). “Smart Energy” applications needed Management The key application domains included in this initial in a Smart Energy based residential or light commercial environment. Installation scenarios range version are lighting, HVAC, window shades from a single home to an entire apartment complex. and security. The key application domains included in this initial version are metering, pricing and demand ENERGY@HOME response and load control applications. The E@H features extend the HA and SE ZigBee profiles in order to build a new class of devices, i.e. White Goods for Energy@Home.

2013/2014 Ambient intelligence: technology and design 58 Profiles Teaser: HOME AUTOMATION Next week (Thursday, June 5th) the director of the Energy@Home consortium will presentThis profile defines device descriptions and standard SMARTtheir ENERGY activities. practices for applications needed in a residential or This profile defines device descriptions and standard light commercial environment. Installation scenarios range from a single room to an entire home up to practices for Demand Response and Load 20,000 square feet (approximately 1850m2). “Smart Energy” applications needed Management The key application domains included in this initial in a Smart Energy based residential or light commercial environment. Installation scenarios range version are lighting, HVAC, window shades from a single home to an entire apartment complex. and security. The key application domains included in this initial version are metering, pricing and demand ENERGY@HOME response and load control applications. The E@H features extend the HA and SE ZigBee profiles in order to build a new class of devices, i.e. White Goods for Energy@Home.

2013/2014 Ambient intelligence: technology and design 59 Profiles Teaser: HOME AUTOMATION Next week (Thursday, June 5th) the director of the Energy@Home consortium will presentThis profile defines device descriptions and standard SMARTtheir ENERGY activities. practices for applications needed in a residential or This profile defines device descriptions and standard light commercial environment. Installation scenarios range from a single room to an entire home up to practices for Demand Response and Load 20,000 square feet (approximately 1850m2). “Smart Energy” applications needed Management The key application domains included in this initial in a Smart Energy based residential or light commercial environment. Installation scenarios range version are lighting, HVAC, window shades from a single home to an entire apartment complex. and security. The key application domains included in this initial version are metering, pricing and demand ENERGY@HOME response and load control applications. The E@H features extend the HA and SE ZigBee profiles in order to build a new class of devices, i.e. White Goods for Energy@Home.

2013/2014 Ambient intelligence: technology and design 60 Clusters

• Cluster – Collection of attributes and commands – Defines a communications interface between two devices – Devices implement server and client sides of the interface • Client – A cluster interface which is listed in the output cluster list of the simple descriptor on an endpoint. – Sends commands that manipulate the attributes on the corresponding server cluster. • Server – A cluster interface which is listed in the input cluster list of the simple descriptor on an endpoint. – Typically this interface supports all or most of the attributes of the cluster.

2013/2014 Ambient intelligence: technology and design 61 Cluster Definition: OnOffSwitch O I

2013/2014 Ambient intelligence: technology and design 62 Cluster Definition: OnOffOutput

2013/2014 Ambient intelligence: technology and design 63 Link - Topology • hierarchical routing strategy • beacon-oriented STAR communication • the network is controlled by TREE one single device called the ZigBee coordinator • the ZigBee coordinator is • coordinator is responsible for initiating and responsible for starting maintaining the devices on MESH the network and for the network choosing certain key network • full peer-to-peer communication parameters • routers in mesh networks do not • the network may be currently emit regular IEEE extended through the use 802.15.4-2003 beacons of ZigBee routers 2013/2014 Ambient intelligence: technology and design 64 EnOcean

The inventor of patented energy harvesting wireless technology

First ISO/IEC wireless standard optimized for solutions with ultra-low power consumption and energy harvesting . Approach

• EnOcean modules combine micro-energy converters with ultra low power electronics and reliable wireless communications • (nearly) Self-powered wireless sensor solutions

2013/2014 Ambient intelligence: technology and design 66 Energy?

• And more… • Pressure • Rotation (wheels, gas meters) • Vibrations

2013/2014 Ambient intelligence: technology and design 67 Software architecture

2013/2014 Ambient intelligence: technology and design 68 Radio technology

2013/2014 Ambient intelligence: technology and design 69 Transmission protocol

2013/2014 Ambient intelligence: technology and design 70 Short messages: reliability

2013/2014 Ambient intelligence: technology and design 71 More information

2013/2014 Ambient intelligence: technology and design 72 Open standard, multiple vendors

http://www.enocean- alliance.org/en/products/ 2013/2014 Ambient intelligence: technology and design 73 Wanna play?

http://www.enocean.com/en/enocean-pi/

2013/2014 Ambient intelligence: technology and design 74 License

• These slides are distributed under a Creative Commons license “Attribution – NonCommercial – ShareAlike (CC BY-NC-SA) 3.0” • You are free to: – Share — copy and redistribute the material in any medium or format – Adapt — remix, transform, and build upon the material – The licensor cannot revoke these freedoms as long as you follow the license terms. • Under the following terms: – Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. – NonCommercial — You may not use the material for commercial purposes. – ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. – No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. • http://creativecommons.org/licenses/by-nc-sa/3.0/

2013/2014 Ambient intelligence: technology and design 75