sleepphasealarm

Support javascript command to execute as defined in scheduler 'js' configuration
master
Erik Andresen 2022-12-05 18:06:17 +01:00
parent 92efe31a4b
commit 946f77d7b5
3 changed files with 5 additions and 1 deletions

View File

@ -12,3 +12,4 @@
Add setting to disable scheduler alarm
0.10: Fix: Do not wake when falling asleep
0.11: Minor tweaks
0.12: Support javascript command to execute as defined in scheduler 'js' configuration

View File

@ -173,6 +173,9 @@ if (nextAlarmDate !== undefined) {
setTimeout(load, 1000);
} else if (measure && now >= minAlarm && swest === false) {
addLog(now, "alarm");
if (nextAlarmConfig.js) {
eval(nextAlarmConfig.js); // run nextAlarmConfig.js if set
}
buzz();
measure = false;
if (config.settings.disableAlarm) {

View File

@ -2,7 +2,7 @@
"id": "sleepphasealarm",
"name": "SleepPhaseAlarm",
"shortName": "SleepPhaseAlarm",
"version": "0.11",
"version": "0.12",
"description": "Uses the accelerometer to estimate sleep and wake states with the principle of Estimation of Stationary Sleep-segments (ESS, see https://ubicomp.eti.uni-siegen.de/home/datasets/ichi14/index.html.en). This app will read the next alarm from the alarm application and will wake you up to 30 minutes early at the best guessed time when you are almost already awake.",
"icon": "app.png",
"tags": "alarm",