mycroftai / mycroft-timer Goto Github PK
View Code? Open in Web Editor NEWMycroft AI official Timer Skill - set multiple named timers
Home Page: https://mycroft.ai/skills
License: Apache License 2.0
Mycroft AI official Timer Skill - set multiple named timers
Home Page: https://mycroft.ai/skills
License: Apache License 2.0
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.
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.
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.
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
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.
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.
I tried setting up the timer in mycroft core engine with 15 minutes, 45 minutes, and 30 minutes. After that, I always got 3 responses from the engine saying "the timer minutes is up" whenever I start mycroft-core.
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.
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.
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.
https://github.com/MycroftAI/mycroft-timer/blob/master/__init__.py#L201
I don't see duration
defined in this function, no nonlocal, global or self reference either.
I suspect it was copied from something like this https://github.com/MycroftAI/mycroft-timer/blob/master/__init__.py#L167-L168
In which case, intent['duration']
should be used.
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
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.
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.