You'll find many articles on home automation under the tag #homeautomation. Here's a quick overview of the decade-long project to figure out what the ideal home automation system should look like.
My home automation system has over 200 sensors. Most are used to detect people moving around the house. There's a magnetic sensor at the top of the drive that detects cars, motion sensors by the front door, contacts on every external and most internal doors, a few PIR motion sensors in ceilings and on walls, and my favorite sensor of all, the Pulsor strain-gauges under the floor that detect people walking about without any visible sign of a sensor in the room. Many of the sensors are connected through an alarm panel into the main home automation PC using a serial connection but increasingly I'm adding new sensors using Arduinos posting to a RESTful API or Moteino's sending back messages wirelessly.
All the sensor data is stored in a large MongoDB database using my 'variables with history' that make it easy to program complex statistical expressions comparing sensor activity now to the average for the same time of day last week, or every week. From this data a wide-variety of rules are triggered using my 'sequential logic blocks' that make it easy to chain logic together for any situation. The system also uses 'hierarchical state machines' that help track state over time.
The house controls heating, lighting, sprinklers, music. It talks over the speakers, it plays music by tags in any collection of rooms, you can chat to it on messenger, hangouts or Slack. It has a web UI, an Android UI and an iPhone UI.
It saves energy, keeps us informed as to what's happening at home or over at our barn and is generally helpful.
So take a look at #homeautomation.