Commit Graph

3359 Commits (mark-ii/log-rotation)

Author SHA1 Message Date
Michael Hansen 67dd15a216 Add acknowledge.wav 2022-01-18 19:41:08 +00:00
Michael Hansen 707ffadb6b Clear TTS cache on new activity 2022-01-18 16:38:10 +00:00
Michael Hansen 88143b15c7 Use 0 or 100 volume in VLC service 2022-01-18 16:37:35 +00:00
Michael Hansen ce073f3ba5 Use paplay instead of aplay 2022-01-18 16:36:53 +00:00
Michael Hansen a80c25e5cb Prototype activity started/ended functions for skills 2022-01-17 17:28:06 +00:00
Michael Hansen f9d9ccf3e8 Cue pulse animation on wakeword recognized 2022-01-15 20:49:10 +00:00
Michael Hansen 78a0067a99 Adjust initially for ambient noise 2022-01-15 20:48:58 +00:00
Michael Hansen b4d2f5c344 Fine-tune parameters for mic 2022-01-15 19:28:36 +00:00
Michael Hansen 51219509f3 Stop removing whitespace after periods to avoid mangling initialisms 2022-01-14 17:05:38 -05:00
Michael Hansen e2ce9efd44 Merge branch 'mark-ii/qa' of pumpkin.lan:Mike/Projects/mycroft-core into mark-ii/qa 2022-01-14 16:32:00 -05:00
Michael Hansen 36d4f1a2e3 Fix NamespaceManager bus exception 2022-01-14 15:23:24 -05:00
Michael Hansen 0a224b3e6b Rewrite MutableStream class for microphone. Requires libportaudio with
assertio patch.
2022-01-14 18:18:01 +00:00
Michael Hansen b3cf7458a7 Use importlib for plugins instead of deprecated pkg_resources 2022-01-13 18:16:44 -05:00
Michael Hansen 4b5dbb4d0a Avoid stopping pulse animation during chase 2022-01-13 20:53:03 +00:00
Chris Veilleux e86eb08909 Add a one second delay to removal of namespace so it is not so abrupt. 2022-01-13 14:42:47 -06:00
Michael Hansen f9d2ef0104 Clear TTS queue when new skill speaks 2022-01-13 17:53:30 +00:00
Michael Hansen 942c836386 Send skill_id with speak event 2022-01-13 17:53:18 +00:00
Michael Hansen a1de8d070b Clean up LED animations in enclosure 2022-01-12 23:36:35 +00:00
Michael Hansen bf1fc7fa6b Don't wait for listen WAV to finished playing on Mark II 2022-01-12 22:19:48 +00:00
Michael Hansen 677e911926 Create recognizer loop before connecting bus events 2022-01-12 20:55:57 +00:00
Chris Veilleux a7a039202d Moved status screens to wifi and pairing skills 2022-01-12 14:17:45 -06:00
Michael Hansen 6edb5d2c47 Merge branch 'mark-ii/qa' of https://github.com/MycroftAI/mycroft-core into mark-ii/qa 2022-01-11 18:54:32 -05:00
Michael Hansen 564cdb2890 Separate LED animations in enclosure 2022-01-11 18:54:26 -05:00
Chris Veilleux 9dbe974b16 Merge remote-tracking branch 'origin/mark-ii/gui-namespace' into mark-ii/qa 2022-01-11 17:04:52 -06:00
Chris Veilleux 2e376b271e docstring cleanup 2022-01-11 17:03:06 -06:00
Michael Hansen 7075678eee Use smbus2 for leds 2022-01-11 17:49:44 -05:00
Chris Veilleux b866de2aae fixed some namespace removal and persistence issues 2022-01-11 15:19:23 -06:00
Michael Hansen 871dc8b959 Add 'hot_reload' config item to skills 2022-01-11 15:17:52 -05:00
Michael Hansen 864ac8173d Remove wake word delay due to deprecated parameter to found_wake_word 2022-01-11 14:54:53 -05:00
Michael Hansen b8f37419c3 Enable mic level writing through CLI with mycroft.mic.enable_write_level event 2022-01-11 13:34:35 -05:00
Chris Veilleux 28b97d067a add internet connecting screen to idle screen skill 2022-01-11 10:57:52 -06:00
ken-mycroft 9796431a45 null check 2022-01-11 11:10:30 -05:00
Chris Veilleux 582428a568 Merge remote-tracking branch 'origin/mark-ii/gui-replace-page' into mark-ii/gui-namespace 2022-01-10 17:35:37 -06:00
Chris Veilleux 235bd0c9ef move GUI specific code out from the base enclosure class and refactor. 2022-01-10 17:12:00 -06:00
Chris Veilleux 6a8c044217 uncomment the code that determines if a skill needs to reload. 2022-01-10 16:49:42 -06:00
Michael Hansen ef87af1345 Warn on network check timeout 2022-01-06 15:55:37 -05:00
Michael Hansen a360098d8b Increase not connected timeout 2022-01-06 11:49:50 -05:00
Michael Hansen e0187b392a Restore MSM 2022-01-06 11:17:48 -05:00
Michael Hansen 03beb38efb Add timeout to network detect 2022-01-06 11:17:40 -05:00
Michael Hansen 2a6f79dab4 eth0 reports itself as "unavailable" instead of "disconnected" 2022-01-06 09:49:32 -05:00
Michael Hansen db2b7142fb Fix missing variable 2022-01-05 11:18:56 -05:00
Michael Hansen 437a9e9abf Enable ethernet in network detect activity 2022-01-05 09:45:04 -05:00
Michael Hansen 9e89bdde0a Remove all the msm from skills module 2022-01-04 21:40:26 -05:00
Chris Veilleux 3c594fba1e new SkillGUI helper method to replace the page being displayed with a different page from the same skill. 2022-01-04 12:14:23 -06:00
Michael Hansen 47335a7176 Stop skill manager from updating skills 2022-01-03 16:53:13 -05:00
Michael Hansen d9872c232e Fix merge issue 2021-12-31 12:39:55 -05:00
Chris Veilleux abab1e9bda Merge branch 'feature/mark-2' into feature/mark-2-boot
# Conflicts:
#	mycroft/client/enclosure/mark2/interface.py
2021-12-30 12:06:14 -06:00
Michael Hansen d2e9daf88e Disable skill reload check for performance 2021-12-29 20:41:18 -05:00
Kris Gesling a59002ac8e Autoformat 2021-12-28 17:18:43 +09:30
Kris Gesling d07886b284 Fix reporting of volume level 1
All volumes were being translated from range of 0-10
into a float. 1.0 was left assuming it was 100 but
this was a false assumption. Have added docstring to
make the expected argument explicit.
2021-12-28 17:18:20 +09:30
Kris Gesling 4c0b28e2e7 Revert "Make TTS queue a singleton (#3051)"
This reverts commit f99347c704.
2021-12-24 07:42:31 +09:30
Chris Veilleux 9a8ec95bbd improved documentation 2021-12-22 17:34:41 -06:00
Chris Veilleux 74dd0c991d improved documentation 2021-12-22 17:34:40 -06:00
Chris Veilleux efd5858616 Remove code that supported deprecated implementation of resting screen 2021-12-22 17:34:40 -06:00
Chris Veilleux 68f870dfe5 Initial implementation of an IdleDisplaySkill that extends MycroftSkill to provide an API for skills that will implement the idle screen functionality. 2021-12-22 17:34:39 -06:00
Michael Hansen b521cbf0e8 Disable audio ducking, use volume skill feature/mark-2 branch 2021-12-21 13:04:06 -05:00
ken-mycroft f99347c704
Make TTS queue a singleton (#3051) 2021-12-17 22:30:24 +09:30
Michael Hansen a3c272c5e7 Add run_background in Activity 2021-12-16 17:11:04 -05:00
Chris Veilleux ad391e8200 Add an event indicating the internet connection is ready for use 2021-12-16 15:25:01 -06:00
Michael Hansen cd95cf60f7 Network connect activity handles intermediary disconnect state 2021-12-15 15:45:08 -05:00
Michael Hansen 3c22bda38c Refactor and clean up code for wifi connect 2021-12-14 19:23:07 -05:00
Michael Hansen 3bf3c1a999 Merge branch 'feature/mark-2-boot' of https://github.com/MycroftAI/mycroft-core into feature/mark-2-boot 2021-12-14 12:05:42 -05:00
Michael Hansen dffcd5605f Use shared proc in awconnect server 2021-12-14 12:05:23 -05:00
Chris Veilleux e1dfb2c78e first skill update should not occur until a full interval after the boot sequence completes. 2021-12-13 23:11:35 -06:00
Chris Veilleux 4fa58d069c remove code that updated skills before they were loaded. 2021-12-13 23:03:09 -06:00
Chris Veilleux ba64ca08bf Merge branch 'feature/mark-2-boot' of https://github.com/MycroftAI/mycroft-core into feature/mark-2-boot
 Conflicts:
	mycroft/client/enclosure/mark2/interface.py
2021-12-13 17:08:53 -06:00
Chris Veilleux 986ba6a87d added new event handler for when the device has authenticated with the server. 2021-12-13 17:07:52 -06:00
Michael Hansen 5030da2cc8 Add event for user selecting access point in wifi setup 2021-12-13 11:18:07 -05:00
Michael Hansen 4e2afccf8b Add hotspot activity with socket to awconnect 2021-12-09 17:57:52 -05:00
Michael Hansen 19df425b0a Convert some activities to threaded 2021-12-09 17:56:30 -05:00
Michael Hansen 1211971557 Add threaded activity that blocks by default 2021-12-09 17:56:05 -05:00
Michael Hansen 56e6a4eb0f Add comment to network_utils 2021-12-09 17:55:32 -05:00
Michael Hansen 4159f9d646 Clear properties changed event in network connect 2021-12-08 15:48:54 -05:00
Michael Hansen a303177ed5 Check wifi/ethernet device states directly for connectivity 2021-12-08 15:17:56 -05:00
Michael Hansen 4ff744f1b4 Add dbus default settings to mycroft.conf 2021-12-08 12:03:59 -05:00
Michael Hansen 9e67748bea Use configuration for dbus address 2021-12-08 11:08:35 -05:00
Michael Hansen 46b02e25cc Make clock sync activity synchronous 2021-12-07 22:39:52 -05:00
Michael Hansen e16e9478e3 Add activity/__init__.py 2021-12-07 17:22:03 -05:00
Michael Hansen f0eb10d5ea Move some DBus code back into network_utils 2021-12-07 17:21:47 -05:00
Michael Hansen 8f0a5d65a4 timedatectl still failing in mark2 2021-12-07 16:28:12 -05:00
Michael Hansen 7fb2847d53 Merge branch 'feature/mark-2-boot' of https://github.com/MycroftAI/mycroft-core into feature/mark-2-boot 2021-12-07 15:18:57 -05:00
Michael Hansen 07c88b980d Add clock sync activity 2021-12-07 14:32:57 -05:00
Chris Veilleux 6e5f46cbac added a wait into the synchronize clock method 2021-12-07 13:27:51 -06:00
Michael Hansen d233fbd2a0 Merge branch 'feature/mark-2-boot' of https://github.com/MycroftAI/mycroft-core into feature/mark-2-boot 2021-12-07 14:12:58 -05:00
Michael Hansen 369dee5ec1 Add network/internet connect activities 2021-12-07 14:10:41 -05:00
Chris Veilleux ea5cf61361 Added a function to determine if time is synchronized via NTP and an activity in the enclosure service to leverage it. 2021-12-07 13:06:57 -06:00
Chris Veilleux 7f2d4bd25f Defining message bus event handlers before a message bus connection is established can cause errors. 2021-12-06 10:53:40 -06:00
Chris Veilleux 0eb5a1fc44 Fix a race condition when waiting for initialized services 2021-12-03 18:14:21 -06:00
Kris Gesling 294be08efc Prevent loss of data when migrating from latest to stable
The XDG migration code was replacing newer directories with
old blank ones.
2021-12-03 09:39:23 +09:30
Chris Veilleux 712110e17f Removed DevicePrimer class. All functionality moved to enclosure 2021-12-02 16:04:37 -06:00
Chris Veilleux 409fff9390 Removed if statement that checked for the existence of an enclosure. The create_enclosure() method always returns an instance of an Enclosure class 2021-12-02 16:04:37 -06:00
Chris Veilleux 9819dbf2f7 Logging improvements 2021-12-02 16:04:37 -06:00
Michael Hansen c49868905c Remove DEBUG log from mark2 connectivity check 2021-12-02 16:04:17 -06:00
Michael Hansen a296952efa Add network/internet polling thread to mark2
====  Tech Notes ====
Mark2 enclosure uses NetworkManager to poll for network/internet
connectivity.

On state change, outputs:
mycroft.network.connected
mycroft.network.disconnected
mycroft.internet.connected
mycroft.internet.disconnected

Every polling interval, outputs:
mycroft.network.state (data.state=connected/disconnected)
mycroft.internet.state (data.state=connected/disconnected)
2021-12-02 16:04:17 -06:00
Chris Veilleux 0328043f7c Added log messages, changed mycroft.ready to mycroft.started and added handler for mycroft.started 2021-12-02 13:09:21 -06:00
Chris Veilleux 4b7dd93b85 Fixed bug with method signature and added log message for device ready for use. 2021-12-02 13:08:42 -06:00
Michael Hansen 7f19bad4f3 Add unit tests for NetworkManager
==== Fixed Issues ====
Added unit tests for NetworkManager.
Restart DBus thread if an error occurs.
2021-12-02 11:07:47 -05:00
Michael Hansen 503c081d95 Add NetworkManager for checking connectivity
====  Tech Notes ====
Connects to org.freedesktop.NetworkManager over DBus to determine
connectivity status.

==== Environment Notes ====
Adds dbus-next Python package as a requirement
2021-12-01 16:15:02 -05:00
Kris Gesling be45edb54f autoformat 2021-12-01 09:32:24 +09:30
Kris Gesling ae99974398
Merge pull request #3045 from forslund/bugfix/config-creation-at-import
Do not create configs folders until writing
2021-12-01 09:17:41 +09:30
Kris Gesling d479a79b7e
Merge pull request #3033 from forslund/bugfix/config
Fix config priority
2021-12-01 09:13:28 +09:30
Åke Forslund 6b5d45e507 Do not create configs folders until writing
This replaces save_*_path with usage of the xdg_*_home when handling
config files. This means the config folders will not be created unless
actually written to.

The check for whether a directory needs to be created is handled behind
a lock to avoid race conditions
2021-11-30 22:50:09 +01:00
Chris Veilleux 982b79482c move enclosure logic from skill service to enclosure service 2021-11-30 15:44:09 -06:00
Chris Veilleux aca4d1a2f6 improve enclosure initialization logging 2021-11-30 15:41:57 -06:00
Chris Veilleux 53ffd737a0 move some steps in the startup sequence so that the message bus connection is established as early as possible. this will facilitate status updates occurring as soon as possible as well. 2021-11-30 15:40:40 -06:00
Chris Veilleux ef7009dfbc PEP8 refactoring 2021-11-30 15:40:40 -06:00
Chris Veilleux 3d26fa9ada Add service ready event and improve logic to determine if device is ready. 2021-11-30 15:40:27 -06:00
Kris Gesling 89cfad7943
Check if GUI is connected rather than maintain list of platforms (#3025)
* Check if GUI is connected rather than maintain list of platforms

There are already many Mycroft platforms that have GUIs
and this will only grow. We want to know if the device
has a GUI connected rather than if it is in a pre-defined
list of platforms.

* Create a mock GUI with a settable connected attribute
2021-11-24 14:51:10 +09:30
Kris Gesling 77549d01e2
Remove incorrectly added args in GUIWebsocketHandler methods (#3036)
PR #2879 updated the websocket-client and changed function
signatures to account for API changes in that package. These
were falsely changed as the GUI bus does not use the
websocket-client.

Consistency would be good however modifying the protocols
would require significant work. For now we have two slightly
different bus interfaces.
2021-11-22 15:00:20 +09:30
Åke Forslund 70df575d43 Make log settings not cache local only config
After startup the cached config would be without remote config. This
makes sure the config without remote isn't cached.
2021-11-09 21:04:58 +01:00
Åke Forslund 5ff2cb099f Fix order of configs
The old SYSTEM config was prioritized lower than the remote config
2021-11-09 20:51:38 +01:00
Genei180 ef56d71462
Added Possibility for ESpeak Config (#3020)
Added Possibility for ESpeak Config
2021-11-09 15:07:33 +09:30
Kris Gesling ea157598d7
Merge pull request #3022 from MycroftAI/bugfix/gui-namespace-race-cond
Fix race condition in GUI namespace insertion
2021-11-05 06:12:08 +09:30
Kris Gesling 131a9ed03f PEP8 2021-11-04 20:53:00 +09:30
jarbasal f8f640e3e5 fix/race condition dictionary changed iteration
bus events could cause the dict to change while being iterated
2021-11-04 13:37:54 +09:30
Siavash Mollayi dca1184bd5 Azerbaijani language support 2021-11-03 15:57:34 +03:30
Gaëtan Trellu 0247b3a4b5
[log_format] Add an option to change the log format (#3016)
* [log_format] Add an option to change the log format

Hacing an option to change the log format could be useful when logs
are shipped into an aggregator such as Elasticsearch.

The current format is very hard to parse.

* [log_format] Set default Formatter

Because mycroft.configuration.Configuration() class import LOG class,
a default Formatter have to be defined before import the
mycroft.configuration.Configuration() class.
2021-10-29 14:59:22 +09:30
Bart Ribbers 34ee3a9a84
Upgrade websocket-client to 1.2.1 (#2879)
* Upgrade websocket-client to 1.2.1

core equivalent of https://github.com/MycroftAI/mycroft-messagebus-client/pull/21
There was an incompability with the latest websocket-client and the
messagebus which needed fixing for Linux distro compatibility. Since
messagebus-client was going to depend on websocket-client 1.2.1, let's
do the same in core

* Bump message bus client and tornado versions

New version of the messagebus-client released.
Upgraded Tornado to match new function signature.

* Revert removal of websocket-client

It is still used in the `mycroft.client.text.gui_server`

Should investigate removal of this so that websocket client versions do not need to be
kept in sync between mycroft-core and mycroft-messagebus-client.

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2021-10-28 14:42:23 +09:30
Kris Gesling 3495acf9ab
Merge pull request #3003 from Joanguitar/dev
Add reusable PadatiousMatcher to speed up intent matching
2021-10-21 12:25:34 +09:30
Chris Veilleux 5229f61bbf Fixed formatting error in skill loader log message 2021-10-15 14:51:05 -05:00
Kris Gesling 99be84df2e Add Github Action for pushing to gitlab 2021-10-04 16:20:35 +09:30
ken-mycroft 10fd812f2b Improve confidence calculation for Common Query (#2986)
* Improve confidence calculation

* Add actual noise words file

* Update expected test confidence levels

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2021-09-27 14:59:57 +09:30
Kris Gesling 2a6bb90c9f
Merge pull request #2963 from forslund/feature/update-adapt-keyword-registration-message
Update key names in adapt keyword registration message
2021-09-27 10:30:12 +09:30
Åke Forslund f709bb9a1e Use IntentServiceInterface in MycroftSkill.register_vocabulary()
This moves the message logic for adapt keyword registration into a single location.
2021-09-26 19:15:21 +02:00
Åke Forslund 693100e8c6 Match keyword entity terms in Mycroft with Adapt
This changes the internally used names for entities and entity values when
sent on the messagebus and used interanally in the intent service from start / end to entity_value and entity_type.

This makes the terminology easier to understand and follow across into Adapt.

The old terms are still included and usable for compatibility but should be
removed in an upcoming major release (22.02).
2021-09-26 19:15:17 +02:00
ken-mycroft 5e81e2747b
Improve confidence calculation for Common Query (#2986)
* Improve confidence calculation

* Add actual noise words file

* Update expected test confidence levels

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2021-09-20 16:33:28 +09:30
Joan Palacios 0f98c566b9
Removed lru_cache 2021-09-16 13:31:22 -04:00
Joan 863e7844d1 Padatious doesn't need to run 3 times 2021-09-16 12:48:23 -04:00
Daniel McKnight 600aa76206
Add 'utterances' to message emitted to skill intent handler (#2997)
* Add 'utterances' to message emitted to skill intent handler

* Reformat comment to resolve PEP warnings

* Update comments per PR feedback

* Cut line-length for style compliance

Co-authored-by: Kris Gesling <kris.gesling@mycroft.ai>
2021-09-13 11:15:57 +09:30
Chris Veilleux 06253906fc
Merge pull request #2979 from MycroftAI/bugfix/release-gui-on-shutdown
Release GUI on Skill shutdown or reload
2021-09-10 16:30:02 -05:00
Kris Gesling 4bce5345cb
Merge pull request #2985 from MycroftAI/feature/gTTS-warning
Add warning for anyone loading GoogleTTS
2021-09-07 16:09:05 +09:30
devs-mycroft 13539d3397 Version bump from 21.2.0 to 21.2.1 2021-08-27 03:02:54 +00:00
Kris Gesling 8a68c88bcf Add warning for anyone loading GoogleTTS 2021-08-27 09:49:40 +09:30
Kris Gesling 109e8ca482 resolve merge conflict 2021-08-17 23:19:14 +09:30
Kris Gesling d26201d978 Release GUI on Skill shutdown or reload 2021-08-17 16:40:05 +09:30
Aditya Mehra 9c380202bc add fullscreen fix 2021-08-17 15:58:27 +09:30
Kris Gesling 4df863633d Merge dev pre-XDG into feature/mark-2
This includes all commits up to but not including PR #2794
2021-08-17 15:56:42 +09:30
Kris Gesling 34ef8752ec Demote cpu temp and led log messages to debug 2021-08-17 15:41:58 +09:30
Chris Veilleux 8fcfa901c3
Merge pull request #2970 from MycroftAI/feature/mycroft-skills-adaptintent
Provide AdaptIntent from mycroft.skills
2021-08-13 14:53:46 -05:00
Kris Gesling 196e9750e3
Merge pull request #2967 from AIIX/fix/webview_fullscreen
add fullscreen fix for webviews
2021-08-11 09:44:05 +09:30
Kris Gesling eadb5c9985 Provide AdaptIntent from mycroft.skills
This is convenience for Skill developers who can now import
all standard items from a single level. Eg:
from mycroft.skills import MycroftSkill, intent_handler, AdaptIntent
2021-08-09 15:55:04 +09:30
Aditya Mehra 8be5e9ba72 add fullscreen fix 2021-08-06 14:32:52 +09:30
Åke Forslund 4258e2f2ed Reorder imports of mycroft.configuration 2021-08-05 10:04:45 +02:00
jarbasal 87d22d30a4 fix cyclic imports with LOG
The mycroft.util.log module called LOG.init() which needs to read the config,
the configuration module imports the log system to log causing cyclic import
issues.

This moves the LOG.init() call out of the log module making it possible
to use the normal config system to init the logs and does a slight
re-arrangement so that the uninited log can be used.
2021-08-05 10:04:45 +02:00
Åke Forslund 3fd96cf71b WIP Review comments
- Add TODO for 22.02 to remove the compatibility code
- Make Warning a single Log statement
- mycroft-config script now uses XDG-environment variable
- Remove redundant code
- Replace hard coded references to ~/.config
- Explicitly remove new path before move of "filesystem" (if needed)
2021-08-05 10:04:45 +02:00
Åke Forslund 9029dc1f41 Slight cleanup
- Make XDG usage more visible by using the xdg module prefix
- fix overloaded python keywords
- remove unused imports
2021-08-05 10:04:45 +02:00
Åke Forslund 8e69d4616d Correct resolution order for resolving log configs 2021-08-05 10:04:45 +02:00
Åke Forslund 28017993c5 Restore system locations to mycroft.configuration
Fixes issue with Timer skill
2021-08-05 10:04:45 +02:00
Bart Ribbers e20443b824 Use XDG Base directories for settings, cache and runtime data
Improve deprecation warning message
2021-08-05 10:04:45 +02:00
Kris Gesling 313f4e8759
Merge pull request #2946 from MycroftAI/refactor/vk-test-helpers
Improve the speed of waiting for dialogs helper function
2021-08-05 09:29:17 +09:30