Skip to content

timers-alarms-reminders#208

Open
FHLiang221 wants to merge 4 commits intoopenhome-dev:devfrom
FHLiang221:add-timers-alarms-reminders
Open

timers-alarms-reminders#208
FHLiang221 wants to merge 4 commits intoopenhome-dev:devfrom
FHLiang221:add-timers-alarms-reminders

Conversation

@FHLiang221
Copy link
Contributor

What does this Ability do?

A combined interactive + background daemon ability that handles timers, alarms, and reminders through natural voice interaction. Users can set, list, cancel, and delete events. A background watcher fires events when due — timers get a spoken notification, alarms play a sound, and reminders speak the message.

Suggested Trigger Words

  • set a timer
  • set an alarm
  • remind me
  • wake me up
  • timers
  • alarms
  • reminders
  • schedule

Type

  • New community Ability
  • Improvement to existing Ability
  • Bug fix
  • Documentation update

External APIs

  • No external APIs
  • Uses external API(s):

Testing

  • Tested in OpenHome Live Editor
  • All exit paths tested (said "stop", "exit", etc.)
  • Error scenarios tested (API down, bad input, etc.)

Checklist

  • Files are in community/timers-alarms-reminders/
  • main.py follows SDK pattern (extends MatchingCapability, has register_capability + call)
  • README.md included with description, suggested triggers, and setup
  • resume_normal_flow() called on every exit path
  • No print() — using editor_logging_handler
  • No hardcoded API keys — using placeholders
  • No blocked imports (redis, connection_manager, user_config)
  • No asyncio.sleep() or asyncio.create_task() — using session_tasks
  • Error handling on all external calls
  • Tested in OpenHome Live Editor

Anything else?

Includes a background.py background daemon that polls scheduled_events.json every 5 seconds and fires due events. Also writes upcoming_schedule.md so the Personality stays aware of what's scheduled. Includes alarm.mp3 for alarm sounds.

@FHLiang221 FHLiang221 requested a review from a team as a code owner March 13, 2026 07:45
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

🔀 Branch Merge Check

PR direction: add-timers-alarms-remindersdev

Passedadd-timers-alarms-remindersdev is a valid merge direction

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions github-actions bot added the community-ability Community-contributed ability label Mar 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

✅ Ability Validation Passed

📋 Validating: community/timers-alarms-reminders
  ✅ All checks passed!

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/timers-alarms-reminders/background.py community/timers-alarms-reminders/main.py

✅ Flake8 — Passed

✅ All checks passed!

@uzair401
Copy link
Contributor

Hey @FHLiang221, great work on the structure here — the LLM-routed intent classification is the right approach and the background watcher pattern is solid. Found a few things that need to be fixed before this can be approved though:

  1. The delete and list fast-paths in _process_request use hardcoded in lower substring matching before the LLM ever sees the input — a user saying "get rid of my alarm", "wipe everything", or "what have I got set" will silently fall through to the wrong action or no action. Remove both fast-paths entirely and let the LLM handle DELETE_ALL and LIST_EVENTS — it already does this correctly.

  2. QUIT_WORDS and EXIT_WORDS are missing too many natural spoken variants to be reliable. QUIT_WORDS is missing: "stop", "cancel", "forget it", "nevermind" (one word — common STT output), "never mind that", "leave it". EXIT_WORDS is missing: "no thanks", "I'm all set", "that'll do", "that's all", "we're good", "all good". Long-term fix: replace _wants_to_quit and _wants_to_exit with a single LLM classifier — "Is the user trying to stop or exit? Return YES or NO."

  3. The affirmatives set in _process_request is missing: "absolutely", "go ahead", "do it", "sounds good", "why not", "let's do it", "uh-huh", "please". Same fix — swap for an LLM classifier.

  4. _is_bare_trigger uses rstrip("s") to handle plurals, which silently corrupts any word ending in "s" that isn't a plural. Replace with an explicit set: {"alarm", "alarms", "timer", "timers", "reminder", "reminders", "schedule"} mapped to their canonical form.

  5. _build_system_prompt has no instruction for how QUESTION: responses should sound — that text goes directly into speak() and could come back with bullet points or markdown. Add to the prompt: "Questions must be plain spoken English — no bullet points, no markdown, no lists. One short question only, under 15 words."

  6. _handle_list can produce 50–70 words in one unbroken sentence when 4–5 events are scheduled. Cap the spoken summary at 3 items and append "and X more" for the rest.

  7. "Done. Your %s %s has been cancelled." — word order sounds unnatural on TTS. Change to "Done. Your %s %s is cancelled." — drops "has been", cleaner output.

  8. "Quitting ability." appears three times in first_setup — robotic, leaks implementation detail. Change to "All done." consistently.

  9. "All done. Handing you back.""handing you back" is a technical phrase users don't expect to hear. Change to "All done.".

  10. "I didn't catch that. You can set timers, alarms, or reminders. Just tell me what you need." — 20 words, reads like a manual. Change to "Didn't catch that — try saying something like 'set a timer for 10 minutes'." — gives a concrete example instead of a category list.

  11. "I asked too many questions. Let's start over — just tell me what you need." — exposes internal loop logic to the user. Change to "I'm having trouble with that one. Could you try saying it a different way?"

  12. Both error handlers say "Something went wrong. Please try again." — fine for length but offers no path forward on a voice device. Change to "Sorry, something went wrong. Try saying your request again."

Copy link
Contributor

@uzair401 uzair401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the issues explained in the comments above, and once resolved I'll take another look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants