
Universidade do Minho Escola de Engenharia Luís Daniel Carvalho da Silva iHotel – An Hotel Room Controller Using the Z-Wave Protocol Tese de Mestrado Ciclo de Estudos Integrados Conducentes ao Grau de Mestre em Engenharia Electrónica Industrial e de Computadores Trabalho efetuado sob a orientação do Professor Doutor Sérgio Adriano Fernandes Lopes Novembro de 2011 Acknowledgements First and foremost I would like to express how thankful I am to my su- pervisor Prof. S´ergioLopes, who followed my work closely, and advised me wisely throughout the whole time. His continuous support, with his ideas and careful thought were very important to my work. He was always there to listen and his help was invaluable in developing my ability to ask myself what was wrong or needed to be perfected. It showed me that there was still much to be done, spe- cially in the way I approached the problems I faced. I would also like to show my deepest and sincere appreciation to other two Profes- sors of mine. Professor Adriano Tavares, for all of his hard work and counselling during my Masters degree in Computer Technology. He taught me that there is nothing that cannot be done without effort and perseverance. His insightful vision lead me throughout my whole work and will for sure lead in my future life as an Engineer.I will also be forever thankful to him for his support since the moment I decided to embrace this project, he has truly been an inspiration to me. To Professor Jorge Cabral I would like to thank him for the help and inspiring counselling he gave me whenever I needed. With his support I learned that there are a number of ways to solve a problem and some of them, although not obvious will for sure contribute for a better solution. A popular expression that for this is \thinking outside the box ". Finally, I would like to thank my family: my parents and sisters, for their patience and effort in supporting me during my Master Thesis. Without their help, without their patience I could never achieve what I have achieved until this day. II Abstract This thesis report is a study on the proprietary Z-Wave protocol potentialities as a wireless communication protocol in a home automation context. Z-Wave is a proprietary home automation protocol. Throughout this report it will be possible to get an insight on how the Z-Wave protocol works by analysing several types of information freely available on the World Wide Web, open source projects and commercial applications that use Z-Wave technology. The proposed approach to this work will be the analysis of the previously collected information to use a general set of Z-Wave commands and design a small touch screen based embedded system that features some support for the Z-Wave protocol. This console will be part of a larger concept, the iHotel concept. This concept uses a single device to control all the functionalities related to the hotel room. It should be possible to control every electronic device within a hotel room from this single interactive console. The results of this work are: (1) a working prototype of the console that controls basic Z-Wave devices such as light switches, outlets, thermostats and motion sensors; and, (2) the opening of a path, so that others can explore the Z-Wave protocol, understand it and further expand its support by adding new features. Resumo Este relat´oriode tese ´eum estudo das potencialidades do protocolo pro- priet´arioZ-Wave situado num contexto de automa¸c~aoresidencial sem fios. O Z-Wave ´eum protocolo sem fios de automa¸c~aoresidencial. Ao longo deste re- lat´orioser´aposs´ıvel ter uma ideia de como o protocolo Z-Wave funciona atrav´es de an´alisesde informa¸c~aodispon´ıvel livremente na World Wide Web, projectos open-source e aplica¸c~oescomerciais que usam a tecnologia Z-Wave. A abordagem proposta a este trabalho ser´aa an´alisede informa¸c~aopreviamente adquirida para usar um conjunto de comandos b´asicose gerais Z-Wave e desenhar um pequeno sistema embebido baseado num ecr^at´actilque suportar´acomandos Z-Wave. Esta consola far´aparte de um conceito mais abrangente, o conceito iHotel. Este conceito usa um ´unicodispositivo para controlar todas as funcionalidades relacionadas com um quarto de hotel. Dever´aser poss´ıvel controlar todos os dispositivos electr´onicos presentes num quarto de hotel a partir deste sistema embebido. Os resultados deste trabalho s~ao: (1) um prot´otipo funcional da consola que controla dispositivos Z-Wave b´asicoscomo interruptores de parede, tomadas, term´ostatose sensores de movimento; e, (2) a abertura de um caminho, para que outros possam explorar o protocolo Z-Wave, entend^e-loe expandir ainda mais o seu suporte adicionando-lhe novas funcionalidades. Contents 1 Introduction3 1.1 Motivation................................3 1.2 The iHotel Concept...........................4 2 State of the Art7 2.1 Introduction...............................7 2.2 Wireless Residential Automation Protocols..............7 2.2.1 X10...............................7 2.2.2 Insteon..............................8 2.2.3 Zigbee..............................8 2.2.4 Z-Wave.............................8 2.3 Commercial of the Shelf (COTS) Systems..............9 2.3.1 Introduction...........................9 2.3.2 Lagotek.............................9 2.3.3 Go Control Center....................... 11 2.3.4 Silverpac Silverstat....................... 11 2.3.5 Intel Home Dashboard Concept................ 13 2.3.6 Z-Wave Enabled Touch Screen................. 14 2.3.7 Electronic House Keeper.................... 15 3 Platform 17 3.1 Development Board........................... 17 3.2 Z-Wave Devices............................. 18 3.3 Software Tools.............................. 18 3.4 Qt.................................... 19 3.4.1 Introduction........................... 19 3.4.2 Widgets............................. 19 3.4.3 Qt Datatypes.......................... 19 3.4.4 Signals and Slots........................ 19 3.4.5 MOC (Meta Object Compiler)................. 20 3.4.6 Qt Class Organization..................... 21 4 Z-Wave 23 4.1 Network Management......................... 23 4.1.1 Self-Organizing......................... 24 4.1.2 Self-Healing........................... 24 V 4.1.3 Routing Principles....................... 24 4.1.4 Association Process....................... 25 4.1.5 Inclusion Process........................ 25 4.2 Z-Wave Frame Format......................... 26 4.2.1 Z-Wave Application Layer................... 27 4.2.2 Application Frame Format................... 28 5 Exploring Z-Wave Messages 31 5.1 Checksum Calculation......................... 34 5.2 Node Identification........................... 35 5.3 Z-Wave Version............................. 36 5.4 Device Interaction............................ 37 5.4.1 Basic Switch........................... 37 5.4.1.1 Turn On........................ 38 5.4.1.2 Turn Off........................ 38 5.4.1.3 Get Status...................... 39 5.4.2 Dimmer Switch......................... 39 5.4.2.1 Turn On........................ 39 5.4.2.2 Turn Off........................ 40 5.4.2.3 Get Status...................... 40 5.4.2.4 Dimm the Load.................... 41 5.4.3 Power Meter........................... 42 5.4.3.1 Instant Energy Consumption............ 42 5.4.3.2 Accumulated Energy Consumption......... 43 5.4.4 Sensor.............................. 45 5.4.4.1 Temperature..................... 46 5.4.4.2 Light Measurement.................. 47 5.4.4.3 Multi Instance.................... 48 5.4.4.4 Battery Level..................... 49 5.4.4.5 Motion Sensor.................... 49 5.4.5 Device Association....................... 50 5.4.6 Configuration Parameters................... 50 5.4.6.1 Dimmer Switch Configuration Parameters..... 53 5.4.7 Dimmer Switch Supported Features.............. 54 5.4.8 Manufacturer Information & Device Type.......... 55 5.4.9 Node Version Information................... 55 6 Graphical User Interface 59 6.1 Main Screen............................... 60 6.2 Socket2Serial - Graphical User Interface............... 61 6.3 Z-Wave Devices............................. 64 6.3.1 Switch.............................. 64 6.3.2 Dimmer............................. 66 6.3.3 Sensor.............................. 67 6.4 Configurations.............................. 69 VI 7 Socket2Serial Interface Software 71 7.1 Unix Signals............................... 72 7.2 Serial Port Input/Output....................... 73 7.2.1 Opening a Serial Device.................... 74 7.2.2 Configuring the Serial Device................. 74 7.2.3 Writing to and Reading from the Serial Interface...... 75 7.2.4 Close Serial Interface...................... 76 7.3 Network Sockets............................. 76 7.3.1 Establishing a Socket Connection - Server Side........ 76 7.3.1.1 Creating a Server................... 76 7.3.1.2 Configuring a Socket................. 77 7.3.1.3 Bind Socket...................... 78 7.3.1.4 Accept Connection.................. 79 7.3.1.5 Sending and Receiving Data............. 79 7.3.1.6 Closing a Socket Connection............. 79 7.3.2 Establishing a Socket Connection - Client Side........ 79 7.4 Data Exchange............................. 80 7.5 Select() Application Programming Interface............. 80 7.5.1 Communication Management................. 81 7.5.2 Registering the Socket File Descriptor............ 81 7.6 Running the Application........................ 82 8 Conclusion 83 8.1 Future Work............................... 83 8.1.1 Processing Power........................ 83 8.1.2 Complete Z-Wave Application
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages99 Page
-
File Size-