My solution: convenient and reliable alarms
#1
Hello everybody.
Let me know, what you tink about this.

Alarms that are set in the Clocks App of (at least) Mobian are, as far as I can see, actually not reliable.
They do not go off, if the phone is in stand by mode for some time.
Sometimes they go off, when I wake up the phone, sometimes, when I unlock it, and sometimes they do not at all.
My first approach was to use a cronjob, that wakes the phone up, 1 minute before it is time for the alarm. Any (!) command executed by cron did the job. I used "ls".
This worked well and I used this solution for several days, until I decided, that the standard alarm tone is crap. And even worse, it will last precious seconds to find my glasses, unlock the phone, open the header and stop it.

No, I wake up with my favorit music, the phone is already unlocked and I am able to quit (if I wish) without using my glasses.
Here is, how it works.
You need to install cron and mplayer.
You create a cronjob that (1) unlocks your device and (2) starts mplayer in a kingscross session. mplayer will play every music you like.
cron will wake up your phone reliable, even after a long night. Your display remains dark.
To end this "alarm", you have to press the power button once, then either hit q, or p on the keyboard. This will quit, or pause mplayer.
As an alternative you can end kingscross. This is what I do, because I can do it without my glasses.
I hit the arrow icon to switch to task view, swipe to close and hit the fat red button on the right (indicating, mplayer is running in the terminal)
Yes, that are two to four key presses. More than in standard spy phones but less than necessary whith the standard alarm.

Here is, what has to be done before (you need basic knowlege of command line editors, cron, mplayer).
In Kingscross, or from a SSH session do:
sudo apt install cron
sudo apt install mplayer
crontab -e
## In the file, that opens, enter the following line

30 7 * * * loginctl unlock-session 1; DISPLAY=:0 /usr/bin/kgx -e "mplayer http://wdr-wdr5-live.icecast.wdr.de/wdr/...stream.mp3"

That's all.
At 7:30 on every weekday (30 7 * * * ), cron will now unlock the device in your name (loginctl unlock-session 1) and start kingscross (/usr/bin/kgx). Kingscross will execute mplayer and let it playback the german WDR5 info radio (-e "mplayer http://wdr-wdr5-live.icecast.wdr.de/wdr/...stream.mp3").
The mplayer manpages will tell you, how to set the initial volume and how to play your inividual playlist.
The cron manpages will tell you, how to configure "alarms" for working days, weekends etc.
  Reply


Messages In This Thread
My solution: convenient and reliable alarms - by derbaertigefrytz - 01-27-2021, 04:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Possible Solution for Microphone Not Working Ferriah 0 954 02-13-2023, 01:09 PM
Last Post: Ferriah
  Latest Reliable Mobian Build Confirmation Thread Katsujinken 5 2,681 09-27-2022, 08:41 AM
Last Post: Katsujinken
  alarms do not seem to work motox6 2 2,875 05-06-2021, 11:08 AM
Last Post: motox6

Forum Jump:


Users browsing this thread: 1 Guest(s)