Commit Graph

2686 Commits (10b8e93b7419126864d9bab2effbe813962865ee)

Author SHA1 Message Date
Åke Forslund 555478c33f Add self.root_dir to readthedocs documentation 2020-01-03 10:45:39 +01:00
Sylvia van Os 555c2f897b
Fix documentation mistake 2019-12-26 22:28:58 +01:00
devs-mycroft cafffd8b62 Version bump from 19.8.4 to 19.8.5 2019-12-20 12:20:50 +00:00
Åke Forslund 9628a5b5f4 Fix settingsmeta upload start race condition 2019-12-19 10:03:36 +01:00
Åke Forslund d45edcd613 Add priority skill's settingsmeta 2019-12-19 10:03:14 +01:00
Åke ac874ecc88
Merge pull request #2432 from ChanceNCounter/time-resolution-cleanup
clean up nice_duration handler
2019-12-18 20:41:47 +01:00
Åke 184508a020
Merge pull request #2370 from forslund/feature/settingsmeta-queue
Stabilize skill settings download
2019-12-18 12:41:16 +01:00
Åke Forslund ec1d35d1b7 Fixes from code review
- Use reload status directly instead of instance check
- Move manifest posting to start_upload method
2019-12-18 12:05:40 +01:00
Åke Forslund 1e7314d7ca Update skill manifest when a skill is removed
When skills are removed the skills manifest is updated using msm and
then sent to the backend.
2019-12-18 12:05:40 +01:00
Åke Forslund 146a8c1434 Get skill_gid more reliably
If skill directory doesn't exist in current cache try to fetch a new
copy.
2019-12-18 12:05:40 +01:00
Åke Forslund f5685bde96 Simplify
Skip the queue thread, do upload in series with skill load/reload.
2019-12-18 12:05:40 +01:00
Åke Forslund fa1bdfdda7 Send manifest before starting settingsmeta upload.
Minor restructuring moving the enqueuing of settingsmeta upload to after
updating the skills manifest.
2019-12-18 12:05:40 +01:00
Åke Forslund c11c9756ce Add queue system to send settingsmeta
The queue will store all settingsmeta upload calls and execute them
after pairing can be verified.

Starts settings download after upload has started. When settings meta upload
has started for all skills the skill download process is triggered.

This guarantees that the settingsmeta skill_gid has been populated
properly before skills try to figure out which part of the skills data
belongs to them.

Add docstrings to upload queue
2019-12-18 12:04:57 +01:00
ChanceNCounter 4e8db9c860 clean up nice_duration handler
* Replace integer values with enum values for clarity
* Simplify exception thrown on incompatible input
* Pythonify (and de-Chanceify) zero-output logic
2019-12-17 05:10:34 -08:00
JarbasAI 46af6fcff2
mark1/fix display big images
https://github.com/MycroftAI/enclosure-mark1/blob/master/protocols.txt#L141

according to the spec there is a bug
2019-12-17 01:34:08 +00:00
Philipp Fischbeck 3f73fb50af
Fix typo in MycroftSkill documentation
Change "https://https://" to "https://"
2019-12-15 16:42:41 +01:00
Åke Forslund 308b0c5111 Fix incorrect porcupine shutdown and Exception
Flagged by flake8 after merge
2019-12-12 17:51:47 +01:00
Åke 3315d98582
Merge pull request #2139 from alumae/feature/issue-1491
Add support for the Porcupine wakeword engine.
2019-12-12 16:59:12 +01:00
Åke 2263fab0b6
Merge pull request #2418 from forslund/bugfix/missing-hotword-parts
Make sure hotword entry has phonemes and threshold
2019-12-09 20:24:58 +01:00
Åke Forslund 2697cb8d56 Create simple load_dialogs function
This function replaces the class since the class doesn't provide any
functionality
2019-12-09 09:35:01 +01:00
Åke Forslund 2fa81aac52 Disregard DEBUG entry in filter
The DEBUG, has been filtered by default. This will disregard the DEBUG
filter completely since the same effect can be achieved by setting the
debug level using ":log level debug".
2019-12-09 08:27:27 +01:00
Åke Forslund f9585e47ba Clean up of create_wake_word_recognizer
- Proper docstring
- " -> '
2019-12-07 20:22:20 +01:00
Åke Forslund 2c2c933832 Make sure hotword entry has phonemes and threshold
If hotword entry is missing either add from old listener location
2019-12-07 20:18:47 +01:00
Åke 24071cdea0
Merge pull request #2416 from MycroftAI/feature/gui-server-modern-tornado
Workaround for gui connection
2019-12-07 15:08:08 +01:00
Åke d25560a053
Merge pull request #2413 from ChanceNCounter/bug/extractnumber-en(#2110)
Fix extractnumber_en failure on "%" (#2110)
2019-12-07 09:29:05 +01:00
devs-mycroft 599fc57690 Version bump from 19.8.3 to 19.8.4 2019-12-06 11:30:19 +00:00
ChanceNCounter 5eb6b51eb2 Fix extractnumber_en failure on "%" (#2110)
Closes MycroftAI/mycroft-core#2110
2019-12-05 14:19:37 -08:00
domcross 7af161fd03 Fallback to 'en-us' when resource fails
When mycroft_skill.find_resource fails to load a resource for self.lang
fall back to lang 'en-us'
as most skills/resources are available in english by default.

==== Fixed Issues ====
2019-12-05 10:21:54 +01:00
Steve Penrod 2f4b2ccf48 Remove signal.SIGINT handler from simple CLI
At some point during refactoring the ability to hit Ctrl+C to exit the basic CLI was lost.

The signal.SIGINT handler is needed by the graphical GUI, but it
interfered with the use of sys.stdin.readline() in the simple CLI.
Rearrange the installation of the handler for only the GUI.

To test, run:
   mycroft-cli-client --simple
Then hit Ctrl+C.  Before this change nothing happens (you just see the "^C" printed out).  After the change it exits as expected.
2019-12-03 20:07:19 +01:00
Åke 21699294c7
Merge pull request #2395 from forslund/bugfix/hotword-loading
Fix using of hotword structure for custom wakeword
2019-12-03 14:19:55 +01:00
Åke e7d9e8be1b
Merge pull request #2402 from maxbachmann/cleanup
Improve speed of pronounce_number_en
2019-11-29 17:07:59 +01:00
maxbachmann 4174689906 improve runtime 2019-11-29 16:56:36 +01:00
Åke e6385720b3
Merge pull request #2396 from maxbachmann/python2cleanup
cleanup python2 unicode
2019-11-27 08:46:20 +01:00
Åke e78a9730e1
Merge pull request #2386 from maxbachmann/dev
Add more time idioms (half past, etc.)
2019-11-27 08:41:02 +01:00
maxbachmann 87220ee85c add some more time idioms 2019-11-27 01:53:23 +01:00
maxbachmann 7a48297132 cleanup python2 unicode 2019-11-26 23:09:32 +01:00
Åke Forslund 04e9812992 Asyncio updates for gui connections
- Workaround, ensure asyncio event loop is launched on each thread.
2019-11-26 14:21:49 +01:00
Åke 6bd6441da2
Merge pull request #2393 from MycroftAI/feature/geolocation-api
Feature/geolocation api
2019-11-26 11:10:05 +01:00
Åke Forslund 026f769028 Fix using of hotword structure for custom wakeword
Fixes overriding settings from listener config
2019-11-26 09:07:15 +01:00
Chris Veilleux db2fc40e3c Merge remote-tracking branch 'remotes/origin/dev' into feature/geolocation-api 2019-11-22 13:33:54 -06:00
Christian Clauss a1ff3fb355 Upgrade from pycodestyle to flake8 2019-11-19 23:07:52 +01:00
Åke Forslund 5e90465267 Improve guessing if http fetch fails.
If the server doesn't support getting the http head for the feed a 501
may be generated the guess_mime function will in turn fail if the url
ends with "?arg=x" or similar. This does an extra parsing step trying to
remove such arguments.
2019-11-19 16:34:13 +01:00
Åke Forslund f44165d35d Add exception handler if mime fails 2019-11-19 05:36:16 +01:00
Åke 17840decd5
Merge pull request #2385 from mikewoudenberg/dev
Add rudimentary Dutch parsing support
2019-11-15 11:44:31 +01:00
devs-mycroft 0314a3f6d1 Version bump from 19.8.2 to 19.8.3 2019-11-14 07:54:10 +00:00
Mike Woudenberg cc5631c45f Adds rudimentary Dutch parsing support 2019-11-14 08:47:36 +01:00
Daniel Morse 3751add193 Move emission of recognizer_loop:wakeword
The message is now emitted directly after a wakeword is detected.
2019-11-11 15:13:56 +01:00
Åke f1327f0973
Merge pull request #2376 from forslund/bugfix/shutdown-on-skill-remove
Fix Shutdown of removed skills
2019-11-07 23:08:45 +01:00
Åke caf3341812
Merge pull request #2375 from forslund/bugfix/remove-all-events
Fix reference leak when using bus.remove_all_listeners
2019-11-07 23:08:27 +01:00
Steve Penrod 0b8f7f54a4 Remove unnecessary code
The check for "this" performed in the case of "this quarter of an hour"
was copy/pasted in a large checkin.  The change it made to
daySpecified made no difference since the or in the later code
looked for an unspecified absolute hour.  I can come up with no
senseable phrase that matches the conditions and couldn't even
create a nonsensical phrase that made a difference.

Since all of the existing unit tests pass without this code,
I'm going to just remove it.
2019-11-04 09:39:09 +01:00
Kris Gesling 0197a7ee39 frames to read must be greater than 0 2019-11-01 08:13:26 +01:00
Chris Veilleux 183649ac5e Merge remote-tracking branch 'remotes/origin/dev' into feature/geolocation-api 2019-10-31 13:11:58 -05:00
Åke Forslund 3e905165e6 Fix Shutdown of removed skills
Verify that skill directory exists before writing to ensure that the
shutdown method doesn't throw exception if a skill is unloaded due to
being removed.
2019-10-31 11:40:41 +01:00
Åke 024274a5ca
Merge pull request #2372 from forslund/feature/speech-error-handling
Speech client error handling
2019-10-31 10:01:45 +01:00
Åke Forslund 3aea18c7be fix remove_all_events
The threaded event emitter did not remove the wrapper mapping when
remove_all_events were called causing trailing references to objects.
2019-10-31 09:42:24 +01:00
Åke Forslund d4a7193fe8 Remove circular reference during skill shutdown
This cleans up the extra skills references making the ref count trigger
correctly.
2019-10-31 09:38:46 +01:00
Åke 5f1cc40d0e
Merge pull request #2374 from forslund/feature/tts-create-error-handling
Fallback to Mimic if launch of TTS fails
2019-10-29 14:03:43 +01:00
Åke Forslund 39a38bc641 Move send function away from __main__ file
This resolves the Runtime Warning "'mycroft.messagebus.send' found in sys.modules after import of package 'mycroft.messagebus', but prior to execution of 'mycroft.messagebus.send'; this may result in unpredictable behaviour"
2019-10-29 09:14:49 +01:00
Åke Forslund c8328526b1 Fallback to Mimic if launch of TTS fails
Logs the exception and fallsback to Mimic as TTS backend if there is an
issue with the selected TTS backend or if the choice is invalid.
2019-10-28 14:20:01 +01:00
Åke Forslund 8d4413db9c Update account id fetching
Account ID will now be refetched if invalid the first time.

This also adds some general exception handling to avoid client crashing due
to the servers invalid 204 response.
2019-10-26 09:35:03 +02:00
Åke Forslund 8bdeddb965 Catch and log errors starting up the speech client 2019-10-26 09:34:28 +02:00
Åke Forslund 741cc1c8db Fallback to default STT if loading fails
If a STT backend fails to load log the exception and fallback to the
MycroftSTT.
2019-10-26 09:30:07 +02:00
Åke Forslund 0811df3831 Don't load remote settings for send command 2019-10-25 14:04:23 +02:00
devs-mycroft a3e35d736b Version bump from 19.8.1 to 19.8.2 2019-10-21 13:51:34 +00:00
Åke f234354783
Merge pull request #2365 from forslund/bugfix/lock-mic-mute-unmute
Lock mic mute unmute
2019-10-20 14:12:53 +02:00
Åke 2c1367f6f8
Merge pull request #2368 from MycroftAI/feature/restart-mic
Feature/restart mic
2019-10-20 14:06:06 +02:00
Åke Forslund bc2bfb6c77 Ignore overflow errors as before 2019-10-20 09:48:52 +02:00
Åke Forslund 3da5dece0c Stop restarting mic after 20 attempts 2019-10-20 09:47:12 +02:00
Åke Forslund 149a236e30 Attemt to restart the mic if there's an IOError
If mic produces an IOError try to restart the microphone's input stream
to recover.
2019-10-20 09:01:17 +02:00
Åke Forslund 6597ccc398 Send listen flag for special picroft case as well 2019-10-18 17:16:55 +02:00
Åke Forslund 5d8c3c6c92 Minor cleanup of mic docstrings, etc 2019-10-18 12:19:45 +02:00
Åke Forslund 9f555015e7 Add lock to mute unmute of mic stream
This should alleviate a potential (or possibly an existing) problem if
mute is triggered while reading of the mic occurs.
2019-10-18 12:12:48 +02:00
Åke Forslund 4bf0e89fb5 Update docstrings to match behaviour 2019-10-17 11:33:25 +02:00
ChanceNCounter 738ba6cf00 edit for pep8 compliance (#15) 2019-10-17 11:07:51 +02:00
jarbasal 978ece53ca feat/ask_selection 2019-10-17 11:07:51 +02:00
Åke 324fe988aa
Merge pull request #2356 from ChanceNCounter/spanish-language-parsers
fix bug in isFractional_es and improve coverage
2019-10-14 16:04:57 +02:00
devs-mycroft 913f29d3d5 Version bump from 19.8.0 to 19.8.1 2019-10-10 13:56:15 +00:00
David Wagner ddad8d1569 Pass listen to end_audio() 2019-10-10 12:11:11 +00:00
David Wagner feac64b2b0 Add listen arg to other TTS classes 2019-10-10 12:09:50 +00:00
David Wagner d9523fd30f Pass listen to end_audio() 2019-10-10 11:54:58 +00:00
David Wagner e45f527af3 Default to False 2019-10-10 11:50:48 +00:00
Åke 88e8b661e7
Merge pull request #2351 from forslund/feature/listen-on-last
Send listen on last sentence of utterance
2019-10-08 14:51:53 +02:00
David Wagner 1a9a51fe56
Merge pull request #2354 from forslund/bugfix/settings-delitem
Add missing __delitem__ method
2019-10-07 10:44:48 -05:00
Kris Gesling ab860306d3
Merge pull request #2353 from MycroftAI/bugfix/tail_scheduling_events
Remove event before running event handler
2019-10-07 21:55:29 +09:30
Åke 8126bcafce
Merge pull request #2346 from ChanceNCounter/tests/util-parse-en
fix bug, redundancy in parse_en; improve coverage
2019-10-07 13:22:23 +02:00
ChanceNCounter 1c41e523ce fix bug in isFractional_es and improve coverage
- Fix: isFractional_es() parsed fractions incorrectly
- Update: earlier commit msg suggested another fix:
  - Month parsing not fixed
  - Several failing tests (skipped) document problem
  - TODO and an issue also created
- Substantially improve parse_es.py test coverage
- TODO or comment several found bugs
  - Many lines remain uncovered, incl possible bugs
2019-10-05 14:46:09 -07:00
Åke Forslund 24d6cf9ea0 Add missing __delitem__ method
The delitem method is apparently used, for example by the alarm skill
2019-10-04 20:43:46 +02:00
Åke Forslund 08d38dea75 Remove event before running event handler
Allow events to reschedule themselves. The reference is removed before
the handler is executed to not remove anything added by the handler.
2019-10-04 18:29:11 +02:00
Åke Forslund abf8a90f07 Add description of the playback thread loop 2019-10-04 15:14:56 +02:00
Åke Forslund 29db163a78 Move listen trigger to last chunk of sentence
If rendering a chunk of a sentence takes too long time, the audio queue
may run out and trigger the listening.

This moves the listening trigger to after the last chunk.
2019-10-04 15:09:45 +02:00
Åke 8ffad68251
Merge pull request #2347 from ChanceNCounter/extractnumber-es-fix-and-add-extractnumbers
Fix extractnumber_es, add extract_numbers_es
2019-10-04 08:46:03 +02:00
Åke 90ceaa3c88
Merge pull request #2342 from ChanceNCounter/fix/convert-mixed-fraction-param-default
add default value to nice_number param
2019-10-04 08:43:15 +02:00
ChanceNCounter 1107f5d6cc Fix extractnumber_es, add extract_numbers_es
- Fix bug causing extractnumber_es to return a sum instead of a list
- Add Spanish parser to extract_numbers and extract_number

==== Fixed Issues ====
Closes #2310

====  Tech Notes ====
Further obscures #2056: short_scale and ordinals parameters added to the
Spanish parsers, but they don't do anything. Present for compat only.
There is a TODO for this.

==== Localization Notes ====
It's all Spanish stuff!

This will require a native Spanish speaker to analyze the relationship
between extractnumber and isFractional, and determine why certain
fractions do not parse correctly. There is a TODO for this.
2019-10-03 17:11:39 -07:00
ChanceNCounter 16d6bf4b22 fix bug, redundancy in parse_en; improve coverage
- Remove unreachable conditions from parse_en:1122-1133
  - input string passed through clean_string() on line 763
  - articles stripped from input before line 1122
  - removed conditions relied on presence of "the" in input
- Improved test coverage on parse_en.py by approx 65 statements
  - Directly test certain helper functions which are difficult to
invoke indirectly
  - Add tests for certain missed conditions
  - Approx. 20 uncovered statements remain
2019-10-03 14:41:21 -07:00
Åke 15233f8929
Merge pull request #2336 from forslund/feature/load-skill-settings-once
Remove duplicate load of skill settings
2019-10-03 19:46:11 +02:00
Åke Forslund b480dda90f Clean up docstrings
Minor cleanup of docstrings in the files affected by the previous commit
2019-10-03 19:13:02 +02:00
Åke Forslund 46b0b94631 Don't go through FS when triggering listener.
This adds a separate handler for triggering listening on the
"mycroft.mic.listen" message
2019-10-03 19:12:56 +02:00
ChanceNCounter 8c50fe9700 add optional 'clock' param for displayed output
Add one more optional parameter: bool clock, always produces
digital clock-like output. "0h 3m" becomes "0:03:00".

Has no effect on resolutions YEARS or DAYS, and MINUTES won't print hrs.
2019-10-02 07:55:22 +02:00
ChanceNCounter 4253929d2c - make nice_duration handle years, datetimes, and ms
- Companion enum:
mycroft.util.format.TimeResolution
offers YEARS, DAYS, HOURS, MINUTES, SECONDS, or MILLISECONDS

- Will only return ms if MILLISECONDS is chosen. Default: SECONDS

- Update tests
2019-10-02 07:55:22 +02:00
ChanceNCounter 388d9afaa7 add default value to nice_number param
Add default value to nice_number & convert_mixed_fraction `denominator`

Add tests for convert_mixed_fraction
2019-10-01 06:55:44 -07:00
Kris Gesling ab04fe6b60
Merge pull request #2338 from forslund/bugfix/clear_once_events
Fix clearing of once events
2019-10-01 15:10:31 +09:30
Åke b298061ddc
Merge pull request #2289 from UltraCoderRU/dev
Add Yandex TTS support
2019-09-30 20:29:17 +02:00
Kirill Kirilenko 58931310e9 Add Yandex TTS support 2019-09-30 20:13:04 +02:00
Kirill Kirilenko 1faf7b2210 Add Yandex STT support 2019-09-30 17:38:36 +02:00
Åke Forslund 425feb0590 Store correct function for once events
The handler was always stored even when the event was a once event and
thus was wrapped in once_wrapper.

This handles the once correctly.
2019-09-30 13:31:53 +02:00
Åke 87a7821926
Merge pull request #2335 from ChanceNCounter/bug/day-after-tomorrow
Fixes index error in parse_en.extract_datetime()
2019-09-30 11:20:13 +02:00
Åke Forslund 8f50217ee9 Merge branch 'bug/day-after-tomorrow' of https://github.com/ChanceNCounter/mycroft-core into ChanceNCounter-bug/day-after-tomorrow 2019-09-30 11:00:12 +02:00
Åke Forslund 9254ee0229 Remove duplicate load of skill settings
Instead of loading skill settings from disk twice, a copy is made into the
_initial_settings member after load.
2019-09-29 18:39:07 +02:00
ChanceNCounter a44167a3a4 Fixes index error in parse_en.extract_datetime()
==== Fixed Issues ====
#2333

====  Tech Notes ====
extract_datetime("day after tomorrow") attempted to check the previous
word. This resulted in an index error. Fixed by introducing a nested
condition. Seems to have solved it.

A similar bug is present in other parts of this file, such as line 843.

I have also discovered a number of other oddities, but they may be
outside the scope of this issue. At least Mycroft can now extract from
"day after tomorrow."

==== Localization Notes ====
I haven't checked parsers for any other languages.
2019-09-28 14:31:59 -07:00
Chris Veilleux 364c3991e7 fixed a spelling error 2019-09-28 12:55:31 -05:00
Chris Veilleux eca875558a added log message and docstring to help demystify regex intent handling 2019-09-28 12:21:28 -05:00
Chris Veilleux f16989c2ec Add log messages that provide insight into the disambiguation behavior 2019-09-28 12:20:22 -05:00
Chris Veilleux 5980779e48 Refactored module level docstring and import ordering 2019-09-28 12:17:12 -05:00
David Wagner 86b6ef16e5 Log IOErrors 2019-09-27 22:25:54 +00:00
David Wagner 4536de7a06 Add Exception logging 2019-09-27 21:50:24 +00:00
Chris Veilleux dfd776cab9 add a geolocation api for things like time and weather in requested locations 2019-09-26 16:24:11 -05:00
Åke bf38812ddf
Merge pull request #2297 from ChanceNCounter/prevent-repeating-dialog-lines
Cycle through dialog files to avoid repeating the same line
2019-09-26 16:23:08 +02:00
ChanceNCounter 30bd84bc85 Astd minor fix in core.dialog
Assign hardcoded value from MustacheDialogRenderer.render() to variable.
Fix its value to properly accommodate short dialog files.

Remove superfluous check on lines 104-105 of mycroft.dialog.init

====  Tech Notes ====
The new dialog logic, which prevents Mycroft from repeating itself, uses
a list of recently-spoken lines from the skill's .dialog files.
The size of this list is capped, currently at 3. However, .dialog files
can be shorter than 3 entries. An offset is used to accommodate this.

In the previous commit, the offset was wrong. Now it's 2.

====  Documentation Notes ====
If presented with a .dialog file containing 4 or more entries,
Mycroft will avoid saying the same one for at least a few rounds. If the
dialog file contains only 3 entries, Mycroft will avoid saying the same
line twice in a row. If only 1-2 entries are present in a .dialog file,
Mycroft will just pick one and say it, without retaining a history.
2019-09-26 16:20:43 +02:00
ChanceNCounter 4c8ce58f8e When able, cycle lines in .dialog files
Attempt to use a different line each time a .dialog file is invoked.

====  Tech Notes ====
MustacheDialogRenderer:
  - Keep a running list of recently spoken lines (up to 3)
  - If there's more than one line in a dialog file, don't repeat lines
  - Pop lines from the list when full or when dialog file is running low

====  Documentation Notes ====
Consider encouraging skill authors to include multi-line .dialog files,
as this will help to give Mycroft a more natural feel
2019-09-26 16:20:43 +02:00
Åke 7c7d7f47bb
Merge pull request #2262 from KishCom/bugfix/marytts-config-issue#2127
Fix missing param when setting up MaryTTS and how it validates a conn…
2019-09-26 16:14:53 +02:00
Andrew Kish 1d2cabd421 Fix missing param when setting up MaryTTS and how it validates a connection 2019-09-26 16:11:02 +02:00
Åke d30c50e752
Merge pull request #2283 from forslund/refactor/config-properties
Replace config properties to simpler instances
2019-09-26 14:51:56 +02:00
David Wagner 6bf66bf1f3
Merge pull request #2326 from MycroftAI/feature/remove-ntp-reboot
Remove ntp sync reboot
2019-09-25 14:53:13 -05:00
David Wagner 7cb1ca7282 Remove unused methods 2019-09-25 10:58:51 -05:00
David Wagner b0c7d3072c Update text client parsing of mic_level file 2019-09-25 12:23:11 +02:00
David Wagner a66ec9388d Write mic level with mute 2019-09-25 11:54:22 +02:00
Åke f1a95e79cb
Merge pull request #2323 from forslund/bugfix/logline
Catch inspect error in logger
2019-09-25 07:53:02 +02:00
David Wagner 3fc389dbf3 Remove ntp sync reboot 2019-09-24 20:35:11 +00:00
Åke Forslund 39d0053493 Catch inspect error in logger
Inspect would in certain cases fail to find the line number. This
catches the exception and provides a basic name for the logger.
2019-09-24 20:58:34 +02:00
devs-mycroft b746f365c9 Version bump from 19.8.-1 to 19.8.0 2019-09-24 05:42:59 +00:00
Åke Forslund c8b33704ce Update version number in preparation for 19.08 2019-09-23 09:58:09 +02:00
Åke 6c228d00a9
Merge pull request #2320 from MycroftAI/bugfixes/skills-manifest
Bugfixes/skills manifest
2019-09-20 22:57:57 +02:00
Åke Forslund 62bba61da0 Make sure skill manifest is synced with backend
Send skill manifest all startups
2019-09-20 16:40:30 +02:00
Åke Forslund 347e8c9d1e Work on copy when managing the skills manifest
Fixes possible modification of input data when adding device uuid to the
manifest before sending.
2019-09-20 15:02:51 +02:00
Åke Forslund c6b1e3dc92 Make logging a little easier to decipher 2019-09-20 12:20:46 +02:00
Åke Forslund fcc4df6351 Clear msm device_skill_state before update/upload
Make sure to re-read the device_skill_state from disk before doing
changes so no information is lost.
2019-09-20 08:07:03 +02:00
Åke eddc3c45bc
Merge pull request #2318 from krisgesling/feature/yes-affirmative
add 'affirmative' to yes vocab
2019-09-19 20:24:07 +02:00
Åke Forslund 2cb2c56572 Install priority skills and save info
Use the msm.install method to install the priority skills so the skill
details are registered in the manifest
2019-09-19 20:07:21 +02:00
Åke Forslund e0cb16eab8 Clean up skill_manager exceptions
- BaseException -> Exception
- Remove unused vaiables
2019-09-19 20:07:21 +02:00
Åke Forslund c016903b77 Update skills manifest if a skill is reloaded.
When a skill is reloaded it is quite possible that a new skill gid has
been assigned to it and the backend needs to be informed of the change.
2019-09-19 20:07:21 +02:00
Åke Forslund 3474d725b8 Stop settingmeta upload on skill shutdown
This makes sure to shutdown any Timer handling settingsmetadata upload
on skill shutdown to make sure no duplicates are running.

(Easily occurs when a skill gid doesn't match the one sent in skill
manifest)
2019-09-19 15:25:55 +02:00
Kris Gesling 6421509f35 add 'affirmative' to yes vocab 2019-09-19 10:47:20 +09:30
David Wagner af08f82aad
Merge pull request #2314 from forslund/bugfix/no-skill-gid
Restructure to get skill_gid after startup
2019-09-18 13:22:12 -05:00
David Wagner d67d76ad66
Merge pull request #2316 from forslund/feature/safety-harness
Add a safety harness in skill_manager main loop
2019-09-18 13:14:04 -05:00
Åke Forslund b9097e43f2 Restructure to get skill_gid after startup 2019-09-18 19:59:13 +02:00
Åke Forslund 4860b5657f Add a safety harness in skill_manager main loop
This captures any unhandled expressions and will at least make sure
they're logged properly. (Exceptions in threads are mostly not printed
to stdout).

This sleeps slightly longer than normal (10 seconds) and then tries to resume
normal operation.
2019-09-18 19:55:39 +02:00
Åke 11a52af507
Merge pull request #2313 from forslund/bugfix/uuid-pickup
Apply skill uuid directly after reload from disk
2019-09-18 13:52:22 +02:00
Åke 35bf4c88b9
Merge pull request #2312 from MycroftAI/bug/settingsmeta-upload-device-uuid
settingsMeta API call to be issued without a device ID in the URL.
2019-09-18 10:01:40 +02:00
Åke Forslund 09c0651872 Apply skill uuid directly after reload from disc
The uuid is now applied to the path after it has been checked and
reloaded if needed.
2019-09-18 08:48:40 +02:00
David Wagner f4865286ab
Merge pull request #2299 from forslund/bugfix/skills-reload-error
Catch exceptions when reloading skills
2019-09-17 19:24:04 -05:00
Chris Veilleux a5af2adb6d fixed an issue where a potential race condition can cause the settingsMeta API call to be issued without a device ID in the URL. 2019-09-17 15:31:48 -05:00
Åke fa6d826244
Merge pull request #2311 from forslund/bugfix/gotta-catch-em-all
Catch all exceptions from upload device info
2019-09-17 12:07:32 +02:00
Åke a41284e10e
Merge pull request #2287 from MycroftAI/refactor/skill-settings-split
Refactor/skill settings split
2019-09-17 11:40:35 +02:00
Chris Veilleux 9c0c20e96d added deprecation warning for settingsmeta fields no longer used. 2019-09-17 11:24:10 +02:00
Chris Veilleux 0d897cf4e8 don't emit settings change event if there are no settings 2019-09-17 11:24:10 +02:00
Chris Veilleux 02a6f00b03 new log message indicating that a skill got new settings from the backend 2019-09-17 11:24:10 +02:00
Chris Veilleux 1e5c2986d3 fix bug where saving settings to disk crashed when the settings passed to the function are a instance of the Settings class. 2019-09-17 11:24:10 +02:00
Chris Veilleux 21dd5b2bed fixed a bug with skill settings where the last download value was not properly initialized. added some logging 2019-09-17 11:24:10 +02:00
Chris Veilleux 4cfd48104d deal with empty settings file 2019-09-17 11:24:10 +02:00
Chris Veilleux fa1db1b9cf changed device API to hit new settings retrieval endpoint. 2019-09-17 11:24:10 +02:00
Åke Forslund 30104b58c1 Fix broken tests
- Correct settingsmeta upload endpoint
- Remove test for delete settingsmeta endpoint

- Fix usage of Pathlib for python 3.4 and 3.5
2019-09-17 11:24:10 +02:00
Chris Veilleux 826c822a74 only save settings to disk if a change is detected. 2019-09-17 11:24:10 +02:00
Chris Veilleux b1a63638c1 implemented a stop-gap change to keep the skill API from breaking 2019-09-17 11:24:10 +02:00
Chris Veilleux 5c742d2ed0 complete rethink of how settings and settingsmeta are handled in core. 2019-09-17 11:24:10 +02:00
Chris Veilleux bbb288a5f0 small typo fix 2019-09-17 11:15:39 +02:00
Åke Forslund 29dbbe1bee Update to use the old dns connection test aswell
This handles capture portals as well.

The standard connection logic is now

Check outside ip is reachable and after that check that www.google.com
is resolvable and connectable.

TODO: create endpoint on backend with known response to perform check
upon.
2019-09-17 09:27:43 +02:00
Chris Veilleux da3ce2caf5 Change connection check logic to resolve www.google.com
Change logic that checked for an internet connection after an issue occurred during initial boot where the old connection check gave a false positive.

Reordered imports to be PEP8 compliant. Minor refactoring to remove issues identified in PyCharm
2019-09-17 09:27:43 +02:00
Åke Forslund e9922c0fff Catch all exceptions from upload device info 2019-09-17 08:13:58 +02:00
Åke Forslund 5457c265f3 Handle errors when updating device attributes
Capture the correct exceptions when updating device version and
enclosure type. Switches from BackendDown to ConnectionError and
HTTPError.
2019-09-16 10:41:34 +02:00
Åke Forslund 7346e4d1b5 Add status queries to the skill process
mycroft.skills.is_alive: The service is started and priority skills are
loaded.
mycroft.skills.all_loaded: All skills on the system has been loaded.
2019-09-13 17:52:21 +02:00
Åke b79a2a52bf
Merge pull request #2303 from JarbasAl/bugfix/adapt_munging
bugfix/adapt munging
2019-09-13 08:12:39 +02:00
jarbasal 5edf464808 bugfix/adapt munging 2019-09-13 02:06:18 +01:00
David Wagner cf2791634d Fix bug where no utterance is spoken if cache wav is hit with no visemes cached 2019-09-11 18:44:31 +00:00
Åke Forslund 74be9a8a2e Catch exceptions when reloading skills
- Explicitly catch FileNotFoundError
- Do a general catch and log for other exceptions
2019-09-11 14:20:22 +02:00
Åke Forslund 02714cdeaf Don't kill global events when shutting down skill
During skill shutdown remove_all_handlers() was called on all registered
events. This would unregister all global events, such as settings
updating, stop for all skills.

Now the remove only will remove the instance connected to the skills
method.
2019-09-10 11:42:07 +02:00
Åke Forslund 146c3cad0c Log bus messages with debug level 2019-09-06 13:31:32 +02:00
Åke Forslund 43ed3a99a8 Make messagebus service respect loglevel 2019-09-06 13:29:40 +02:00
Åke Forslund 32cfe0d5c4 Fix error enabling/disabling padatious intents
Padatious is still not the greatest at enabling / disabling intents but
it's slightly better.
2019-09-02 18:49:55 +02:00
Åke Forslund c3c12d147a Handle event scheduler methods without message arg
Fix issue when the handler is specified without an argument parameter.
2019-09-02 18:49:41 +02:00
Åke Forslund 3b2c7267e7 Rename Message type arg to msg_type
Name change to remove collision with the builin type.
2019-09-02 13:30:55 +02:00
Åke Forslund e2d5b92bfe Remove deprecated methods and checks 2019-09-02 11:45:32 +02:00
Åke a1656deb63
Merge pull request #2282 from forslund/feature/pulse_role
Enable support for pulseaudio ducking
2019-09-02 07:55:55 +02:00
Åke Forslund ce772dd1ae Replace config properties to simpler instances 2019-09-01 12:18:27 +02:00
Åke Forslund 3fea4b1e6f Remove old manual pulse ducking 2019-08-31 14:27:06 +02:00
Åke Forslund 25bfd1345f Minor cleanup of tts/__init__.py
- Remove unused imports
- Correct docstrings
2019-08-31 14:27:06 +02:00
Åke Forslund 3d37315bc0 Utilize pulseaudio's corking/ducking feature
Pulseaudio allows corking / ducking for streams with prioritized roles
This sets the role for the mycroft speech to "phone" and all other to
"music" if the config tts->pulse_duck is set to true.
2019-08-31 14:27:06 +02:00
Åke Forslund 36eddc294f Mark unused parts of tuples
- use the external iterator instead of accessing the member
2019-08-31 09:04:16 +02:00
Chris Veilleux ed0b4f2719 self.registered_intents was moved to the IntentServiceInterface class but the instance attributes were not changed to reflect this. Also tidied up a few minor issues raised by linter. 2019-08-30 16:49:35 -05:00
Åke 75ad11b9d0
Merge pull request #2256 from forslund/refactor-split-mycroftskill
Refactor MycroftSkill
2019-08-30 18:21:13 +02:00
Åke Forslund 02b49edc99 Fix typo when unreferencing skill after failed load 2019-08-30 14:57:27 +02:00
Åke Forslund 077df67479 Disentangle event scheduler interface from skill 2019-08-30 13:32:00 +02:00
Åke Forslund cbf2fc63a9 Remove skill logic from create_wrapper
- Remove once-logic from the default handler wrapper, no need to do it there.
- Add docstring for handle_wrapper
- add the on_start, on_end handlers and move skill logic to respective
handlers.
2019-08-30 13:00:26 +02:00
Åke Forslund 87d9512093 Update get_scheduled_event_status()
Use the more modern bus.wait_for_response()
2019-08-30 13:00:26 +02:00
Åke Forslund c1d07bbe23 Add comments and clean up IntentServiceInterface 2019-08-30 13:00:26 +02:00
Åke Forslund d461ffe63c Update docstrings and variable names of EventSchedulerInterface 2019-08-30 13:00:26 +02:00
Åke Forslund f081404ce3 Further cleanup 2019-08-30 13:00:26 +02:00
Åke Forslund 5e558647e7 Refactor translation methods
Move file reading logic into skill_data.py
2019-08-30 13:00:26 +02:00
Åke Forslund e2ec2ef8d1 Reduce complexity of get_response() 2019-08-30 13:00:26 +02:00
Åke Forslund 2d95ed9e35 Move complexity to IntentServiceInterface
Move much of the complex methods for registering intents to the
IntentServiceInterface to reduce bloat of MycroftSkill
2019-08-30 13:00:26 +02:00
Åke Forslund 5402f8ae22 Use remove_all_listeners when cleaning 2019-08-30 13:00:26 +02:00