Book Image

Home Automation with Intel Galileo

By : Onur Dundar
Book Image

Home Automation with Intel Galileo

By: Onur Dundar

Overview of this book

Table of Contents (16 chapters)
Home Automation with Intel Galileo
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Adding security features to the Smart Home application


We have already added the Philio multisensor to our system to read illumination and temperature values. Let's add a flood detector to the Aeon USB controller; and as you have in previous chapters, follow inclusion instructions from its manual. Then we can start the required implementation in the application.

Before proceeding to work with security sensors, we need to define sensor types and command classes to identify messages.

The following commands are used to report sensor changes:

Sensor type

Message sent

Report value

Binary sensor

COMMAND_CLASS_BINARY_SENSOR, 0x30

BINARY_REPORT, 0x03

Sensor alarm

COMMAND_CLASS_SENSOR_ALARM, 0x9C

SENSOR_ALARM_REPORT, 0x02

These constants have been defined in the message.h file, as shown here:

#define FloodSensorNodeID    0x05

enum BINARY_SENSOR_TYPE {
  GENERAL_PURPOSE = 0x01,
  WATER_DETECTION_SENSOR = 0x06,
  TAMPER_SENSOR = 0x08,
  DOOR_WINDOW_SENSOR = 0x0A,
  MOTION_DETECTION_SENSOR = 0x0C...