Re: simple talking clock / reminder for when monitor is off and it is dark
thanks very much to all. i almst missed this as it didn't show uyp in my inbox. it sounds like there exist things that say the time or can be made to. then i can use cron to run it or at for a one-off. i have beep turned off [and currently pulseaudio purged] but videos play sound with no problem so great. On 3/22/22, Will Mengarini wrote: > * Samuel Wales [22-03/20=Su 23:03 -0700]: >> [...] i want debian to tell me the time at certain times. > > Nobody has yet mentioned the festival package, which is a full > text-to-speech system. Once you have that installed, you can use > cron or at jobs to speak whatever you want at specific times. > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: simple talking clock / reminder for when monitor is off and it is dark
* Samuel Wales [22-03/20=Su 23:03 -0700]: > [...] i want debian to tell me the time at certain times. Nobody has yet mentioned the festival package, which is a full text-to-speech system. Once you have that installed, you can use cron or at jobs to speak whatever you want at specific times.
Re: simple talking clock / reminder for when monitor is off and it is dark
On Sun, 20 Mar 2022, Samuel Wales wrote: i want debian to tell me the time at certain times. for example tonight i have to take medicine at 2:40 am. I second the suggestions of at and cron. If you want a one-off reminder, use at. If you want a regular reminder use cron. Cron has a lot of flexibility in its scheduling. For the actual saying of the time, you could use the saytime package. I've not used it in many, many years, but I see that it's still in Debian and it uses sox so it should still work. HTH, Geoff.
Re: simple talking clock / reminder for when monitor is off and it is dark
On Sun, 20 Mar 2022 23:03:52 -0700 Samuel Wales wrote: > i use slock and turn off monitor with ddccontrol. I use the monitors attached to my desktop for sound. I find that when they are shut off, either manually or by the computer's power management software, sound ceases to work (unlike my laptops). You might be affected by this. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
Re: simple talking clock / reminder for when monitor is off and it is dark
On Mon, Mar 21, 2022 at 01:21:19PM -0300, Chris Mitchell wrote: > Personally, I would use a custom systemd timer unit for this. Systemd > is already running most of your system, and it offers a scheduling > syntax that is (AFAIK) more flexible than cron's, and (IMHO) much > easier to read. For example "Every day, once an hour, on the hour, but > only between midnight and 07:00 (inclusive)" would be: > OnCalendar=00..07:00 In crontab(5), that would be: 0 0-7 * * * /your/command I'm not familiar with systemd timers, so maybe what you say is true, about them being more flexible, but in this specific example, crontab is perfectly capable of doing the job. The biggest thing to be aware of with crontab/at jobs, and I would presume with systemd timer jobs as well, is that the commands are run in a minimalist environment inherited from the cron daemon (or, I assume, from systemd). Some of the things you're accustomed to having in your interactive environment won't be available. Jobs won't run with a controlling terminal, nor with an X $DISPLAY variable. Make sure you write your scripts/commands with those limitations in mind. For the OP's question, what's really needed is access to the sound system. I'm not sure what happens if a job fires after you've booted but before you've ever logged in, or after you've logged in and then logged out. Do you still have access to the sound system without an active login session? These are the kinds of things you'd either need to test, or research.
Re: simple talking clock / reminder for when monitor is off and it is dark
On Sun, 20 Mar 2022 23:03:52 -0700 Samuel Wales wrote: > i have to have all lights and monitors off at night. but i have to > know the time so i can take medicine. > > i use slock and turn off monitor with ddccontrol. this might turn off > mouse and keyboard; i wouild have to check. > > i want debian to tell me the time at certain times. for example > tonight i have to take medicine at 2:40 am. > > here are ideas: > > - tell me time when i right click [kb much less accessible] > - tell me at a prespecified time like 2.40 am > - tell me the following hours: midnight, 1 am, 2am > > any would be ok i think. There are a number of ways you could approach this, depending largely on whether you want the simplest way to get a reminder at one specific time vs a flexible talking reminder system. Personally, I would use a custom systemd timer unit for this. Systemd is already running most of your system, and it offers a scheduling syntax that is (AFAIK) more flexible than cron's, and (IMHO) much easier to read. For example "Every day, once an hour, on the hour, but only between midnight and 07:00 (inclusive)" would be: OnCalendar=00..07:00 The timer unit in turn triggers a service unit, which can run a command such as `aplay /home/sam/medicine.wav` like Dan's example, if you want a single-purpose pre-recorded message. Or you could use a command like `espeak-ng "It is now $(date +%R)"` so it'll simply announce the current time whenever it's triggered, thus giving you a general-purpose talking clock. Note that if you make the timer/service unit pair "system" units (in /etc/systemd/system), they'll run (as root) as long as the machine is up and running. If you make them "user" units (in ~/.config/systemd/user/), by default they'll run only when you're logged in. If you want to have user units run when the user is not logged in, the systemd terminology for that is "enable lingering". If you're not familiar with the syntax of systemd unit files, there is a bit of a learning curve, but I'd bet that if you can script in Bash, it won't take you long to get to the point where you can write a minimal timer and service unit pair for a job like this. Cheers! -Chris
Re: simple talking clock / reminder for when monitor is off and it is dark
Samuel Wales wrote: > i have to have all lights and monitors off at night. but i have to > know the time so i can take medicine. > > i want debian to tell me the time at certain times. for example > tonight i have to take medicine at 2:40 am. > > here are ideas: > > - tell me time when i right click [kb much less accessible] > - tell me at a prespecified time like 2.40 am > - tell me the following hours: midnight, 1 am, 2am > > any would be ok i think. > > ideas please? i am not going to be able to do anything particularly > complex, buyt i can script bash. The at command does exactly what you want. Record a sound file of your medicine alarm and... $ sudo apt install at $ at 0240 warning: commands will be executed using /bin/sh at> aplay /home/sam/medicine.wav at> ^D job 1 at Wed Mar 22 02:40:00 2022 Enter commands to be run at the particular time, and finish with a control-D (end of file). at will acknowledge with the job number and the time it will be run. Feel free to test with 'at now +2m' You can use atq to show you the queue of at jobs, and atrm to remove one. Now, if the alarm happens more often than that on a regular basis, you could use cron instead. cron is a little more complicated, but can handle things like "every Tuesday, on hours divisible by 4". -dsr-
simple talking clock / reminder for when monitor is off and it is dark
i have to have all lights and monitors off at night. but i have to know the time so i can take medicine. i use slock and turn off monitor with ddccontrol. this might turn off mouse and keyboard; i wouild have to check. i want debian to tell me the time at certain times. for example tonight i have to take medicine at 2:40 am. here are ideas: - tell me time when i right click [kb much less accessible] - tell me at a prespecified time like 2.40 am - tell me the following hours: midnight, 1 am, 2am any would be ok i think. beeping would be ok too, such as the ship's bell's system or just 1 extra beep added to the time for those 3 times. ideas please? i am not going to be able to do anything particularly complex, buyt i can script bash. [if aboe not possible this would be off topic but if anybody has off list a settable alarm or soething with a red light to see the time [blue or white no good and pwm no good], that would be a lasst resort. i don't hae a digita watch or cell phon e.]