Web Application for Smart House Management on Django

Web Application for Smart House Management on Django

Ruslan Khamidullin

https://djangosmarthouse.herokuapp.com/

😊 CLIENT

It was It was a training project at the course Creating Web Services on Django Coursera.

βœ”οΈ CHALLENGE

My task was to implement a smart home management server on Django, which has a web-interface for configuration and manual control, which will perform periodic sensor polling and automatic response in case of certain situations, using the smart home controller API.


πŸ’» SOLUTION

Reaction to events:

  • If there is a water leak (leak_detector=true), close the cold (cold_water=false) and hot (hot_water=false) water and send a message when detected.
  • If cold_water is closed, turn off the boiler and the washing machine (washing_machine) immediately and under no circumstances turn them on until the cold water is opened again.
  • If the hot water temperature (boiler_temperature) is less than hot_water_target_temperature - 10%, the boiler has to be switched on and wait until it reaches hot_water_target_temperature + 10%, after which the boiler has to be switched off to save energy.
  • If curtains are partially open (curtains == "slightly_open"), they are on manual control - this means that their state cannot be changed automatically under any conditions.
  • If it is darker than 50 outside (outdoor_light), open the curtains, but only if the lamp in the bedroom_light is not lit. If outdoor_light is lighter than 50 or if the light in the bedroom_light is on, close the curtains. Except when the curtains are manually operated.
  • If smoke_detector is detected, immediately turn off the following devices [air_conditioner, bedroom_light, bathroom_light, boiler, washing_machine] and under no circumstances turn them on until the smoke disappears.
  • If the temperature in the bedroom (bedroom_temperature) rises above bedroom_target_temperature + 10%, turn on the air conditioner (air_conditioner) and wait until the temperature drops below bedroom_target_temperature - 10% and then turn off the air conditioner.

The project was implemented on Python (Django), PostgreSQL.Β I used Docker Compose to deploy VPS.

Skills: Python, Django, ORM, API, PostgreSQL, Docker, Celery,

πŸ₯³ RESULT

As a result, my project was accepted and I graduated with honors.

https://djangosmarthouse.herokuapp.com/





Report Page