Coder Social home page Coder Social logo

mycroftai / mycroft-timer Goto Github PK

View Code? Open in Web Editor NEW
7.0 8.0 31.0 902 KB

Mycroft AI official Timer Skill - set multiple named timers

Home Page: https://mycroft.ai/skills

License: Apache License 2.0

Python 71.62% Gherkin 17.51% QML 10.88%
mycroftai mycroft-skill mycroft timers hacktoberfest

mycroft-timer's Introduction

Timer

Set named timers for cooking, watering plants, brewing tea and more.

Code style: black

About

Use Mycroft when your hands are messy or you need more that the one timer in your kitchen. Multiple timers are easy to set and track with conversational interactions.

On a Mark 1 you'll see visual feedback as the timer runs, and you can use the top button to stop the beeping once a timer expires.

Examples

  • "Start a timer for 30 seconds"
  • "Set a timer for 1 minute"
  • "Set a timer for 3 hours called turkey"
  • "Start a timer" (will be prompted)
  • "Cancel the timer"
  • "How long is left on the timer?"
  • "How long is left on the turkey timer?"
  • "Mute the timer" (once triggered)

Credits

Mycroft AI (@MycroftAI)

Category

Daily

Tags

#timer #kitchen-timer

mycroft-timer's People

Contributors

aiix avatar cbxbiker61 avatar chrisveilleux avatar craigmaloney avatar dave-esch avatar dschweppe avatar e-gor avatar f-e-l-i-x avatar forslund avatar gras64 avatar kathyreid avatar krisgesling avatar learnedvector avatar luke5sky avatar matthewscholefield avatar ndato avatar penrods avatar thorstenmueller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mycroft-timer's Issues

60 minutes

Testing MycroftAI/mycroft-core#911 I noticed that the skill doesn't accept 60 minutes as a time. Instead it fails silently.

The exception ValueError: minute must be in 0..59 is logged.

Since a user uses this wording (and it's not too strange really) I think it should be supported.

[WIP] Adding interval feature to timer

Overview

  • Would like to ability to set a timer to beep at every time interval (e.g. set a timer for every 60 seconds)
  • For now the timer will run indefinitely until mycroft is told to stop the timer

Weird visuals after timer finishes

The blinking eyes and elapsed time on the mouth update super slow on my device. If I remember correctly, it's not supposed to look like this. At first I got confused and thought it was cycling through timers I had set.

Here's a video

timer set for null minutes.

when I set a timer it gives no error, it just returns: "timer is set for null minutes" and actually no timer is set.
using default Google stt
language: "de-de"
no other changes since fresh install

did I miss something?

Show timer on faceplate

Set a 3 minute timer
Would be nice to have it show the countdown on the faceplate and maybe cycle through if there are multiple.

Add Stopwatch functionality

Feature suggestion: emulate the basic functions of a typical hand-held stop watch: begin timing, stop timing, reset timing, and mark time without stopping time (often labeled "lap" or "split"). Perhaps the face display becomes the face of a stopwatch while performing this skill. Optional periodic interval announcements.

For a more science-y flavor, after Mycroft begins timing, he could say something like " T zero marked at 11:34 UTC, and counting." And for more science-y value, the absolute time of beginning and ending should be stored, as well as interval time marks (or offsets from beginning), even after the stop or reset is completed. That little data package should be made exportable, perhaps with a brief descriptive note.

I could see this as a separate skill, but I could also see that managing the distinctions in vocab might be better done if side by side.

Add configurable timer beep

It would be great for people to be able to select from a few timer beep options, or even add their own sound file to use instead.

This should be configurable from the Skill settings.

An Error occurred while processing a request in Timer Skill

Mycroft randomly says "An Error occurred while processing a request in Timer Skill". This usually happens when some other unrelated Request is being handled, for example asking for the weather.

Running Mycroft 20.8.1 on a Raspberry Pi 4 (Buster).
I'll try to catch the debug messages from the cli-client.

Only trigger wakeword event handler if timer is active/expired

Is your feature request related to a problem? Please describe.
The Timer Skill has an event handler to react any time the wake word is detected.

        self.add_event("recognizer_loop:wakeword", self.handle_wake_word_detected)

The purpose of this is to check if an alarm is currently expired and beeping - if so, it doesn't play the beep while the mic is active.

This makes sense for the times when you have a timer beeping. But isn't needed if a timer isn't active.

It's a very minor bit of code that runs, however it has been raised by numerous people as a red herring for other issues because it logs a message that it's doing something.

Describe the solution you'd like
Is it worth enabling and disabling this event handler when a Timer is expired and cleared?

Describe alternatives you've considered
Could switch the log message to DEBUG which would reduce the number of people that see it. But it's also code that doesn't need to be run 95% of the time.

Expiry of a named timer should always announce the name

If a timer is explicitly given a name when it's requested, then the expiration dialog of the timer should (I would think) always state that name. Currently the logic in build_expiration_announcement_dialog() only adds the name if there is more than one concurrent timer running.

Cannot set a timer

Reliably getting this error with "hey mycroft, set a timer for 10 minutes." Mycroft 18.2.13:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/mycroft_core-18.2.13-py3.5.egg/mycroft/util/lang/format_en.py", line 292, in pronounce_number_en
    last = number_names[int(_num[2:4])]
ValueError: invalid literal for int() with base 10: '.0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/mycroft_core-18.2.13-py3.5.egg/mycroft/skills/core.py", line 646, in wrapper
    handler(message)
  File "/config/mycroft/skills/mycroft-timer.mycroftai/__init__.py", line 171, in handle_start_timer
    timer_name = nice_duration(self, secs, lang=self.lang)
  File "/config/mycroft/skills/mycroft-timer.mycroftai/__init__.py", line 697, in nice_duration
    out += pronounce_number(minutes, lang) + " " + self.translate(
  File "/usr/local/lib/python3.5/dist-packages/mycroft_core-18.2.13-py3.5.egg/mycroft/util/format.py", line 276, in pronounce_number
    scientific=scientific)
  File "/usr/local/lib/python3.5/dist-packages/mycroft_core-18.2.13-py3.5.egg/mycroft/util/lang/format_en.py", line 300, in pronounce_number_en
    print('Exception in pronounce_number_en' + e)
TypeError: Can't convert 'ValueError' object to str implicitly

Create 3 minute timer

create a 3 minute timer

How much time is left on the timer

There is 2 minutes left on the create a 3 minute timer

Escalation of unacknowledged timer expiration enhancement

Currently, if timer remains unacknowledged after expiration, every 30 seconds we hear the timer alarm sound replay. This is good.

Even better: have skill settings for up to N re-notifications (with reasonable default of say, 100), and have escalated notifications options include: increase volume and replay sound, or mycroft speak "Your attention, please: the timer set for X minutes has expired.", and lastly send SMS message notification with text of spoken notification.

Picroft hanging up and overheating

When activating the "timer" function on Picroft (RPi3B) with the words "Mycroft set the timer for one minute", Mycroft responds with "Timer started for one minute" . At that point the "Skills" "Debug" goes into a continuous loop, Mycroft has hanged and will not respond to further commands. A thermometer icon appears after a minute or so, and the CPU heatsink actually feels hot. Rebooting Picroft restores normal function responding to voice commands.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.