Skip to content

Latest commit

 

History

History
278 lines (202 loc) · 8.49 KB

README.md

File metadata and controls

278 lines (202 loc) · 8.49 KB

Contributors Forks Stargazers Issues


Logo

SmartSleep API

An IoT program for a smart bed device.
Explore the docs »

Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

"Smart Sleep" helps its users to get the perfect sleep, so they can relax and be full of energy in the morning. It's not just a product, it's a lifestyle that helps users keep up with the challenges of modern times. It's easy to use, adjusting to each user preferences and needs in real time.

Built With

Major frameworks/libraries used to bootstrap SmartSleep project:

Analysis document

Visit it here.

Interpretation and prioritization of requirements

(back to top)

Getting Started

Set up SmartSleep locally:

Prerequisites

  • Python v 3.6 or higher
  • Flask
    pip install Flask

Installation

  1. Clone the repo
    git clone https://github.com/SmartSleepIoT/SmartSleepCoding.git
  2. Install flask & python packages
    pip install -e

Run the project

From root directory type in a terminal:

  • Windows:
start-app.sh
  • Linux:
.\start-app.sh

(back to top)

Usage

  1. Create a new user account

    POST http://127.0.0.1:5000/auth/register?username=NAME&password=PASS

    ! Password must be at least 6 characters long, containing at least one upper letter and a digit.

  2. Login

    POST http://127.0.0.1:5000/auth/login?username=NAME&password=PASS
  3. Set up user preferences:

    • wake up mode

       POST http://127.0.0.1:5000/config/waking_mode?waking_mode=L

      waking_mode can be:

      • L - light
      • V - vibrations
      • S - sound
      • LVS - all of the above together
      • LV - light & vibrations
      • LS - light & sound
      • VS - vibrations & sound
    • desired temperature - in Celsius degrees

      POST http://127.0.0.1:5000/config/temp?temperature=22

    You can see your preferences using GET and delete them using DELETE

  4. Set is sleeping to true

    POST http://127.0.0.1:5000/config/start_to_sleep?sleep_now=True
  5. Set an alarm

    POST http://127.0.0.1:5000/config/wake_up_hour?wake_up_hour=09:45

    ! use 24-based hour format HH:MM
    You can get your next alarm time using GET and delete it using DELETE

  6. Enjoy our SmartSleep api - solving snoring, monitoring your sleep and get statistics for each night.

(back to top)

Roadmap

  • User Account

  • User can set up preferences

  • Determine and record sleep quality

    • Record breaths
    • Record HeartRate
    • Record Temperature
    • Determine sleep stages
  • Overnight statistics

  • Detect and solve snoring

  • Alarms for waking up

  • Determine best intervals for wake up

  • User can integrate 3rd party devices

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Nedelcu Radu - [email protected]

Project Link: https://github.com/SmartSleepIoT

(back to top)

Acknowledgments

Resources used:

(back to top)