Lakitna / Onaeri

The Onaeri platform unspecific API for sleep improvement with smart lights
MIT License
0 stars 1 forks source link

To do for v1.0.0 #1

Open Lakitna opened 7 years ago

Lakitna commented 7 years ago

To do for major version 1

And finally do:

Lakitna commented 7 years ago

Commit a4ed1e11f3e0370341f2c630c41993633d70c800: Changed deviationData from linear to exponential decay using function y = -0.0001x^3+100 for 0 <= x <= 99 Changed deviationDuration in settings/Template.py to 45 minutes

Lakitna commented 7 years ago

2 :

Removed automaticStateChange from settings/Template.py and cycle.py Added automaticPowerOff to settings/Template.py and cycle.py Added automaticPowerOn to settings/Template.py and cycle.py Added validation for new settings

Lakitna commented 7 years ago

3 :

Added automatic program restart on time defined in Global settings. I noticed that sometimes I needed to restart the program because of network changes/issues. For example a few days ago the local IP of the Gateway suddenly changed and the program was stuck in an infinite loop of timeouts. By daily restarting the program I hope to solve this.

Later I moved this from the API into the platform-specific wrapper.

I also added logging to this branch, because the automatic restart allowed me to easily split the log files into daily files. Adding logging also removed some print functions from helper.py so I bumped to v0.2.0

Adding the logging now also allows me to see if the program actually restarts at the correct time and the logging summary allows me to see the performance of the program a lot better.

Lakitna commented 6 years ago

Commit fc344f52fbfea07587a869477d8425199e9945c5: Restructured settings/Global.py and settings/Template.py

Lakitna commented 6 years ago

4 :

Make use of userWindDownTime to alert the user via the lamps that it is almost time for bed. This only works for cycles with more than one lamp.

By turning off about half (all uneven) lamps the user should see that it's almost time for bed.

In this branch, I also made it so that every lamp has its own observer instead of every cycle. this makes things a lot more stable.

Lakitna commented 6 years ago

5 :

Overhaul logger to output more meaningful data and/or in a more meaningful way.

This completes the following:

Lakitna commented 6 years ago

8 :

Changes behaviour of deviation by only applying it during the evening.

Introduces dynamic settings. These settings can be changed during runtime using the normal controls. They aim to be invisible in their use and work on every lamp separately.

Introduces cycle anatomy to the lookup class. This allows the program to easily see if a timecode is during the users morning, day, evening, or night.

Makes duration of deviation cycle dynamic. Deviation now always lasts until the lamps go off. If Deviation is triggered shortly before a lamp goes off this lamp will simply go off later.

Introduces support for unorthodox sleep cycles by supporting 0-hour rollover on all 4 stages.

Lakitna commented 6 years ago

10 :

Dynamic settings now also store what the lamp is capable of in three booleans: dim, temp, and color. These are used to prevent updates the lamp can't handle.

This PR also adds support for color bulbs.

Lakitna commented 6 years ago

11 :

Introduces the scheduler. This is used to schedule things like log file cleanup.

Closes the following things: