Commit Graph

4976 Commits (mark-ii/gui-replace-page)

Author SHA1 Message Date
Ken Smith f2f024e315 addresses jira mk2-249, make capabilities queryable via the msg bus 2021-02-26 15:09:39 -05:00
Ken Smith a1035cf3d2 fix mute mic led bring up bug and fix sync between buttons and volume skill and added an async volume update message so the gui can pick it up 2021-02-26 14:06:10 -05:00
Chris Veilleux 6ed674bd3e Merge remote-tracking branch 'origin/dev' into feature/mark-2
# Conflicts:
#	mycroft/audio/__main__.py
#	mycroft/client/speech/__main__.py
#	mycroft/skills/__main__.py
#	mycroft/util/process_utils.py
2021-02-26 11:49:30 -06:00
Chris Veilleux 450ba58acf remove spurious print statement 2021-02-24 10:39:33 -06:00
Chris Veilleux 9e3595cbdf Remove the newline character at the end of the pantacor device ID before sending it to Selene 2021-02-23 15:34:09 -06:00
neonandrii d69b61afb6 Issue-2812 - Allow overridden converse methods to accept messages - FIX: PEP8-line-too-long issue in MycroftSkill.converse - change required signature in MycroftSkill.converse(). 2021-02-23 14:44:12 +02:00
Kris Gesling 38839a1489
Merge pull request #1822 from forslund/feature/skill-api
Feature/skill api
2021-02-23 10:03:17 +09:30
Kris Gesling bed4c9fe28 Remove example entries in blacklisted_skills config
The default mycroft.conf included some arbitrary examples in the
actual blacklisted_skills configuration. If a user attempted to
use a Skill that matched, it would be prevented from loading.
2021-02-22 16:07:31 +09:30
Chris Veilleux 7df1f674ab Merge remote-tracking branch 'origin/feature/mark-2' into feature/mark-2 2021-02-21 20:10:05 -06:00
Chris Veilleux 8cda5b9c9c Change how pantacor device is identified to Selene 2021-02-21 20:09:08 -06:00
jarbasal 4200a38496 remove old padatious file 2021-02-18 17:19:28 +00:00
Bart Ribbers 934c289f03 dev_setup.sh: install Alpine deps to a virtual meta package
This allows easy uninstalling of the deps later on by just running "apk
del makedeps-mycroft-core"
2021-02-16 17:01:37 +01:00
Ken Smith ba01f1d507 fix comments 2021-02-15 14:30:31 -05:00
Ken Smith b7a79f6634 add fan control 2021-02-15 14:07:06 -05:00
Diego Asterio a00fe862d4 Merge branch 'bugfix/issue-2750' of https://github.com/DiegoAsterio/mycroft-core into bugfix/issue-2750 2021-02-15 13:42:14 +01:00
Diego Asterio 130d517f30 Issue-2750 - Remove log pollution
Add empty skill directories to a set and remove them whenever they are
no longer empty. Empty skill directories only appear once in the log.

==== Fixed Issues ====
log polution - #2750
2021-02-15 13:38:38 +01:00
Diego Asterio f39e71a6b7 Issue-2750 - Remove log pollution
Add empty skill directories to a set and remove them whenever they are
no longer empty. Empty skill directories only appear once in the log.

==== Fixed Issues ====
log polution - #2750
2021-02-15 13:01:34 +01:00
Åke Forslund 3a6ca30b33 Fix selecting last opt by number in ask_selection()
Fix off by one issue preventing the last option to be selected by
number.
2021-02-14 17:19:31 +01:00
Åke Forslund d724720b21 Basic tests for get_response based skill methods
- get_response
- ask_yesno
- ask_selection
2021-02-14 17:18:20 +01:00
Åke Forslund 53b9e87b21 Move AnyCallable to common location 2021-02-14 14:20:58 +01:00
Ken Smith b94d5e5c58 fix audioservice bug and stop pulsing when stop detected 2021-02-11 16:09:38 -05:00
Ken Smith a22dd87dc1 scaffolding for led feedback around voice activity 2021-02-11 13:07:06 -05:00
devs-mycroft a976bd1094 Version bump from 20.8.0 to 20.8.1 2021-02-11 11:51:26 +00:00
Kris Gesling fa5576adf4
Merge pull request #2831 from MycroftAI/bugfix/google-voice
Upgrade gTTS to fix Google voice
2021-02-10 11:16:43 +09:30
Ken Smith a7873cc22f Generic hardware enclosure capabilities should work with any device like your laptop or the Mark2. Provides a view of the default input devices (keyboards and mice) and default output devices (screens). Should be safe to merge to master also. 2021-02-09 16:28:48 -05:00
Kris Gesling c8494932ac Remove deprecated Google TTS lang codes 2021-02-09 21:27:59 +09:30
Kris Gesling a287578883 upgrade gTTS to fix Google voice 2021-02-09 16:58:45 +09:30
Kris Gesling 36b2c41940
Merge pull request #2830 from forslund/tests/github-action-gcc
Use os default gcc in github workflow
2021-02-09 15:13:09 +09:30
Kris Gesling 57cb8dc4ff
Merge pull request #2829 from forslund/bugfix/fallback-to-mimic-config
Send correct conf to mimic when used as fallback
2021-02-09 15:08:55 +09:30
Åke Forslund 760ed1dcf5 Use os default gcc in github workflow 2021-02-08 23:48:23 +01:00
Åke Forslund dac3bb8f07 Use os default gcc in github workflow 2021-02-08 23:45:26 +01:00
Åke Forslund 9173e22460 Send correct conf to mimic when used as fallback
- Mimic is now sent the correct config when used as a fallback
- Tests updated to ensure this
2021-02-08 22:09:55 +01:00
Åke be2d3c9fb7
Merge pull request #2828 from MycroftAI/feature/mozilla-tts-validation
Add Mozilla TTS connection validation
2021-02-08 21:54:53 +01:00
Kris Gesling 5a19fc0716 Add Mozilla TTS connection validation
Replication of PR #2719
Original code from JarbasAl
2021-02-08 20:17:59 +09:30
Kris Gesling 5ca342621d add skill_id to error msg 2021-02-08 16:57:07 +09:30
Åke Forslund 56852594cc Add test cases for the SkillApi
- Tests for the MycroftSkill side implementation
- Tests for the generated SkillApi objects
2021-02-08 07:37:50 +01:00
Åke Forslund 1397659c77 Add skill api help to CLI 2021-02-06 17:57:38 +01:00
Åke Forslund 7f3b4e1795 Add skill_api_method decorator
The api methods are now much easier to use, almost transparent. The
current caveat is that only "standarad" python types are acceptable
(int, float, str, list, bool, None) due to the json serialization.

- api methods are now created with the skill_api_method decorator
- both arguments and keyword arguments are sent to the api method
instead of the message object
- api methods now uses a normal return statement instead of having to
handle creating response messages on the bus.

For example if the datetime skill wants to make the datetime string
fetchable simply add the skill_api_method decorator to the
get_display_date method.

    @skill_api_method
    def get_display_date(self, day=None, location=None):
        """Returns the date and time as a string."""
        [...]

The methods return value will be sent back to the caller and can be used
from a skill through

        datetime = SkillApi.get('mycroft-date-time.mycroftai')
        self.log.info(datetime.get_display_date())
2021-02-06 17:57:19 +01:00
Åke Forslund df02bf22b4 Add skill api.
The skill api allows skills to define a public api which can easily be
accessed by other skills over the message bus just as easy as working
with a normal object.

The skill api object is generated from the skill's public_api property. It's a dict where each key is turned into a method on the api object. The method is defined as
  "api_method": {
    "type": message type string
    "func": handler method
    "help": help string for cli
  }

Example skill:

class Test2(MycroftSkill):
    def __init__(self):
        MycroftSkill.__init__(self)
        self.public_api = {
            'speak': {
                'type': 't2.speak',
                'func': self.handle_speak,
                'help': 'speak the test sentence\nand another line\n\nlast'
            },
            'speak2': {
                'type': 't2.speak2',
                'func': self.handle_speak2,
                'help': 'speak the other sentence'
            }
        }

    def handle_speak(self, message):
        self.speak('This is a test')
        self.bus.emit(message.response(data=None))

    def handle_speak2(self, message):
        self.speak('This is another test')
        self.bus.emit(message.response(data=None))
2021-02-06 17:55:34 +01:00
Ken Smith 289f229630 synchronize volume between skill and switches, fix mute led bring up issue and fix color palette 2021-02-05 13:47:27 -05:00
Kris Gesling bfd6be347f
Merge pull request #2690 from pixelherodev/dev
Add support for `doas`
2021-02-05 14:46:29 +09:30
Kris Gesling b1be522972
Merge pull request #2820 from MycroftAI/feature/gui-get
Feature/gui get
2021-02-05 14:41:03 +09:30
Kris Gesling f8f351e4da
Merge pull request #2823 from MycroftAI/bugfix/2822
Reorder operations to ensure removed Skills are first unloaded.
2021-02-05 07:43:16 +09:30
Kris Gesling cae1cb751f Extend GUI interface unittests 2021-02-04 16:12:22 +09:30
Kris Gesling bfe2b59f90 Add get method for accessing GUI values 2021-02-04 16:12:22 +09:30
Kris Gesling 688d1fe438 Reorder operations to ensure removed Skills are first unloaded.
Prevents SkillManager from attempting to reload a Skill that has
just been removed from the system which results in a
FileNotFoundError

Fixes #2822
2021-02-04 11:56:29 +09:30
Chris Veilleux 5fe7949bfd Added code to pass the packaging_type config to the pairing code endpoint. This was done to know if a device uses a Pantacor image. Selene will use this information to retrieve device information from Pantacor using their API. 2021-02-02 19:27:01 -06:00
Chris Veilleux 1efa60e695 Merge branch 'feature/mark-2' of https://github.com/MycroftAI/mycroft-core into feature/mark-2 2021-02-02 19:22:27 -06:00
Chris Veilleux dcf54c0cc3 Refactored to abstract out duplicate code. 2021-02-02 19:22:20 -06:00
Kris Gesling 4c4250a079
Merge pull request #2821 from forslund/refactor/stop-speaking
Refactor/stop speaking
2021-02-02 16:40:56 +09:30