Commit Graph

3815 Commits (c9de7b431efb8dffcf26c02d2d3033d945cfcf83)

Author SHA1 Message Date
Å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 65bc1b9786
Merge pull request #2306 from forslund/bugfix/skill-startup-server-error
Handle HTTP errors when updating device attributes
2019-09-16 20:24:00 +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 accafeeca6
Merge pull request #2304 from forslund/feature/skill-status-queries
Add status queries to the skill process
2019-09-14 14:33:37 +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
Åke b28fd277e0
Merge pull request #2301 from MycroftAI/feature/caching
Fix Caching Bug
2019-09-11 23:54:25 +02: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 8fb27e656d
Merge pull request #2290 from MycroftAI/feature/config-tool
Add mycroft-config tool to manage config files
2019-09-10 12:43:10 +02:00
Åke Forslund fea313355c Warn of opening in view mode 2019-09-10 12:11:18 +02:00
Steve Penrod 98040e7be0 Support sensible-editor
Many versions of Linux (most Debian-based versions) support a mechanimsm
based on a link called "sensible-editor", which is configured to invoke
the user's preferred editing tool.

To get colorization help, the temp file is now named with a ".json"
extension.  Most editors can colorize appropriately based on that.
2019-09-10 12:11:18 +02:00
Steve Penrod f6587b3cbf Add mycroft-config tool to manage config files
The new mycroft-config utility simplifies management of the the
various configuration files that control Mycroft.  Commands include:
edit, show, get, set, reload.

* mycroft-config edit (default|remote|system|user)
Open the requested file in an editor (nano by default), performing
JSON validation warnings to minimize accidental edit errors.

* mycroft-config show (default|remote|system|user)
Dump the selected file with nice highlighting using jq

* mycroft-config get <var>
Load the mycroft.conf stack, outputting the effective value(s).  The
<var> is specified using jq-style specifiers.  For example:
   mycroft-config get enclosure.platform
   mycroft-config get location
   mycroft-config get

* mycroft-config set <var> <value>
Set the given variable in the "user" configuration file.  Examples:
   mycroft-config set lang "es-es"
   mycroft-config set tts.mimic.voice "ap"

* mycroft-config reload
Sends a signal on the messagebus to tell services to reload configs.
This automatically occurs after a 'set' or 'edit' command.
2019-09-10 12:11:18 +02:00
Åke ca37d18034
Merge pull request #2296 from forslund/bugfix/clear-all-skill-events
Don't kill global events when shutting down skill
2019-09-10 12:05:27 +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
David Wagner d5ec11dbc6
Merge pull request #2291 from forslund/bugfix/messagebus-service-loglevel
Make messagebus service respect loglevel
2019-09-06 07:46:54 -05: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 a027e0deae
Merge pull request #2286 from forslund/bugfix/mycroft-skill
Bugfixes related to the rebase of mycroft skill
2019-09-02 22:15:49 +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 5477bfe001
Merge pull request #2285 from forslund/feature/remove-deprecated-19.08
Feature/remove deprecated 19.08
2019-09-02 18:46:16 +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
Kris Gesling 4385406956
Merge pull request #2284 from MycroftAI/test/wait_for_response
Update skill-tester for 19.08 and add basic support for wait_for_response
2019-09-02 18:05:35 +09:30
Åke Forslund edc6192124 Reduce complexity of EvaluationRule
Creates rules.py containing logic for the small rule snippets for each
entry in the json
2019-09-02 10:03:45 +02:00
Åke Forslund f35ccae83b Fix broken startup log capture 2019-09-02 10:03:45 +02:00
Åke Forslund 69231c5ed1 Make execute_test less complex
Split the long function into several smaller ones just retaining the
main logic.
2019-09-02 10:03:45 +02:00
Åke Forslund 98c1a74ce8 Add dummy wait_for_response() method to test emitter 2019-09-02 10:03:45 +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 87ac3d9aef
Merge pull request #2281 from MycroftAI/bug/qualify-registered-intents
fix MycroftSkill registered_intents instance attribute
2019-08-31 09:34:47 +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
Åke Forslund 93e4719c8b Add test case for the handle_enable/disable_intent 2019-08-31 08:57:38 +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 ac6f1f045d
Merge pull request #2280 from forslund/feature/upgrade-msm
Upgrade msm to 0.8.3
2019-08-30 15:32:26 +02:00
Åke Forslund 40e24ef2c5 Upgrade msm to 0.8.3 2019-08-30 15:30:57 +02:00
Åke 34b6a911cc
Merge pull request #2279 from forslund/bugfix/typo
Fix typo when unreferencing skill after failed load
2019-08-30 15:07:23 +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