Premise Reminders - looking for useful features

Motorola Premise

123

Senior Member
I've created a Reminder system that periodically reminds me (via speech) of current and upcoming events and tasks. If you have ideas about how such a system should work, I invite you to post your suggestions.

Here's how the current version works:

Three times a day, (morning, afternoon, and evening) a scheduled task announces the reminders applicable for that day. It refers to a master list of reminders (everything from holidays, birthdays, anniversaries, to trash day) and extracts all reminders that are applicable for the current day.

All reminders are in a central location (Media/Reminders).

Each reminder consists of a Message and a Time Filter.

A reminder's time filter consists of the following:
  • Year (All/2008/2009/etc)
  • Month (All/Jan/Feb/etc)
  • Day (All/1/2/3/etc)
  • Monday (true/false)
  • Tuesday(true/false)
  • ...
  • Sunday (true/false)
  • Period (All/Morning/Afternoon/Evening)
A reminder's default time filter setting is "all inclusive" and ensures the reminder is played every day. Changing any time parameter will narrow the reminder's "air time". For example, setting Month=September, Monday=true, and Period=Morning, will constrain the reminder to be played every Monday morning in September.

You can be forewarned an upcoming event by setting a reminder's AdvanceNotice property:
AdvanceNotice (None, 1, 1_3, 1_3_5, etc)
If you select "1_3_5" you will be forewarned of an upcoming event using the following pattern: 5, 3, and 1 day before the event occurs. You also create new patterns to suit your needs (i.e. 1_10_20_30, etc).

All eligible reminders are processed into a single text string. XML-based speech "hints" (emphasis and pauses) are included in string to help the Text-To-Speech function render the speech output. Here are two examples (without the XML hinting) for the same day:
Good Morning! There are two reminders this morning. One. It is Trash Day. Two. Advance Notice. In three days, It is Uncle Steve's birthday.
Good Evening! There is is only one reminder this evening. Advance Notice. In three days, It is Uncle Steve's birthday.

Future Features:
  • A scheduled task that runs on January 1st and automatically includes reminders for holidays and other events with movable dates (like Easter).
  • Birthday reminders could be automatically generated (at the beginning of the year) based on the individual's birth date. The resulting message will be more detailed and precise: "It is Uncle Steve's birthday. He is eighty-three years old."
  • Each reminder can have several messages. Instead of hearing "It is Trash Day" all the time, it can be one of several randomly-selected choices ("Don't forget to haul out the trash.", "Yep, it is garbage day again.", etc).
  • A reminder should have a reserved AdvanceNotice Message that permits you to create a phrase that sounds better (grammatically) when it is spoken as part of an Advance Notice.
  • Have other monitoring functions automatically add their own reminders to the master list. For example, a function that monitors furnace operation would add a "change air filter" reminder at the appropriate time.
 
Great idea!!!! I've implemented some of these features in the attached module (TalkingAlarm). Feel free to pillage any of the code.

-John
 

Attachments

  • TalkingAlarm_1.0.2.zip
    8.1 KB · Views: 35
Since Premise intergrates with the ELK (I think it does) then possibly have announcements when the system is disarmed and possibly by user (kids disarm on a school day it announces a reminder to do homework etc).

Lots of possibilites. Maybe I will have to try Premise if I ever get the time. Looks GREAT though and I havent even tried it.
 
Thanks for the Module John; I look forward to test-driving it!

Digger, yes there's a comprehensive driver available for the ELK M1. The example you provided is triggered by a security event so it need not be part of the Reminder system because it is unscheduled. However, it could be part of another service, perhaps some sort of master-list of generic messages for ad hoc events like 'do your homework', 'lights out time', 'enough with the Xbox; get out and play', etc. :) Hmmm, that'd be handy as well! Keep those suggestions coming!
 
I know I could use a reminder to take my blood pressure medicines, I have to take different pills 6 times a day and if I get involved in a project it is easy to forget one.
 
Ah! I didn't think of that.

After seeing John's TalkingAlarm, I realize that I should expand the system's scope from simple reminders to comprehensive "Announcements" that encompass all kinds of scheduled, or time-sensitive, events like:

Task
Put out the cat, haul out the trash, leave the yard gate unlocked, take meds, etc.

Birthday
Anniversary

Include the ability to provide a "Reference Date" so the system can calculate the elapsed time in years and present it in Numeric or Alphabetic format (i.e. "10" or "tenth"). So we can get "Billy is 8 years old today" and "It is Sandra and Mike's twelfth wedding anniversary."

Weather
I like this feature found in the TalkingAlarm; definitely a keeper!

Astronomical
Moon phases, celestial events like meteor showers, iridium flares, ISS overflights, etc

Appointment
Doctor, dentist, etc

General
A catchall category.

Headlines
Top news headlines.

The term "Reminder" would replace the term "AdvanceNotice" mentioned in my original description. If you ask to be forewarned of an upcoming Appointment, it will be announced as a reminder that you have an appointment in N days.

I've decided against multiple, randomly-selected messages since most events don't occur with sufficent frequency to cause boredom. I've also axed the idea of a reserved "AdvanceNotice" message ... I can live with stilted grammar.

So the basic architecture of the system is a central list of announcements where each one has an effectivity date and content category. Announcements can be manually created by the end-user (for Tasks, Appointments, Birthdays, etc) or automatically by various agents (for Weather, Astronomical, Headlines, etc). A scheduled task (three times a day) peruses the list, extracts whatever is applicable (filtered by time and potentially category), and reports it using text-to-speech. The pertinent announcements should be visible, as text, in Premise Browser and also available to be spoken on demand.
 
I've created a function to convert a number into words ... feed it "23" and it'll generate an ordinal value: "twenty third". This is an important tool needed to create messages like:
"Today is your sixth wedding anniversary! Congratulations!"
where "sixth" is the result of a calculated variable.

The actual message will probably look like:
"Today is your #YO wedding anniversary! Congratulations!"
where #YO is a variable indicating the calcualted value is in Years and in Ordinal format.

Given a Reference Date, the system can calculate the elapsed time and insert it in the variable. The variable can be:
#YO or #YN (Years, Ordinal/Numeric)
#MO or #MN (Months, Ordinal/Numeric)
#WO or #WN (Weeks, Ordinal/Numeric)
#DO or #DN (Days, Ordinal/Numeric)

You can also indicate if the Reference date is the "Start" or "Finish" of a period. You'd use "Start" when calculating elapsed time for birthdays and anniversaries. Use "Finish" to calculate the time remaining until an important event. For example:
"Only 20 more days until our vacation!"
would be represented as:
"Only #DN more days until our vacation!"
where RefDate=12/12/2008 and RefDateType=Finish

Combine this with a Reminder pattern of "1_3_5_15_20" and you have a great deal of control over when you are notified of upcoming events ... without having to do any date math or coding.

I'm also toying with the idea of variable that will insert the current year/month/day/weekday/time in the message ... something like:
"Today is Tuesday, only 2 days to go until the root canal!"
"Today is !W, only #DN days to go until the root canal!"


Your thoughts? Suggestions?
 
(Revised August 15th)
I've eliminated the syntax's terseness and made it much more readable.

Braces {} indicate a date code.
Brackets [] indicate embedded VBScript code.

There are two formatting codes:
# indicates show the value as a number.
! indicates show the value as an ordinal position (i.e. rank)

All elapsed times are based on the difference between the current date and a supplied Reference Date.

Examples:
{years#} means calculate the elapsed time in years and show it in numeric format -> 19
{years!} means calculate the elapsed time in years and show it in ordinal format -> nineteenth
{year#} means show the current year in numeric format -> 2008
{year!} means show the current year in ordinal format -> two thousand eighth
{month#} means the current month as a number -> 10
{month!} means the current month as an ordinal position -> October (yeah, a bit of poetic license with the word "ordinal" in this case)
[Home.YardLight.Powerstate] will evaluate the expression and return the Yard Light's current state (true/false).

Examples of how the variables are used in a scheduled message:

INPUT: Today is your {years!} Wedding Anniversary! {years#} years and going strong!
OUTPUT: Today is your twelfth Wedding Anniversary! 12 years and going strong!

INPUT: Today is {month!} {day!}, and your {months!} car payment is due.
OUTPUT: Today is August twenty eighth, and your eleventh car payment is due.

INPUT: Happy {years!} Birthday! Did you know you are {days#} days old? Ouch!
OUTPUT: Happy thirty first Birthday! Did you know you are 11323 days old? Ouch!

INPUT: The porch light is at [round(Home.PorchLight.Brightness * 100)] per cent brightness.
OUTPUT: The porch light is at 75 per cent brightness.

Whew! That should be enough flexibility!
 
Back
Top