Commit Graph

5040 Commits (mark-ii/gui-namespace)

Author SHA1 Message Date
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 52d2d4f593 Update pyxdg for Python3.8 compatibility 2021-11-30 22:18:44 +09:30
Kris Gesling 8e319b49ef
Merge pull request #3042 from HFabi/feature/issue-3041
Issue-3041 - Install pip for python version specified by argument in dev_setup
2021-11-30 07:09:26 +09:30
Fabian Heck d9c280afd4 Issue-3041 - Install pip for python version specified by argument in dev_setup 2021-11-29 16:57:34 +01:00
Kris Gesling c3bd1f2c5f
Merge pull request #3039 from rooky-c3bo/bugfix/issue-3026
Issue-3026 - Update Gentoo libffi dependency reference
2021-11-29 12:12:58 +09:30
Bahadır Yaren bd85c94cdb Issue-3026 - Fixing Gentoo dependency 2021-11-25 12:21:00 +01: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
Kris Gesling e1dcebff8c
Merge pull request #3028 from MycroftAI/bugfix/link-update
Update link for Hub to point to official Github version
2021-11-11 14:04:12 +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 958d4fa05e
Update link for Hub to point to official Github version 2021-11-06 06:13:58 +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
Åke fd12c88da5
Refactor/shellcheck bin (#3019)
* Shellcheck and update mycroft-config

* Shellcheck and update mycroft-pip

* Shellcheck and update mycroft-cli-client

* Shellcheck and update mycroft-help

* Shellcheck and update mycroft-listen

* Shellcheck and update mycroft-mic-test

* Shellcheck and update mycroft-msk

* Shellcheck and update mycroft-msm

* Shellcheck and update mycroft-say-to

* Shellcheck and update mycroft-skill-testrunner

* Shellcheck and update mycroft-speak

* Shellcheck and update mycroft-start

* Shellcheck and update mycroft-stop

* Add shellcheck step to github actions

This runs most of the shellcheck tests. The excludes are:
- SC1091: Avoids errors when shellcheck can't find sourced file
- SC2034: Unused variables, for example colors that aren't used yet
- SC2012: use of ls, from what I can see in our case this is fine (wc -l)

The version is locked to latest master as of November 2 2021
2021-11-04 17:01:17 +09:30
Kris Gesling 0ad093a8e3
Merge pull request #3021 from Saymantech-org/dev
Azerbaijani language support
2021-11-04 17:00:24 +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
Kris Gesling dd710a6a53
Merge pull request #2995 from MycroftAI/dependabot/pip/pillow-8.3.2
Bump pillow from 8.2.0 to 8.3.2
2021-11-01 11:17:18 +09: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