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 |
|
|
Sensor alarm |
|
|
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...