Table of Contents
"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.
Major frameworks/libraries used to bootstrap SmartSleep project:
Visit it here.
Set up SmartSleep locally:
- Python v 3.6 or higher
- Flask
pip install Flask
- Clone the repo
git clone https://github.com/SmartSleepIoT/SmartSleepCoding.git
- Install flask & python packages
pip install -e
From root directory type in a terminal:
- Windows:
start-app.sh
- Linux:
.\start-app.sh
-
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.
-
Login
POST http://127.0.0.1:5000/auth/login?username=NAME&password=PASS
-
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 usingDELETE
-
-
Set is sleeping to true
POST http://127.0.0.1:5000/config/start_to_sleep?sleep_now=True
-
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 usingGET
and delete it usingDELETE
-
Enjoy our SmartSleep api - solving snoring, monitoring your sleep and get statistics for each night.
-
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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Nedelcu Radu - [email protected]
Project Link: https://github.com/SmartSleepIoT
Resources used: