SleepMonitor
Sleep Monitor

This is a simple project that uses Arduino and a Linux-based Single-Board computer to monitor ambient variables that influence your sleep quality. With this information the system can send alarms with insight about your sleeping ambient in order to improve it.

Table of Contents

Getting Started

This is a list of things you will need in order to use this code

First of all, you need to install the software in the Arduino. You can do this in any way you prefer (IDE or console).

The code that must be installed is unifiend_sensors_sm.ino. Remember to have the circuit configuration as shown before. Otherwise you will need to change the code.

After that you will need to connect via USB your Arduino to your SBC.

Usage

Now to the interesting part: how do you use this?

First, we must pay attention to the IP direction and the port on which the app is running. This will route us to the project from any local network connected device.

You must learn, by the tool of your choice (we recommend net-tools), your IP direction in your local network.

After that you must run two commands (from the project venv):

export FLASK_APP=hello.py

flask run --host=0.0.0.0

This will allow you to use the project in your local network: you will need to access, from any local network connected device, the IP <SBC-IP>:5000, which will show you the project working.

Home Page

Sample home page

The first thing you can do is see the actual state of the environment. The colour of the value representing each value tells you how ideal is that value for sleeping

Sample home page with graphs

You can also see three tables that show you a history of all three variables. They get generated when you ask for the last N registers.

Reports

You can also create your own reports based on dates from a time period you select.

Sample report configuration page

After that, on another page, you will receive a report which you can later download if you wish so.

Sample report

Configure

In order to receive emails with your report after every sleep session you must register the sleeping ranges for every day and the email you want to have the email with the report sent.

Sample config page

Five minutes after your sleep session is over you will receive an email with the report

Sample email page

Contributors

This project exists thanks to all the people who contribute.

License

[MIT](LICENSE)