Final project for the Building AI course.
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.
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
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.
**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.
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 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
According to my tests, the possible best methods are:
- Naïve Bayes
- Support Vector Machine
- K-nearest neighbors
- Decision trees
- Implementation of the hardware by using either Arduino or Raspberry.
- Data transfer between the hardware and the software (database and AI methods)
Skills to move on:
- Arduino or raspberry programming
- Data exchange with the computer software (database, python, AI methods, Internet, Server deployment)
Weather conditions usually consist of strong winds.
Raining season in my area is quite defined. It usually starts from May until September.
The bin lorry doesn't have a defined schedule to come.
Sporadic cut offs happen, due to other people who don't pay their bills on time.
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.
- References
- Sensors [2]: https://www.amazon.com.mx/dp/B07TRMKVRD/?target=_blank "Sensor de gotas de lluvia de 12 V, Interruptor de relé del sensor de humedad de la hoja foliar del módulo del controlador de gotas de lluvia" [3]: https://mytectutor.com/rain-sensor-with-arduino-for-making-automatic-car-windshield-wiper/?target=_blank "Arduino rain sensor" [4]: http://www.n8mdp.com/wxanemometer_windvane.php?target=_blank "Arduino Anemometer / Wind Vane"