Commit Graph

3743 Commits (0811df3831a41db6a86ba8824603661ed6714176)

Author SHA1 Message Date
Å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
Åke Forslund 9423f920c4 Update test cases to properly mock the DeviceApi 2019-09-18 08:02:29 +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
Åke Forslund f7c4700343 Remove log checks 2019-09-17 11:24:10 +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 7ba1da5b25
Merge pull request #2305 from MycroftAI/bug/false-internet-connection
fix issue with false internet connection test
2019-09-17 10:18:31 +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 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