Smart Home Modelling
Pretty much from the first day that we started writing our smart home automation software, we realised that we were basically modelling our home and its features and capabilities in our software. We also quickly realised that in doing so, the model was generic and could be applied to any home. Many of the features and services are common, such as climate control, security systems, temperature sensors, etc.
With this in mind, we set about writing code in Java. We chose Java because it is a language we are familiar with and is also object orientated. This means we can write Java classes to model the key objects within any home and their capabilities and relationships.
Some of the main things we have modelled with Java classes so far are:
Each IP camera is modelled in terms of its ability to capture still images and video, night time capability, etc. Each camera has a status set by our Home Control System (HCS), which decides whether it should be capturing images and video.
Each device has a rating and we also track how long each device is on for in each day. From this we can estimate the energy consumption and report it if need be.
Occupancy & Presence
All sensors are modelled as objects and have a type and set of associated characteristics.
Events - structured messages between elements of our smart home automation system.
Zones are a core part of our smart home model. Typically a zone is used to represent a room. Our model also supports nested zones (zones within zones) and tracks occupancy and presence within this heirarchical model.