Commit Graph

3017 Commits (a76c3a6e7a0bc8551437766a381307ae06c3ddae)

Author SHA1 Message Date
Steve Penrod b9fb463727 Fleshing out GUI mechanisms, CLI "GUI"
Further fleshing out of the GUI mechanisms
* Support for data and page from Mycroft -> GUIConnection
* Add a 'reconnecting' event for the messagebus
* Add MycroftSkill.show_url()
* Plumb MycroftSkill.gui into the messagebus
* Implement MycroftSkill.gui dictionary

CLI extensions for the GUI:
* Can now act as a simple GUIConnection
* Minor revamp of messagebus connection, provides kinder handling when
  messagebus isn't found or ready.
* BUGFIX: An empty filter would filter ALL messages
* BUGFIX: Input wider than the screen would cause a crash
* BUGFIX: "filter" or "find" with no param would filer "filter" or find "find"
2018-11-21 02:05:28 -06:00
JarbasAI 29310363d7 fix converse (#1884)
- Fix Exception on non-existing instances crashes the handle_converse_request()
- Report error to intent service
- Cleanup of converse related code.
2018-11-20 14:31:49 +01:00
Michael Nguyen e19062cccd
Merge pull request #1871 from forslund/bugfix/audioservice-stop
Bugfix CPS Starting audio
2018-11-19 14:54:54 -06:00
Jaime Muñoz Martín 70cb8251d7 Catalan translation added (#1881)
Add catalan
2018-11-19 20:43:26 +01:00
JarbasAI 60d2905678 feature/extract multiple numbers from text (#1867)
Add extract_numbers() function

The function extracts all numbers from the input string and returns them as a list.
2018-11-19 12:39:59 +01:00
Åke 4e35604d70
Merge pull request #1870 from JarbasAl/feature/improve_datetime
improve datetime parsing
2018-11-17 09:14:41 +01:00
jarbasal fa2b3007a9 improve datetime parsing with long times and a couple
add support for decades, centuries, millemniums
add support for "within the hour", "in a second/minute",
add support for "a couple time_unit" and "a couple of time_unit"
2018-11-17 09:03:41 +01:00
Åke 77c0b1c626
Merge pull request #1873 from JarbasAl/bugfix/utt_remainder
bugfix/utterance remainder, only replace complete words
2018-11-17 09:00:33 +01:00
jarbasal 4e3667e21c Only replace complete words in message remainder
Replace str.replace() with simple regex
2018-11-17 08:35:40 +01:00
Åke 3fc39e8ed2 Skilltester extension for Common Playback Skill functions (#1864)
* Add lt and gt to skill tester evaluation vocabulary

lt returns True if message item is LESS THAN the value in the config
gt returns True if message item is GREATER THAN the value in the config

* Add separate Exception for Skilltest errors

* Add support for common playback skill messages

CPS_query:

new test json possibilities
play_query: Emits a message that can be catched by CPS_match_query_phrase()
play_query_match: Structure with info of the expected match
  "phrase": matched phrase
  "confidence_threshold": The minimum confidence the phrase should result in

Example:
{
  "play_query": "the news",
  "play_query_match": {
    "phrase": "the news",
    "confidence_threshold":  0.8
  }
}

"play_start": Emits message that can be catched by CPS_start using sub-fields.
  "phrase": matched phrase
  "callback_data": dict with info for the function

Example:
{
  "play_start": {
    "phrase": "the news",
    "callback_data": {
    }
  },
  "expected_data": {"__type__": "mycroft.audio.service.play"}
}
2018-11-16 17:58:17 -06:00
Kathy Reid af386b974f
Merge pull request #1872 from MycroftAI/documentation/new-modules
Update api documentation
2018-11-16 22:41:41 +11:00
Åke Forslund a67a60a8eb Remove bare except 2018-11-16 12:14:09 +01:00
Åke Forslund 986e70ec9b Add docstrings for play_* methods 2018-11-16 12:03:42 +01:00
Åke Forslund bf390bcac9 Fix typos in CommonPlaySkill docstrings 2018-11-16 11:50:48 +01:00
Åke Forslund a2a059302d Fix outdatede references in the documentation
Correct the docs reference to the old name of the extract_number and remove the nonexisting convert_number reference.
2018-11-16 11:49:17 +01:00
Åke Forslund c659faaf92 remove the old generate_sdk_docs.py
replace it with sphinxdoc

./start-mycroft.sh sdkdoc html will generate the same documentation as
on readthedocs.org
2018-11-15 17:49:53 +01:00
Åke Forslund 9aab8ded74 Add CommonPlaySkill and utils to docs
Added
- CommonPlaySkill
- mycroft.util.parse
- mycroft.util.time
2018-11-15 17:33:52 +01:00
Åke Forslund 8859ff1d3b Don't stop audio right after play start
The common play skill sends a stop message in the CPS_start(), if the play message is sent too close to the stop message it may be executed before the stop message causing playback to immediately stop.

To circumvent this a 1 second stop ignore time is added.
2018-11-15 13:57:17 +01:00
Francis Tyers fad4c71398 Update mycroft.conf (#1869)
Make it clearer how to blacklist skills, e.g. it's the `basename()` of the directory where the skill lives.
2018-11-12 20:23:04 -05:00
devs-mycroft b596b4296d Version bump from 18.8.4 to 18.8.5 2018-11-08 15:46:48 +00:00
Steve Penrod dbd3675156 Fixing a few bugs and adding test code to fire up a weather skill visualization upon GUI connection.
Still very much a work in progress.

For understand and testing, here is the sequence:

STEP 1:  GUI announces itself
* Connect to the main Mycroft messagebus
* Send:  "mycroft.gui.connected" with data { "gui_id": XXX } where XXX is a uniq ID (uuid)

STEP 2:  Mycroft creates GUI socket
* Mycroft extracts the gui_id
* Mycroft prepares a socket and announces its availability on the Mycroft messagebus with:
        self.bus.emit(Message("mycroft.gui.port",
                              {"port": self.GUIs[gui_id].port,
                               "gui_id": gui_id}))

STEP 3:  GUI connects
In python, a very minimal test socket handler on the GUI side would look like this

  from websocket import create_connection

  port = 18181 (from the message above)
     ws = create_connection("ws://0.0.0.0:"+port+"/gui")

  ws.send("Hello, World")
  print("Sent")
  print("Receiving...")
  result =  ws.recv()
  print("Received '%s'" % result)
  ws.close()
2018-11-07 11:06:57 -06:00
Åke 279256f515
Merge pull request #1866 from JarbasAl/datetime_improvements
extract date time improvement/bugfix
2018-11-07 09:11:38 +01:00
jarbasal d9a905c8b1 extract date time improvements 2018-11-07 04:14:21 +00:00
Steve Penrod aede71db86 First pass at support for the Qt/QML display:
Enclosures
* Create a mechanism to instantiate unique Enclosure classes, depending on the platform found in the SYSTEM mycroft.conf
* Implement a generic Enclosure, which support the new GUI protocol
* Implement a Mark 1 Enclosure (expects the serial connection to an Arduino)
* Implement the start of a Mark II enclosure
* Implement a generic enclosure (no screen)
* Implement the GUI announcement and protocol basics

MycroftSkill
* Implement the basis of the GUI-controlling interfaces.  Namely:
  - MycroftSkill.show_text()
  - MycroftSkill.show_image()
  - MycroftSkill.show_html()
  - MycroftSkill.show_page()
  - MycroftSkill.gui to set values for page displays.

Configuration
* Add "gui_websocket" to the mycroft.config.py
2018-11-06 01:48:16 -06:00
Kathy Reid 1de272cf6e
Merge pull request #1861 from MycroftAI/feature/mycroft-skill-member-docs
Update MycroftSkill api documentation
2018-11-06 02:55:59 +11:00
Kathy Reid adc3214f79
Update README.md
Minor typos
2018-11-06 02:40:58 +11:00
Åke a377de2111
Merge pull request #1862 from MycroftAI/hotfix/upgrade-requests
Update requirements.txt
2018-11-05 14:14:10 +01:00
Kathy Reid a8a423bd10
Update requirements.txt
Update requests to 2.22.0 as per CVE
https://nvd.nist.gov/vuln/detail/CVE-2018-18074
2018-11-05 23:29:18 +11:00
Åke f4209cca68
Merge pull request #1834 from gauravjuvekar/dev
Replace hard coded data directory path in echo
2018-10-30 16:10:37 +01:00
Åke Forslund 18f7bb707f Add docs for some MycroftSkill members of interest 2018-10-29 20:09:26 +01:00
Åke Forslund 7535dba704 Add Readme for documentation building 2018-10-29 20:07:14 +01:00
Åke Forslund 85c24cab11 Remove parameter type None for unknown members 2018-10-29 20:07:14 +01:00
Åke Forslund 8ff2658cfc Update docs build system to work in python3 2018-10-29 18:44:28 +01:00
devs-mycroft d394994e45 Version bump from 18.8.3 to 18.8.4 2018-10-26 16:00:25 +00:00
Åke 8174118bc0
Merge pull request #1860 from forslund/bugfix/skills-json-uninstalled-skills
Fix issue listing uninstalled skills in skills.json
2018-10-26 13:30:56 +02:00
Åke Forslund 25e9eb12c0 Fix issue listing uninstalled skills in skills.json
All skills known by msm was added to the skills.json, this makes sure only local skills are added
2018-10-26 12:59:52 +02:00
Åke a90aa26803
Merge pull request #1859 from MycroftAI/feature/skill_data_upload
Feature/skill data upload
2018-10-26 10:36:43 +02:00
Åke Forslund 7666acea58 Fix updating beta skills
"HEAD" doesn't actually update to latest remote head to make the update work None is needed.
2018-10-25 14:56:48 +02:00
Åke Forslund 9bcddaf69a Upload skill manifest on write
- Convert skills.json format to new representation and upload
- Store skill installation time when installing defaults
2018-10-24 22:11:35 +02:00
Åke cab63efa5a Support detach_skill in padatious_service (#1846)
The registered intents are now stored in a list. When a detach_skill message is received the list is checked for matching intents and the intents are removed
2018-10-24 10:26:06 -05:00
Åke Forslund a5545bcb03 Add skills json upload endpoint to api 2018-10-24 13:28:33 +02:00
Åke 84694bec67
Merge pull request #1857 from forslund/bugfix/audioservice-invalid-utterance
Bugfix/audioservice invalid utterance
2018-10-23 23:11:30 +02:00
Åke Forslund b1f2ff27a0 make CPS_Start not override utterance parameter
If an utterance is provided already the method shall not try to override it with a stored utterance.
2018-10-23 18:31:19 +02:00
Åke Forslund 6dcb6a4290 Handle utterances set to None in play()
play would happily send on None to the audioservice even though it's not a proper sentence. This will handle None and default it to an empty string.
2018-10-23 18:21:10 +02:00
Åke 1a7cb0a177 Feature/rhel (#1856)
* Add test separating centOS and Fedora

Use /etc/os-release scanning for the ID present in os-release. Which is
supported by most modern linux distributions.

* Add Redhat Enterprise Linux
2018-10-19 15:37:18 -05:00
Åke e3c26b76dc Add test separating centOS and Fedora (#1852)
Use /etc/os-release scanning for the ID present in os-release. Which is
supported by most modern linux distributions.
2018-10-19 15:18:05 -05:00
Åke a8ad991029
Merge pull request #1848 from nielstron/feature/unittest_dialog
Test: dialog component
2018-10-16 17:03:04 +02:00
Åke 0f5c851fd9 Add support for comment lines in dialog files (#1847)
Only lines not starting with '#' will be loaded.
2018-10-15 13:35:24 -05:00
Niels Mündler fa1a96852b Unify badge style (#1849)
The "PRs Welcome" badge in README.md was flat-styled.  Change to the default style of all other badges in the README file
2018-10-15 13:33:58 -05:00
Matthew D. Scholefield 6f0489423c
Merge pull request #1618 from forslund/feature/test-report-loading-issues
Add info when skill fails to load during tests
2018-10-15 11:21:49 -05:00