Skip to content

Latest commit

 

History

History
130 lines (94 loc) · 4.64 KB

README.md

File metadata and controls

130 lines (94 loc) · 4.64 KB

Smart Curtain

This project is not yet complete.

ABOUT

DESCRIPTION

Smart Curtain is an automation of curtains to open curtains to a certain position either immediately, at a specified time, at a predicted time, or at sunrise/sunset. It can run as a Hub-Node (master-slave) system through a MQTT Broker. Other devices can control the Curtain through MQTT. The Hub runs using a Python (Flask) web server for the backend, a React frontend, a Postgres database for storing curtains, their states and user variables, and a python instance for automatic event creation & management. The Node runs Arduino compiled and bootloaded code.

FEATURES

  • Curtain that
    • Knows whether it is closed or open
    • Receives move and status requests through MQTT on a
      • Home level
      • Room level
      • Individual level
  • Hub React App for human interfacing
  • Hub Python Flask backend for scheduling additional features
    • Immediate movement to a specified position (0–100%)
    • Move to a position (0–100%) at a specified time
    • Sunrise opening and sunset closing
    • Event predition
  • Hub Postgres database for storing home, rooms, curtains, events, and options

How It Works

TODO: Add use case diagram

image

Requirements

CONTENTS

  • ~/3DModels The 3-D Models for the SmartCurtain
  • ~/Documentation Descriptions, examples, & diagrams of this project
  • ~/Hub/ The scripts for the Raspberry Pi/Hub system to server requests from user & nodes
  • ~/Node/ The arduino program to query the Hub for action information.
  • ~/Testing Virtual devices & other scripts used for testing code/systems
  • .gitignore SELF EXPLANATORY
  • README.md SELF EXPLANATORY

INSTALLATION

Installation occurs over 3 parts. Please use their respective installation documents

HARDWARE SETUP

Changed: do not trust instructions

  • Make sure hardware works individually (See diagrams below for specifics).
  • Connect all devices to network and assemble curtain.

NOTES

INSTALLED EXTERNAL PACKAGES

  • postgresdb
  • python3.10:
    • requests
    • Flask
    • Flask-Cors
    • psycopg2
    • paho-mqtt
    • SQLAlchemy
    • astral==1.10.1

DESIGN DECISIONS

  • Options precedence is selected High -> Low from Curtain -> Home (because I am specifying that a specific item has precendence over a more general category).
  • Events precedence is selected High -> Low from Home -> Curtain, as an event for an area includes more specific items in that area

CONSIDERED FUTURE ADDITIONS

  • 1. Google Calendar Event Setter
  • 2. Thermostat & light level integration (if it's cold & dark outside then close curtains for better insolation (and vice versa))
  • 3. Who Is Home (ping Android phones to see if person is on local network) closing/opening
  • 4. Mobile App
  • 5. WearOS App

created by: MPZinke on 08.20.2018

edited by: MPZinke on 2020.12.28 to actually make it a README instead of a text file.

Remember that you're making this at your own accord and I take no responsibility for any mistakes or problems that may arise.

edited by: MPZinke on 2023.05.03 to use MQTT.


Appendix