/smart-home

Building AI course project - Deploy a domotics system to automatically and/or remotely control water supply, windows opening and closing, turning on/off the lights, and more.

Primary LanguageJupyter NotebookMIT LicenseMIT

Smart Home

Final project for the Building AI course.

Summary

Deploy a domotics system to automatically and/or remotely control water supply, windows opening and closing, turning on/off the lights, garden watering, and more.

Since I am barely starting this project, I only will focus on the "windows opening and closing control" part.

For future work, this project will comprise development and deployment on a VPS server.

Background

Home maintenance is hard and expensive, not only in terms of money, but in time.

A domotics system with the use of AI techniques can help both in maintenance and resources efficiency optimization.

Suppose we have a quite big house with a garden, a dog, garage, some trees.

The problems to take into account to optimize the home maintenance are:

  • Weather conditions
  • Defined raining season
  • Garbage collection
  • Water supply, including sporadic cut off
  • Sporadic electricity cut off
  • Dog feeding
  • Gas cut off
  • Windows opening and closing
  • Floor cleaning

Personal motivation

It's very expensive for me to spend lots of time in home maintenance. Finding the right person to do this daily home maintenance job has been almost an impossible task.

windows opening and closing control

**At the moment and for the sake of simplicity, I narrow down this project to windows opening and closing control **

By using a model, I want a system to determine when to close and open the house Windows by meeting our following criteria:

  • All windows must be closed when:
    • It's night.
    • It's very windy.
    • It's raining hard.
    • It's dusty.
    • There's smog.
  • All windows must be open when:
    • It's daylight.
    • There's no wind or wind is not strong.
    • There's no dust.
    • There's no smog.

Data and AI techniques

The data will come from the [rain][2], wind, smog, temperature & humidity sensors. These data together will be used to generate a, tentatively a linear or logistic regression, two-class (label) model: "close" and "open".

Data sources

Data will come from the sensors. Historical data will be stored in a database that will be applied to models.

I added the "weather_sample.csv" sample file to give a general idea how the input would be collected from different sensors to apply AI methods on, in order to determine whether the windows should be open or closed.

I also added my Jupiter Notebook with Python to test it with different AI methods.

Sample Columns are (all as float type):

  • precipitation
  • temperature
  • humidity
  • visibility
  • wind
  • pressure

And the column that determines to open or close the windows is (as a label "open", "close" two-class type):

  • Windows

AI methods

According to my tests, the possible best methods are:

  • Naïve Bayes
  • Support Vector Machine
  • K-nearest neighbors
  • Decision trees

Challenges

  • Implementation of the hardware by using either Arduino or Raspberry.
  • Data transfer between the hardware and the software (database and AI methods)

Future work and what next?

Skills to move on:

  • Arduino or raspberry programming
  • Data exchange with the computer software (database, python, AI methods, Internet, Server deployment)

Weather conditions

Weather conditions usually consist of strong winds.

Defined raining season

Raining season in my area is quite defined. It usually starts from May until September.

Garbage collection

The bin lorry doesn't have a defined schedule to come.

Water supply

Sporadic cut offs happen, due to other people who don't pay their bills on time.

Sporadic electricity cut off

Due to weather conditions and corrupt private enterprises, electricity cut offs happen from time to time. No-break batteries only last about three hours. If the cut off has already taken at least 20 minutes, the system should send a report with all the required details to the Electricity Company.

Acknowledgments