Commit Graph

546 Commits (631875d9c2518ac33ac59b18dadc4dea393dec3b)

Author SHA1 Message Date
Matthew D. Scholefield a33cc35b39 Fully fix wake up functionality 2017-07-05 17:37:26 -05:00
Matthew D. Scholefield e11bb52853 Fix wake up 2017-07-05 17:11:26 -05:00
Matthew D. Scholefield c2b2134a12 Make Wake Word detection modular (#876)
This separates Pocketsphinx into its own class allowing other wake word recognizes to be switched in easier.
2017-07-05 14:26:34 -05:00
Steve Penrod 96c08189ed Revert "This add comments to document the message class" 2017-06-30 00:41:20 +02:00
penrods 0eee71d90f Fixed the allow_timeout (used in out-of-the-box); and a wifi setup disconnect tweak
* The allow_timeout value was tested poorly, preventing it from actually doing anything
* Upped the number of arp/ping test failures from 3 to 6 when validating the connection.  This makes falsely detecting a wifi setup disconnect pretty unlikely.
2017-06-29 17:10:14 -05:00
Art McGee 355225ee3d Merge branch 'dev' into amcgee7_docs 2017-06-29 07:17:19 -07:00
Art McGee 8323f193f0 Merge branch 'amcgee7_docs' of https://github.com/amcgee7/mycroft-core into amcgee7_docs 2017-06-26 13:55:27 -07:00
kfezer@gmail.com 12ebabb70f Changing how SSH is enabled.
Now using systemctl for both enabling and disabling\
	modified:   mycroft/client/wifisetup/main.py
2017-06-26 13:52:52 -07:00
Arron Atchison cf14c64f5a Update main.py 2017-06-26 13:52:52 -07:00
Arron Atchison 9d36ad5d20 Update version.txt 2017-06-26 13:52:52 -07:00
kfezer@gmail.com 517034bd73 Added command line calls to enable/ disable ssh
Fixed issue where ssh.enable was emitting wrong message
	Tested mycroft.dialog.get
	modified:   mycroft/client/enclosure/__init__.py
	modified:   mycroft/client/wifisetup/main.py
2017-06-26 13:52:52 -07:00
penrods 7b1cfbca1f Minor code restructure to simplify _record_phrase()
Basically just moved the signal-related code into a helper method.
2017-06-26 13:52:52 -07:00
penrods bd4e3836d3 Improved handling of button press
Improved the way the button press is handled.  Now the listener gives the rest
of the system a moment to consume the button press before it interprets it
as a request to begin listening.

Also replaced the use of the "buttonPress" signal when "expect_response"
was indicated with an utterance.  Now the signal "startListening" is
created, differentiating it from a buttonPress.
2017-06-26 13:52:52 -07:00
penrods 8bd28e11ce Support for Mark 1 SSH > BLOCK menu item
This implements the handler for the Mark 1 menu item SSH > BLOCK (the inverse of SSH > ALLOW)
* Added handler for "unit.disable-ssh" on the serial line. This turns around and emits "mycroft.disable.ssh" on the messagebus.
* Removed the automatic reboot, just let the user know it will be different after a restart
* Made the spoken message translatable
* Changed mycroft.dialog.get() to not require the "lang" parameter.  It will default to the mycroft.conf value.
2017-06-26 13:52:52 -07:00
penrods fa32ff303a Restore the drawing of icons when showing weather.py
This implements the image drawing functionality of the lastest Mark 1 enclosure instead of the old numeric weather icon codes.
2017-06-26 13:52:52 -07:00
Augusto Monteiro 'Sparky 55780dbc4a Fixing demo mode, sending two events on message bus 2017-06-26 13:52:52 -07:00
kfezer@gmail.com c851461c4e increases boot delay on reboot after ssh and reset
modified:   mycroft/client/enclosure/__init__.py
2017-06-26 13:52:52 -07:00
Arron Atchison 0cdfaf3ae7 bump enclosure version to 0.1.22 2017-06-26 13:52:52 -07:00
Augusto Monteiro 'Sparky bd93b1f2dc Adding demo mode
* Sending an event to messagebus when demo button is pressed
2017-06-26 13:52:52 -07:00
kfezer@gmail.com 551b4d4da3 Fixes error with wpa_supplicant string
modified:   mycroft/client/wifisetup/main.py
2017-06-26 13:52:52 -07:00
Steve Penrod faa3070f3c Adding localization mechanism for strings embedded in mycroft-core code (#717)
* Adding localization mechanism for strings embedded in mycroft-core code

Added mycroft.dialog.get() function.  This behaves much like the localization
mechanism for dialogs in Skills.  So you can do things like this:

   lang = "en-us"
   str = mycroft.dialog.get("how are you", lang)

Which will look in mycroft/res/text for the dialog file containing strings to
use as templates for the actual output.  This depends on the language being
currently used.  When operating in English this would be:

   mycroft/res/text/en-us/how are you.dialog

This function will pick a random line from that file to assign to str.

A more advanced use is to embed placeholders in the strings within the
template file.

   lang = "en-us"
   ctx = {"time" : "noon"}
   str = mycroft.dialog.get("current time", lang, ctx)

And the random template line picked was "the current time is {{time}} ", then
the output would be:

   "the current time is noon"
2017-06-26 13:52:52 -07:00
kfezer@gmail.com 0a358faf79 modified: mycroft/client/wifisetup/main.py 2017-06-26 13:52:52 -07:00
kfezer@gmail.com 1cc2964999 modified: mycroft/client/enclosure/__init__.py 2017-06-26 13:52:52 -07:00
kfezer@gmail.com bc94caab84 modified: mycroft/client/wifisetup/main.py 2017-06-26 13:52:52 -07:00
kfezer@gmail.com cd75da2b5b modified: mycroft/client/wifisetup/main.py 2017-06-26 13:52:52 -07:00
kfezer@gmail.com b5ec28ed27 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-06-26 13:52:52 -07:00
kfezer@gmail.com 579ddef45a modified: mycroft/client/wifisetup/main.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com 93b7b84642 modified: mycroft/client/wifisetup/main.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com c6302cfe1f modified: mycroft/client/wifisetup/main.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com 227d9c6772 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-06-26 13:50:06 -07:00
kfezer@gmail.com 19529472d7 modified: mycroft/client/wifisetup/main.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com 96caff8d32 modified: mycroft/client/enclosure/__init__.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com fa404d8ada modified: mycroft/client/wifisetup/main.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com 73f6442b8d modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-06-26 13:50:06 -07:00
kfezer@gmail.com b3a5990c08 modified: mycroft/client/enclosure/__init__.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com 52dc611aea modified: mycroft/client/enclosure/__init__.py 2017-06-26 13:50:06 -07:00
kfezer@gmail.com 176c8ffdb9 modified: mycroft/client/enclosure/__init__.py 2017-06-26 13:50:06 -07:00
kfezer 900d12138a Update __init__.py
Adds delay to the wifi reset
2017-06-26 13:48:09 -07:00
kfezer@gmail.com ec47a9de34 modified: mycroft/client/wifisetup/main.py 2017-06-26 13:48:09 -07:00
kfezer@gmail.com 05e42938e9 deleted: mycroft/client/wifisetup/wpa_supplicant.conf.master 2017-06-26 13:48:09 -07:00
kfezer@gmail.com 7b9ec9c326 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/speech/mic.py
	modified:   mycroft/client/wifisetup/main.py
	new file:   mycroft/client/wifisetup/wpa_supplicant.conf.master
2017-06-26 13:48:09 -07:00
Åke Forslund 856d3b3dff Stop multi-sentence speech 2017-06-26 13:48:09 -07:00
Åke Forslund 72dcc233d1 Enforce float as threshold value to pocked sphinx 2017-06-26 13:45:23 -07:00
Michael Nguyen eeda583576 rename functions, delete extra code comment 2017-06-21 13:19:00 -05:00
Matthew D. Scholefield fc3ede120c Fix cli bugs
- Add keycode 127 as backspace
 - Run tts in another thread to suppress output
2017-06-20 13:37:51 -05:00
Michael Nguyen 09cd00a31b darn pep8 2017-06-16 16:14:16 -05:00
Michael Nguyen 3ce86ebba4 fixed bugs in display manager 2017-06-16 15:54:55 -05:00
Michael Nguyen a2853e2288 fixed merge conflict 2017-06-16 13:34:40 -05:00
Michael Nguyen c0b603ab51 state manager implemented 2017-06-16 13:31:44 -05:00
Ethan Ward c9893806ea #824 Change has_been_paired to load the current identity file (#825)
* Change has_been_paired to load the current identity file

* Add clarifying comment and fix pep8
2017-06-13 17:32:14 -05:00
Åke Forslund b38af90fac fix pep8 2017-06-13 14:17:21 +02:00
penrods 582b77891e One more pass at onboarding, including a major bug fix:
* BUGFIX: The big bug was calling is_paired() during wake_word_in_audio().  When not paired, that call hit the server, taking about a second.  Since it happened multiple times a second, the audio buffers got backed up hugely.  This resulted in weird behavior later as the buffers get cleared out.
* Added mycroft.api.has_been_paired(), which just looks for the pairing key (it does not validate it is still active with the server, like is_paired())
* The enclosure now checks for internet connectivity and kicks off the wifisetup process, not the wifisetup client itself.
* During the "onboarding" process, the microphone is muted using the new "mycroft.mic.mute" message.  After pairing completes, the "mycroft.mic.unmute" is expected to be sent from the pairing skill.  Unmuting again after a re-pairing is harmless.
* mute_and_speak() is smart enough to not unmute itself when complete if muted before
* util.check_for_signal() now accepts -1 as the lifetime.  This means it never times out.
* util.stop_speaking() is more intelligent about shutting down the spoken text (including text that has been split at periods) and visemes
2017-06-13 05:35:06 -05:00
penrods 32e32ed185 Minor onboarding refinements
* The wifi setup no longer stops after 5 minutes unless already paired (i.e. still onboarding)
* The mouth resets on wifisetup stop (clearing the scrolling home.mycroft.ai)
* Changed several ConfigurationManager.get() calls to ConfigurationManager.instance().  Exactly the same, but .instance() is clearer/preferred.
* Added a mycroft.util.stop_speaking() method.  Not perfect, but works for now and can be replaced later when AudioManager is in place.

A forthcoming change to the pairing skill will utilize the stop_speaking method.
2017-06-12 02:57:22 -05:00
Michael Nguyen a6917c7712 added info to docstring information 2017-06-08 14:35:31 -05:00
Michael Nguyen 6fc9e034f7 extracted encode png function into mouth_display_png function for a cleaner interface 2017-06-08 12:39:42 -05:00
Michael Nguyen 17d0c418c6 syntax issues 2017-06-07 18:25:43 -05:00
Michael Nguyen 1302f26c32 fixed pep8 issues - added ability to encode png images to the MarkI faceplate 2017-06-07 18:08:29 -05:00
Michael Nguyen 5d40939666 Merge branch 'dev' of https://github.com/MycroftAI/mycroft-core into mouth_display_feature 2017-06-07 17:27:20 -05:00
Michael Nguyen 7df83897ba added function in api.py to encode png images and display to Mark I faceplate 2017-06-07 17:19:26 -05:00
penrods 84dd10e243 Fixing pep8 whitespace errors... grrr 2017-06-07 11:45:06 -05:00
penrods ffc3f6ec60 Implementing changes to out-of-the-box experience, providing an "onboarding" process.
* Added a mycroft.api.is_paired() method
* Added mycroft.util.is_speaking and mycroft.util.wait_while_speaking() methods
* RESET now waits for the spoken notice to complete
* Stopped the "Checking for updates" and "Skills updated" prompts (commented out for now, probably will eliminate)
* Wifi setup filters out hidden ("x00") networks
* Visemes should keep up better if they get behind (will skip)
* Mimic is now searched for on the users path
* Onboarding process:
  - wifi setup starts automatically
  - User is walked through the process
  - wake word and button pressing are ignored
  - At end, a short tutorial is given
2017-06-07 11:45:06 -05:00
Arron Atchison 7d1d2cefcf enclosure version bump to 0.3.1 2017-06-07 11:25:41 -05:00
Michael Nguyen 7e4ba487fa added display 2017-05-31 17:24:20 -05:00
kfezer 104dda1ab1 Merge pull request #774 from forslund/feature/update-config
Update TTS, STT and listener when websettings are changed
2017-05-30 16:45:42 -07:00
Åke Forslund ee90e8f50e Make wake word listener have length depending on number of phonemes 2017-05-26 07:50:49 +02:00
Arron Atchison 659d9a2bf3 removed "uppercase" from wifi setup dialog 2017-05-22 14:17:09 -05:00
aatchison 01730856aa changed wifi setup password to 12345678 2017-05-22 13:42:23 -05:00
Åke Forslund b31c7b6647 Add docstrings. 2017-05-22 19:12:00 +02:00
Åke Forslund 925cadc19e Add support for switching tts and settings
- If tts config hash has changed re-initialize tts
- Cache is cleared on mimic initialization
2017-05-20 21:43:53 +02:00
Åke Forslund 7da9f5a965 Add functionality to update listener/STT config
When a new configuration is discovered the producer and consumer is shutdown, the config is read and a new producer-consumer pair is launched.
2017-05-20 21:38:35 +02:00
penrods f9987c7c55 Converting last_internet_notification to a class instead of instance variable
I'm not 100% certain why this is needed, to be honest.  Maybe something I don't get about Python and threads?  This fixes double-announcements about connecting to the internet.
2017-05-18 16:53:10 -03:00
penrods b0559a50af User prompts to help the Mark 1 get connected to the internet didn't always occur
On the Mark 1 device, there is a sequence of events that produce a guide to the user for getting their device setup and connected to the internet.  This process is basically:
* Enclosure client starts up, sending a message to the Arduino
* When/if the Arduino responds, it checks for a live internet connection
* If no connection is found, the user is prompted
However the speech client was sometimes not fully up, so the request to speak the prompt was sent before it was listening.

Additionally, sometimes events would occur that caused the prompt to connect the unit multiple time in a row.  This commit limits the prompts to a max of once every 30 seconds.

Finally, I commented the code and renamed some of the methods to clarify this sequence of events.  The code:
   Timer(5, self.stop).start()
and:
   def stop(self):
        if not self.started:
            self.writer.stop()
Are some of the most confusing lines of code I've ever seen.  :)

Major changes:
* The messagebus message "enclosure.start" is now "enclosure.started"
* Enclosure.start() is now Enclosure.on_arduino_responded()
* Enclosure.started is now Enclosure.arduino_responded
* Added Enclosure.last_internet_notification to track notification times
* The notification call to the speech client is now delayed by 5 seconds, providing time for the speech client to come up.  (And an additional check is run to verify the connection is still down immediately before the verbal prompt is spoken)
2017-05-18 16:53:10 -03:00
penrods ce815bcfe2 Correcting spelling error
Fixed a typo:  "diferent" instead of "different"
2017-05-18 16:53:10 -03:00
penrods 83e4f9e58f Restoring initial check for network and spoken prompt
The restores the initial check on bootup for network connectivity,
prompting the user to plug in the network cable or push the button
to start Wifi setup.

NOTE: This will need to be localized and handled by different
enclosures.
2017-05-18 16:53:10 -03:00
kfezer@gmail.com 07aa2f5cde Changing how SSH is enabled.
Now using systemctl for both enabling and disabling\
	modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:53:10 -03:00
Arron Atchison 62e7df5c18 Update main.py 2017-05-18 16:53:10 -03:00
Arron Atchison 7c05b51195 Update version.txt 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 7bde4a78d0 Added command line calls to enable/ disable ssh
Fixed issue where ssh.enable was emitting wrong message
	Tested mycroft.dialog.get
	modified:   mycroft/client/enclosure/__init__.py
	modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:53:10 -03:00
penrods 8bd9885ba4 Minor code restructure to simplify _record_phrase()
Basically just moved the signal-related code into a helper method.
2017-05-18 16:53:10 -03:00
penrods ee13925861 Improved handling of button press
Improved the way the button press is handled.  Now the listener gives the rest
of the system a moment to consume the button press before it interprets it
as a request to begin listening.

Also replaced the use of the "buttonPress" signal when "expect_response"
was indicated with an utterance.  Now the signal "startListening" is
created, differentiating it from a buttonPress.
2017-05-18 16:53:10 -03:00
penrods 1b200089c0 Support for Mark 1 SSH > BLOCK menu item
This implements the handler for the Mark 1 menu item SSH > BLOCK (the inverse of SSH > ALLOW)
* Added handler for "unit.disable-ssh" on the serial line. This turns around and emits "mycroft.disable.ssh" on the messagebus.
* Removed the automatic reboot, just let the user know it will be different after a restart
* Made the spoken message translatable
* Changed mycroft.dialog.get() to not require the "lang" parameter.  It will default to the mycroft.conf value.
2017-05-18 16:53:10 -03:00
penrods 317b497d5f Restore the drawing of icons when showing weather.py
This implements the image drawing functionality of the lastest Mark 1 enclosure instead of the old numeric weather icon codes.
2017-05-18 16:53:10 -03:00
Augusto Monteiro 'Sparky 0245fbe5d2 Fixing demo mode, sending two events on message bus 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 570687d04a increases boot delay on reboot after ssh and reset
modified:   mycroft/client/enclosure/__init__.py
2017-05-18 16:53:10 -03:00
Arron Atchison 95a235dd6e bump enclosure version to 0.1.22 2017-05-18 16:53:10 -03:00
Augusto Monteiro 'Sparky 8232772ee6 Adding demo mode
* Sending an event to messagebus when demo button is pressed
2017-05-18 16:53:10 -03:00
kfezer@gmail.com 18e5127cf9 Fixes error with wpa_supplicant string
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:53:10 -03:00
Steve Penrod c44d386a35 Adding localization mechanism for strings embedded in mycroft-core code (#717)
* Adding localization mechanism for strings embedded in mycroft-core code

Added mycroft.dialog.get() function.  This behaves much like the localization
mechanism for dialogs in Skills.  So you can do things like this:

   lang = "en-us"
   str = mycroft.dialog.get("how are you", lang)

Which will look in mycroft/res/text for the dialog file containing strings to
use as templates for the actual output.  This depends on the language being
currently used.  When operating in English this would be:

   mycroft/res/text/en-us/how are you.dialog

This function will pick a random line from that file to assign to str.

A more advanced use is to embed placeholders in the strings within the
template file.

   lang = "en-us"
   ctx = {"time" : "noon"}
   str = mycroft.dialog.get("current time", lang, ctx)

And the random template line picked was "the current time is {{time}} ", then
the output would be:

   "the current time is noon"
2017-05-18 16:53:10 -03:00
kfezer@gmail.com 8b6be6e26b modified: mycroft/client/wifisetup/main.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 07ec6bd422 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 6f31c93fc0 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com ea6e3c2539 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 8669599461 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:53:10 -03:00
kfezer@gmail.com 5f70f5117c modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 85c6cb6a72 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 8935259889 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 0b8e033d1c modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:51:54 -03:00
kfezer@gmail.com 3830d619d8 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com ed249471f8 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com bb756882d3 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 46286b4cc2 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:51:54 -03:00
kfezer@gmail.com f02470d6a0 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 353999b2a9 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com d8565bb429 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 554fc09bc8 Adding SSH enable option
modified:   client/enclosure/__init__.py
2017-05-18 16:51:53 -03:00
kfezer 0c521107ab Update __init__.py
Adds delay to the wifi reset
2017-05-18 16:51:17 -03:00
kfezer@gmail.com 5731054eab modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:17 -03:00
kfezer@gmail.com 68f8bc262c deleted: mycroft/client/wifisetup/wpa_supplicant.conf.master 2017-05-18 16:51:17 -03:00
kfezer@gmail.com 65b1810b40 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/speech/mic.py
	modified:   mycroft/client/wifisetup/main.py
	new file:   mycroft/client/wifisetup/wpa_supplicant.conf.master
2017-05-18 16:51:17 -03:00
Åke Forslund 0c9f3ebefb Stop multi-sentence speech 2017-05-18 16:51:17 -03:00
Art McGee f5ec8b74a3 Changes to record mycroft wake word when configured to do so. (#538)
NOTE: this doesn't check for disk space and doesn't clean up
file stored in /tmp/ called mycroft_wake_sucess<time>.wav

TODO: some cleanup should be considered.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-05-18 16:49:07 -03:00
Åke Forslund aa0756a3f3 Enforce float as threshold value to pocked sphinx 2017-05-18 16:49:07 -03:00
kfezer@gmail.com d68b1dddb3 Changing how SSH is enabled.
Now using systemctl for both enabling and disabling\
	modified:   mycroft/client/wifisetup/main.py
2017-05-08 19:32:56 -07:00
Arron Atchison fb912215af Update main.py 2017-05-08 19:07:24 -07:00
kfezer c7af7cfc70 Merge pull request #744 from MycroftAI/feature/ssh-disable
Support for Mark 1 SSH > BLOCK menu item
2017-05-08 17:21:48 -07:00
Arron Atchison 3c42443e04 Update version.txt 2017-05-08 16:34:16 -07:00
kfezer@gmail.com d77709e1f9 Added command line calls to enable/ disable ssh
Fixed issue where ssh.enable was emitting wrong message
	Tested mycroft.dialog.get
	modified:   mycroft/client/enclosure/__init__.py
	modified:   mycroft/client/wifisetup/main.py
2017-05-08 16:30:51 -07:00
penrods 6428063531 Minor code restructure to simplify _record_phrase()
Basically just moved the signal-related code into a helper method.
2017-05-08 15:44:36 -07:00
penrods 6399644032 Improved handling of button press
Improved the way the button press is handled.  Now the listener gives the rest
of the system a moment to consume the button press before it interprets it
as a request to begin listening.

Also replaced the use of the "buttonPress" signal when "expect_response"
was indicated with an utterance.  Now the signal "startListening" is
created, differentiating it from a buttonPress.
2017-05-08 15:44:36 -07:00
penrods 771d773931 Support for Mark 1 SSH > BLOCK menu item
This implements the handler for the Mark 1 menu item SSH > BLOCK (the inverse of SSH > ALLOW)
* Added handler for "unit.disable-ssh" on the serial line. This turns around and emits "mycroft.disable.ssh" on the messagebus.
* Removed the automatic reboot, just let the user know it will be different after a restart
* Made the spoken message translatable
* Changed mycroft.dialog.get() to not require the "lang" parameter.  It will default to the mycroft.conf value.
2017-05-08 13:37:18 -07:00
penrods 497de370a2 Restore the drawing of icons when showing weather.py
This implements the image drawing functionality of the lastest Mark 1 enclosure instead of the old numeric weather icon codes.
2017-05-07 19:53:24 -07:00
kfezer 27c9a03a52 Merge pull request #733 from MycroftAI/hotfix/fix-demo-mode
Fixing demo mode, sending two events on message bus
2017-05-05 16:20:37 -07:00
Augusto Monteiro 'Sparky e77082baf7 Fixing demo mode, sending two events on message bus 2017-05-05 16:12:11 -07:00
kfezer@gmail.com 083ac3fb6b increases boot delay on reboot after ssh and reset
modified:   mycroft/client/enclosure/__init__.py
2017-05-05 13:25:00 -07:00
Arron Atchison 27cbd14def bump enclosure version to 0.1.22 2017-05-05 12:17:52 -07:00
Augusto Monteiro 'Sparky 4328e869a9 Adding demo mode
* Sending an event to messagebus when demo button is pressed
2017-05-04 15:46:37 -07:00
kfezer@gmail.com 6bb6de324c Fixes error with wpa_supplicant string
modified:   mycroft/client/wifisetup/main.py
2017-05-03 17:59:33 -07:00
kfezer@gmail.com 1ee3b82766 modified: mycroft/client/wifisetup/main.py 2017-05-03 15:52:29 -07:00
kfezer 754015f722 Merge branch 'dev' into feature/enable-ssh 2017-05-03 15:40:24 -07:00
kfezer ecd9ae07e3 Merge pull request #720 from MycroftAI/feature/wifi-reset
Feature/wifi reset
2017-05-03 15:33:58 -07:00
Steve Penrod e1fa41bff2 Adding localization mechanism for strings embedded in mycroft-core code (#717)
* Adding localization mechanism for strings embedded in mycroft-core code

Added mycroft.dialog.get() function.  This behaves much like the localization
mechanism for dialogs in Skills.  So you can do things like this:

   lang = "en-us"
   str = mycroft.dialog.get("how are you", lang)

Which will look in mycroft/res/text for the dialog file containing strings to
use as templates for the actual output.  This depends on the language being
currently used.  When operating in English this would be:

   mycroft/res/text/en-us/how are you.dialog

This function will pick a random line from that file to assign to str.

A more advanced use is to embed placeholders in the strings within the
template file.

   lang = "en-us"
   ctx = {"time" : "noon"}
   str = mycroft.dialog.get("current time", lang, ctx)

And the random template line picked was "the current time is {{time}} ", then
the output would be:

   "the current time is noon"
2017-05-03 21:25:17 +02:00
kfezer@gmail.com 52122894dc modified: mycroft/client/wifisetup/main.py 2017-05-03 10:07:55 -07:00
kfezer@gmail.com 282c7eadfa modified: mycroft/client/enclosure/__init__.py 2017-05-02 17:14:48 -07:00
kfezer@gmail.com feb25a6602 modified: mycroft/client/wifisetup/main.py 2017-05-02 16:49:45 -07:00
kfezer@gmail.com 745b43020e modified: mycroft/client/wifisetup/main.py 2017-05-02 16:48:17 -07:00
kfezer@gmail.com dcc91e17af modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-02 16:40:41 -07:00
kfezer@gmail.com 7615c2e6bd modified: mycroft/client/wifisetup/main.py 2017-05-02 13:50:25 -07:00
kfezer@gmail.com 1d58d7ad0f modified: mycroft/client/wifisetup/main.py 2017-05-02 13:38:31 -07:00
kfezer@gmail.com ff173dc5b0 modified: mycroft/client/wifisetup/main.py 2017-05-02 13:22:39 -07:00
kfezer@gmail.com d6b676795d modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-02 13:15:53 -07:00
kfezer@gmail.com afc2d5661a modified: mycroft/client/wifisetup/main.py 2017-05-02 13:07:43 -07:00
kfezer@gmail.com 0aca6c2797 modified: mycroft/client/enclosure/__init__.py 2017-05-02 12:45:54 -07:00
kfezer@gmail.com a9e8dd2f24 modified: mycroft/client/wifisetup/main.py 2017-05-02 10:48:45 -07:00
kfezer@gmail.com c8d020a45d modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-01 21:08:04 -07:00
kfezer@gmail.com f096d28d5a modified: mycroft/client/enclosure/__init__.py 2017-05-01 15:36:54 -07:00
kfezer@gmail.com 672016ea03 modified: mycroft/client/enclosure/__init__.py 2017-04-28 15:21:03 -07:00
kfezer@gmail.com 41e7109ba5 modified: mycroft/client/enclosure/__init__.py 2017-04-28 15:08:42 -07:00
kfezer@gmail.com ace3002bd0 Adding SSH enable option
modified:   client/enclosure/__init__.py
2017-04-28 14:01:34 -07:00
kfezer a8bcb84581 Update __init__.py
Adds delay to the wifi reset
2017-04-27 17:22:15 -07:00
kfezer@gmail.com a9cd201163 modified: mycroft/client/wifisetup/main.py 2017-04-27 15:54:57 -07:00
kfezer@gmail.com 3250b4a585 deleted: mycroft/client/wifisetup/wpa_supplicant.conf.master 2017-04-27 15:49:17 -07:00
kfezer@gmail.com 65a0dcfd67 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/speech/mic.py
	modified:   mycroft/client/wifisetup/main.py
	new file:   mycroft/client/wifisetup/wpa_supplicant.conf.master
2017-04-27 15:37:58 -07:00
Augusto Monteiro 697582d122 Merge pull request #698 from forslund/mycroftai-coveralls
Coveralls Coverage with Travis
2017-04-26 10:09:22 -07:00
Åke Forslund bf7957650c Stop multi-sentence speech 2017-04-26 16:54:13 +02:00
Åke Forslund 246bd9f455 Enforce float as threshold value to pocked sphinx 2017-04-25 23:12:38 +02:00
Art McGee eeb1f998e7 Changes to record mycroft wake word when configured to do so. (#538)
NOTE: this doesn't check for disk space and doesn't clean up
file stored in /tmp/ called mycroft_wake_sucess<time>.wav

TODO: some cleanup should be considered.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-04-23 16:54:06 -05:00
Steve Penrod 2eecfebaa7 Merge branch 'dev' into dev 2017-04-23 16:44:49 -05:00
Augusto Monteiro 'Sparky 28d15e2918 #478 - Adding toggle button on wifisetup 2017-04-13 20:04:08 -05:00
penrods 23c445a904 This fixes several issues related to wake-up words and audio recording, including #595.
* The wake up sound is now played synchronously, thus not included in the recorded audio
* The minimum recorded phrase must be at least 0.5 seconds (instead of 0.1), and must be continuously quiet for that duration
* The silence threshold is reset every time we begin listening for a wakeword
* The silence threshold adjusts upward to just above the ambient sound while waiting for the wake-word
* Reformatted some comments to use Google-style docstrings, and added more comments
2017-04-13 19:08:07 -05:00
Augusto Monteiro e3e3a89aaa Merge pull request #649 from MycroftAI/feature/issue-648
Several command line interface (CLI) improvements
2017-04-13 12:48:38 -07:00
penrods a2053712ee More CLI fixes/enhancements for #648
* Added log filtering commands to the CLI.  So you can do things within the CLI like:
   :filter DEBUG  (filters out any lines containing "DEBUG")
   :filter remove DEBUG (stop filtering "DEBUG")
   :filter "not this" (filters out any log lines containing "not this")
   :filter list (displays active filters)
   :filter clear (removes all filters)
* Added a ~/.mycroft-cli.conf configuration file.  It currently contains the last-used filters.
* The mycroft.sh scripts were firing up the "fancy" CLI in the background and logging it constantly.  This resulted in huge log files because of the constantly updated microphone level indicator.
2017-04-12 00:15:37 -07:00
Åke Forslund 7b0703f72b Catch and show errors in mute_and_speak() 2017-04-09 23:50:26 -07:00
penrods 16c9fa9f83 Several command line interface (CLI) improvements:
* The chat history section now wraps long text strings
* Redesigned the section title to combine the header and underscore lines into a single line to save screen space
* Recolored several screen elements to make more sense.  The query and the chat history now retain the cyan color, etc.
* The screen fully refreshes periodically, cleaning up garbage that might have accumulated from outside text being written to the terminal
* The mic meter no longer wraps around the screen when level numbers are too long
2017-04-09 18:16:45 -07:00
Åke Forslund 95641451fa Fix PEP-8 issues 2017-04-08 11:08:13 +02:00
DMendyke ed21c1471c Merge pull request #638 from MycroftAI/dmendyke.service.instance
Code to prevent multiple instances of a service
2017-04-07 15:40:26 -07:00
dmendyke c7645be49c Added PID locking to both 'voice' and 'service' services. 2017-04-06 12:59:31 -07:00
Augusto Monteiro 68be8f00c0 Merge pull request #619 from MycroftAI/feature/issue-618
#618 - Fixing volume skill
2017-03-31 14:29:01 -07:00
Augusto Monteiro 'Sparky b87b73ecc6 #618 - Fixing pep8 2017-03-31 14:12:17 -07:00
Augusto Monteiro 'Sparky 1bcdfc76b2 #618 - Fixing volume skill 2017-03-31 14:00:17 -07:00
Augusto Monteiro 13d99a29a0 Merge pull request #589 from MycroftAI/feature/issue-363
Open listener thread and then check for network connection
2017-03-30 17:19:37 -07:00
kfezer 0446d58ba3 Merge pull request #578 from SoloVeniaASaludar/bugfix/issue-577
speech client, error in control of interval between calls to wakeup recognizer #577
2017-03-29 17:30:46 +00:00
kfezer@gmail.com 7b43089a76 modified: mycroft/client/speech/listener.py
modified:   mycroft/util/__init__.py

Fixes 363
previously as pr Networking fix: resolves #363 #364

suggested by clccmh
2017-03-21 13:53:43 -07:00
Augusto Monteiro 0fe6ee65e0 Merge pull request #576 from forslund/expect_response
Add expect_response option to speak_methods
2017-03-20 14:55:24 -05:00
Augusto Monteiro 988f408c49 Merge pull request #587 from SoloVeniaASaludar/bufix/issue-586
Bufix/issue 586
2017-03-20 14:16:41 -05:00
SoloVeniaASaludar 4df486da82 Update mic.py 2017-03-20 19:41:33 +01:00
SoloVeniaASaludar 3c6a40c5ea Update mic.py 2017-03-20 19:40:30 +01:00
SoloVeniaASaludar e63cb1d628 Update mic.py 2017-03-18 11:02:33 +01:00
Åke Forslund be8dd47250 Add expect_response option to speak_methods
if expect_response flag is set to True the stt will be triggered just as if the wakeword has been received or the button on the mycroft enclosure has been pressed.
2017-03-17 20:20:27 +01:00
SoloVeniaASaludar ae59b1f69f Update listener.py 2017-03-17 19:06:29 +01:00
SoloVeniaASaludar 02195d22cd Update listener.py 2017-03-17 18:51:18 +01:00
SoloVeniaASaludar 08e7778538 Update listener.py 2017-03-17 18:21:06 +01:00
penrods cfa79e03a2 Fixes issue #539
The utterance is now placed on the bus along with its language code.  If not specified, it uses "en-us".

Added a new mycroft.util.parse module.  It contains the normalize() function.  Normalization currently does two things:
  * Expands contractions ("they're" -> "they are", etc)
  * Optionally removes articles ("a", "an", "the").  Removing is the default.
  * Textual numbers become digits, up to 20.  E.g. "What is the weather in four days" becomes "What is weather in 4 days".

NOTE:  This is potentially a breaking change!  Remove "the", "a" and "an" from your .voc files!

Skill changes:
  * I cleaned up the .voc files for the default Skills.
  * Split the date_time keyword into an extra entity.  Now a "QueryKeyword.voc" exists, with "what|tell" instead of combing that into "what is time" in the TimeKeyword.voc.
  * Volume skill now accepts 1-11, e.g. "turn volume to 11"
2017-03-14 13:43:45 -05:00
penrods bc9956cd68 Fixing sloppy copy/paste errors. 2017-03-10 16:23:00 -06:00
penrods 9fce7d4620 This implements CLI enhancements per issue #547
Main CLI enhancements:
* Microphone meter
* Long log line left/right scrolling
* Eliminated flicker
* VT100 ESC key code support (used by some terms)

In addition, to achieve the meter it was necessary to implement a mechanism for local Inter Process Communication (IPC).  This is achieved using the file-system.  By default a folder structure is created under /tmp/mycroft/ipc, but it can be directed to somewhere else by setting the config value in mycroft.conf:
    "ipc_path" : "/path/to/somewhere"
In the future, Mark 1 and Picroft will get RAM disks to avoid burning out the SD card.  This is also a very fast communication mechanism.  This is all hidden under util.get_ipc_directory()

Further, the named signal mechanism was changed to use the IPC folder.  The signal can have a lifetime now (not just one shot).
2017-03-10 01:30:15 -06:00
Art McGee 6d3d120517 Changes to record mycroft wake word when configured to do so.
NOTE: this doesn't check for disk space and doesn't clean up
file stored in /tmp/ called mycroft_wake_sucess<time>.wav

TODO: some cleanup should be considered.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-03-02 14:14:50 -08:00
penrods 49b1530976 Fixing color initialization. I assumed 16 colors were defined, but that isn't standard on all terminals. Now only assuming the first 8. 2017-02-27 15:15:13 -06:00
penrods 6feac48c13 Bug fix for when the log contains a really short line (less than 8 characters). 2017-02-27 15:15:13 -06:00
penrods b51bd4acd9 Further enhancements:
* Added "--simple" mode, to get the old cli behavior
* Rewrote to not use tail (works better with multiple log files)
* Added Ctrl+PgUp/Dn support for scrolling back in logs
* Added filtering
* Refined look and log coloring
* Added :help screen
* Added support for terminal resizing
2017-02-27 15:15:13 -06:00
penrods 9e937964b0 For issue #535
* Fixed pep8 errors
* Added monitoring of relative and system log files for both github and package installs.
2017-02-27 15:15:13 -06:00
penrods bd68c478d7 First check-in of enhanced command line interface (CLI):
* Uses curses
* Displays a "chat history" with requests and responses
* Shows filtered logs from mycroft-skills.log, mycroft-voice.log
* Start of framework for special ":" commands (for log searching, etc)
2017-02-27 15:15:13 -06:00
penrods e47e38c92c Fixes issue #528
Max recording time is now 10 seconds instead of 30.  This deals with cases where a noisy background prevents the listener's silence detection from triggering.  30 seconds was WAAY too long to keep listening -- nobody is going to be saying something that long for now.
2017-02-23 20:54:39 -08:00
Arron Atchison de00192dc6 all lil peps fixed 2017-02-15 15:37:52 -06:00
Arron Atchison c1ea573493 fixed pep8 in enclosure client folder 2017-02-15 15:37:52 -06:00
penrods 5f8775883a Refining new "listening" sound mechanism
This adds several refinements to the listening sound mechanism added by:
* Added a default sound file
* Allowing various ways to override "resource files" for customization
* Moved the sound configuration path from "confirm_ding" to
  "sounds" > "start_listening"
* Also added "sounds" > "end_listening" configuration for the future

This submission adds the new mycroft.util.resolve_resource_file(res_name)
method.  This method takes a name such as "snd/start_listening.wav" and
looks (in order):
* For an absolute path <res_name>
* For ~/.mycroft/<res_name>
* For /opt/mycroft/<res_name>
* For mycroft/res/<res_name> within the source package
2017-02-15 15:37:52 -06:00
Arron Atchison 990dd27c5e Revert "Refining new "listening" sound mechanism (#503)" 2017-02-15 15:37:52 -06:00
Steve Penrod a53a5bf0a6 Refining new "listening" sound mechanism (#504)
This adds several refinements to the listening sound mechanism added by:
* Added a default sound file
* Allowing various ways to override "resource files" for customization
* Moved the sound configuration path from "confirm_ding" to
  "sounds" > "start_listening"
* Also added "sounds" > "end_listening" configuration for the future

This submission adds the new mycroft.util.resolve_resource_file(res_name)
method.  This method takes a name such as "snd/start_listening.wav" and
looks (in order):
* For an absolute path <res_name>
* For ~/.mycroft/<res_name>
* For /opt/mycroft/<res_name>
* For mycroft/res/<res_name> within the source package
2017-02-15 15:37:52 -06:00
tmajibon 647f90f836 Listen Confirmation Ding (#472)
* Listen confirmation

If enabled, will play a wave file to confirm that Mycroft is listening

* Listen confirmation ding config options

* Rename config option

* Update mycroft.conf

* Type: Rename config option

* Missing imports

Whoops, forgot them (was copying edits since I didn't have my dev environment set up)

* Removing unnecessary import functions
2017-02-15 15:37:52 -06:00
penrods c3070beb7b CLI improvements, as per issue #493
* "Input:" doesn't get intermingled with the output (usually -- long pauses can still cause it to happen)
* "Output:" is now displayed
* Ctrl+C is handled gracefully
2017-02-03 10:49:07 -06:00
Åke Forslund a1d7fa79db Fix silent mycroft when config lacks enclosure/platform 2017-01-23 18:04:45 +01:00
Steve Penrod b64c4ecfe6 Fixes issue #466 (#467)
This is a bit of a hack for Picroft.  The analog audio on a Pi blocks
for 30 seconds fairly often, so we don't want to break on periods
(decreasing the chance of encountering the block).  But we will
keep the split for non-Picroft installs since it give user feedback
faster on longer phrases.
2017-01-20 16:17:24 -06:00
Steve Penrod 84b9f92593 Fix related to issue #457 (#463)
The bug was actually fixed by doing a rebase, catching hotfixes which were missing from the dev branch.

The bug exposed this line of code, which was throwing an error without the quotes on the parameter to ping.
2017-01-20 15:40:31 -06:00
Ethan Ward c4bc2ea161 Update to fix pep8 errors (#420) 2017-01-18 16:41:48 -03:00
Arron Atchison 04cc555eb2 Update version.txt 2016-12-28 18:11:52 -06:00
Steve Penrod 0ecc736829 Fixes issue #434. Developers working on both Cerberus and Home durin… (#435)
* Fixes issue #434.  Developers working on both Cerberus and Home during the transition would have to re-pair.

Also bumping enclosure client version.

* Correcting error from when Tarturus code was merged.  At startup it was calling Enclosure.system_reset(), which rebooted the Arduino, instead of implementing Enclosure.reset(), which sets the UI to a "ready for input" state.

While in here, I also added docstrings for all Enclosure API methods.

* Increment Arduino code version

* Adding a call to reset the face UI when the enclosure service starts up.  This is needed because the enclosure.reset that is posted by the speech service on the messagebus sometimes occurs before the enclosure client is up and listening for it -- especially if there is a Arduino firmware upgrade.

In the future, we may want to consider a core service roll-call that gets triggered whenever any of the core services come up.

* Update dev_setup.sh
2016-12-28 15:00:03 -06:00
Arron Atchison c4257d226c removed arduino update and test classe from enclosure client (#430) 2016-12-21 16:44:05 -06:00
Jonathan D'Orleans 11d78a55b8 Issues 426 - TTS web socket is not initialized properly
- Initialize tts ws and enclosure at the main process

Note:
- This is a minimal change to fix the problem.
- The ultimate goal is to have a totally isolated TTS process which requires its own main and ws initialization to be developed soon.
2016-12-21 00:18:25 -05:00
Arron Atchison 2252966dda Issue #423 Register Me button in wifi-setup-client now points to home.mycroft.ai (#424)
* the Register Me button now points to home.mycroft.ai

* the Register Me button now points to home.mycroft.ai
2016-12-20 23:10:26 -06:00
Arron Atchison bfac4a4245 alter websocket port and path in wifi-client setup Config.js (#412) 2016-12-19 18:26:50 -06:00
Jonathan D'Orleans 2503fb1450 Issues 351 - Tartarus Integration
- Stopping enclosure in case of incompatibility with Mark 1
- Preventing stop to be called twice in enclosure and wifi processes
2016-12-17 17:57:58 -05:00
Jonathan D'Orleans 99ff4e3ce8 Issues 351 - Tartarus Integration
- Master rebase
- Renaming Websocket variable from client to ws
- Resetting enclosure when ws open
- Formatting pairing skill
2016-12-17 14:53:22 -05:00
Jonathan D'Orleans 416191e598 Issues 350 - Synchronizing local and remote configuration 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 1ed5496676 Issues 350 - Updating listener identity after pairing 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans f781e1db02 Issues 350 - Ensuring Listener has sampleRate and channels settings 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans fe8bb4e778 Issues 356 - Updating enclosure and wifi to use new event data format 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 634bef3f8c Issues 356 - Updating enclosure flags 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 558425b27d Issues 356 - Configuring wifi setup 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 2d68741a45 Issues 356 - Renaming cli.py to main.py 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 86e712ec84 Issues 356 - Ensuring only code is sent as a message to visime enclosure 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 365e23852f Issues 356 - Moving enclosure logic from main to init 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 184e400e9e Issues 356 - Moving Visime logic to Mimic TTS 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 9e632a3c8a Issues 356 - Stopping processes during audio playback 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 4c1ba4e337 Issues 356 - Rebasing with master 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 14c6eae264 Issues 356 - Integrating Listener with STT modules 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 885fe0a1cf Issues 356 - Renaming enclosure to main and stopping threads 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans c71c054258 Issues 351 - Creating STT module and classes 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 89e9c2ff77 Issues 351 - Moving TTS Factory to tts __init__.py 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans b1a4a9c22b Issues 351 - Making Identity static and unique 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans ccceb62b7a Issues 351 - Renaming metadata to data and simplifying data usage 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans fe5b96e051 Issues 351 - Updating STT configuration 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 14050d70e8 Issues 354 - Implementing activation process 2016-12-17 10:14:42 -05:00
Jonathan D'Orleans 9e982aa114 Issues 351 - Fixing Listener variables types 2016-12-17 10:12:10 -05:00
Jonathan D'Orleans 8af0acff76 Issues 351 - Renaming auto_update to update 2016-12-17 10:12:10 -05:00
Jonathan D'Orleans 3304474a22 Issues 354 - Pairing device with remote server
- Getting pairing code from server
- Treating Api response after request
- Simplifying enclosure mouth events control, upgrade and test process
2016-12-17 10:12:10 -05:00
Jonathan D'Orleans 3280d57b18 Issues 351 - Tartarus Integration
- Creating API to communicate with remote server
- Updating Identity data
- Adapting RemoteConfiguration load to new server
2016-12-17 10:11:15 -05:00
Steve Penrod e47ac6b895 Renamed the EnclosureAPI "system_reset()" method which generated an
"enclosure.system.reset" on the messagebus (which was intended to
only reset the enclosure's visual elements) to simply "reset()" and
"enclosure.reset" to avoid confusion with the "system.reset" serial
port message (which resets the Arduino).
2016-11-08 01:44:20 -06:00
Steve Penrod 28a09fd586 Fix an issue with auto-detect on a Mycroft Mark 1. At boot time
there is a lot of electrical noise creating junk on the serial
port lines.
2016-11-04 17:09:51 -05:00
Steve Penrod 5e27364ca1 Added auto-detect to the enclosure.py. It will check for a
'platform' variable in 'enclosure' section, and if not found
the auto-detect will kick off.  The mechanism used is issuing
a serial 'system.ping' and listening for the Mycroft Mark 1
Arduino to respond.  This is a one-time event, since the
results get saved.

If the system is not a Mycroft Mark 1, it shuts itself down
so the enclosure message bus messages are simply ignored
on a generic Pi.
2016-11-04 13:48:18 -05:00
Steve Penrod f08bbe5902 Refined the reset mechanism on boot. Now there is a single Enclosure API
system_reset() that means the Enclosure appearance should be reset to
its defaults.  The implementation of this is now a reset of both the
mouth and the eyes.  This command gets sent to the Enclosure once the
speech client has fully opened its connection to the messagebus.
2016-11-03 16:18:08 -05:00
Steve Penrod b8c197f574 Added code to auto-detect the 'platform' the enclosure is running
under.  For now, only the 'mycroft-mark-1' is auto-detected by
attempting to send out a 'ping' over the serial line.  The
auto-detect results are saved as a 'platform' in the
configuration file.

Since the current enclosure is designed to only work with Mark 1,
we shutdown the client in all other platform cases.
2016-11-02 17:00:45 -05:00
Steve Penrod e251a1c625 Switched to using the EnclosureAPI instead of writting directly to the
serial port.  This is a stopgap, as potentially this message is sent
before the enclosure is fully active and listening.
2016-11-02 16:14:03 -05:00
Steve f0386264a3 Wifi setup usability (#370)
* Enhancing the Wifi setup process:
* When no intenet is detected, Mycroft now instructs user
  to connect cable or tells how to start wifi setup
* Wifi setup talks user through connection process
* Setup will auto-shutdown after 5 minutes
* Completion screen now goes to cerberus.mycroft.ai to
  allow registration immediately
  (TODO: custom url/landing page to that will already have the pairing code)

* Changing the wording of the prompt message and slowing down the
rate at which the password is spoken.

* fixed pep8 error

* fixed mroe pep8 in listener.py

*     -webkit-user-select: text;

* * Fixed iOS issues with password input
* Added SSID wrapping for unusually long network names
* Fixed need for left/right scrolling on small phone screens (e.g. iPhone 4/5)
* iOS devices now automatically open the screen after connecting to the MYCROFT network
* Tweaked Wifi setup instruction wording to make it easier to understand
* Fixed a potential bug with the flag used to stop the connection monitor

* Removed some temporary debugging code being used to track a very
specific issue with odd network names.

* Various small changes for the code review.  Mainly deleting some dead
code and comment changes.

* Made the "not connected" message more Mimic-friendly by using the word
'browse' instead of 'login'.

* Increased the size of the password characters.  They felt tiny at 13px on
previously on an iPad.

* - Added an auto-check for unit connection during the first 20 seconds when
  a unit is turned on.  If no connection to the internet is found, the user
  is told how to get connected.
- Added calls to 'ping' to help rebuild the ARP table we previously cleared
  in the test for lost connection
- Tweaked some terminology spoken to be more Mimic-friendly and understandable.
- Added automatic announcements every 45 seconds of the next step in the
  process.
- Added automatic shutdown after 5 minutes
- Added announcement when the process is complete
- Added documentation and comments throughout
- Made things more "pythonic".  Switched functions from camelCase to
  python_style_names.  Also used some underscore prefixes for private methods
  that are really just implementation helpers.

* - The initial check for internet connectivity now happens 5 seconds after the system comes up instead of 20.
- Also added a space to tweak the pronunciation of an announcement

* Changes to the wifi setup portal
- Added a Cancel Setup button (shuts down the process)
- The Register Me button only appears once the browser can
  reach cerberus.mycroft.ai.  This prevents following the
  link while phone is still connected to the temporary
  access point or not connected back to the real network.

* Update version.txt
2016-10-13 14:49:06 -05:00
Arron Atchison 196f6a077e remove config setting 2016-10-05 12:03:22 -05:00
Steve cac955fa64 Feature button behavior (#365)
* Several changes related to button pressing on the Mycroft unit:
- Pressing the button when it isn't listening starts it listening
- Pressing the button when listening will stop the listen
- Added a mycroft.util.signal() mechanism for out-of-thread communication
- Pressing the button now creates an "buttonPress" signal from the Enclosure
- The viseme playback and aplay check for the 'buttonPress' signal to abort
- Removed "Sorry I didn't catch that", irritating during false activations

* Fixed spacing that pep8 yelled about
2016-09-22 13:16:11 -05:00
Arron Atchison c52f92f949 Feature/issues 356 (#362)
* working on a client for wi-fi setup

* added refactored code, ready to integrate

* client is running, now to handle the rest

* Staring touble in the face

* saved

* added config settings for wifi setup

* add an entry point for wifisetup to mycroft-base-setup.py

* moved SSID sorting into LinkUtils

* I'm now using the new SanAp class throughout

* Cleaning up code. All bash executions use bashThreadHandling class, mycroft's LOGGER

* removed legacy configuration parser

* funneling effort into cleanup

* fixed pep8, see if she builds

*  changed entry point for init script

*  changed import path to full path

* changed import path to full path for all files

* change ws port to 8080 for now

*  pep8 in wifi.py fixed

* fixed a few more pep8 errors

* strange import stuff goign on

* strange import stuff goign on

* renamed wifi.py to prevent import conflict

* freeze pip requirement versions

* changed import path in LinkUtils

* changed import path again

* trying to fix wifi import.. something is wrong

* consumer and producer queues now working

* Consumer & producer API's are coming alogn

* Refactor: developing an API

* add ap up/down procedure to api

*  looking googd

*  removed some older code, api is nearly written

* success

* Sending conection status to browser is now working

* Fixed pep8 errors again

* removed blank line from file

* fixed entrypoint name

* added shutdown and save upon connect; reducing verbosity

* now disabling and flushing network on connection fail

*  fix start.sh

* Corrected amount of arguments passed to wpa_cli_disable_network

* added iface to disable network

* added shutdown on success; restart wpa_supplicant upon ap up

* turning powersave mode off for wlan0

* removed wpa_cli flush

*  fix some file restore and exit issues

* re enabled flush networks on fail

* powersave mode was logged but not executed

* stop and start dhcpcd withh ap up

* changed hostapd channel; bring links up and down after successful pair

*  removed double quotes from the wpa_supplicant template

* Multiple files combined into util.py

* clean up some comments, added license headers

* what is up

* Ap mode event fires on enclosure event

* added logic for open network

* Changed empty passphrase from bool to empty string

* enclosure version bump

* changed ap down method in WiFiConsumer

* I'm now pulling all configuration from mycroft.ini and grabbing the mac address for ap ssid

* REFACTOR: removed util.py, as it was a bit messy

* REFACTOR: remove pep8 errors again, you would think that I would do this each time

* chagned some logic for open net

* open networks now function properly

* Reboot on success

* changed network save method

* Issues 356 - Setup wifi connection
- Removing tornado dependency
- Merging WS reader with Wifi process

* Issues 356 - Refactoring
- Using PyRIC and WIFI libs

* Issues 356 - Refactoring bash command

* Issues 356 - Refactoring FileUtils

* Issues 356 - WebClient refactoring

* Issues 356 - create password and loading pages

* Issues 356 - connecting

* Issues 356 - parsing data on ws

* Issues 356 - removing fake function on wifisetup

* Issues 356 - connecting on public network

* Issues 356 - show loading page on backbutton

* Issues 356 - sort networks by quality

* Issues 356 - Fixing message type variable

* Issues 356 - Adding more logs to wifi setup

* Issues 356 - network sort by quality

* Issues 356 - Fixing cell ssid param and using correct interface for scheme

* Issues 356 - Ensuring to save scheme before activating

* Issues 356 - Logging bash command

* Issues 356 - Refactoring wifi to P2P

* Issues 356 - Simplifying cli usage and getting results from wpa_cli

* Issues 356 - Parsing ssid and pass

* Issues 356 - Saving wpa configuration

* Issues 356 - Removing postfix in favor of wpa_supplicant config

* Issues 356 - Setting host to 0.0.0.0

* Issues 356 - Fixing parsing for wpa_cli output

* Issues 356 - Ensuring to save wpa config after connected

* Issues 356 - Setting interface for save config

* Issues 356 - Ensuring interfaces in all wpa cli

* Issues 356 - Creating, staring and stopping wifi web server

* Issues 356 - Adding logs to web server

* Issues 356 - create succes page and merge connect page on list page

* Issues 356 - Config.js server addr

* Issues 356 - Adding wifi status and connected control

* Issues 356 - lock margin top wifisetup

* Issues 356 - waiting connection

* Issues 356 - Moving dnsmasq backup logic to main.py

* Issues 356 - Cleaning imports

* Changed the base manifest to reflect new file locations

* fixed indent for pep8

* changed the mycroft-base-setup.py to reference the proper entry point for wifisetup

*  Enclosure version bump

* Added the wifi index.html to the base manifest, as it doesn't seem to catch it recursively

* Issues 356 - Updating first setup flag after running the first time

* Issues 356 - Ensure to stop server only if it exists

* Issues 356 - Ensuring to set first setup to false when connected

* Issues 356 - Closing web server after shutdown

* Issues 356 - Running web server as daemon

* Issues 356 - Creating server connection only once at initialization

* Issues 356 - Disconnecting network before connecting and fixing get status

* Issues 356 - Starting web server only once after AP is up

* Issues 356 - Returning empty status if not able to parse

* Issues 356 - Creating web server loop control

* Issues 356 - Performing final request call in order to unblock server

* Issues 356 - Adding GET method to server request

* Issues 356 - Requesting web server to stop on main thread
2016-09-19 12:28:58 -05:00
Steve c653c43910 Added viseme support for TTS, allowing enclosure to display visemes (#357)
* Added viseme support for TTS, allowing enclosure to display visemes as appropriate

* Enclosure versino bump
2016-09-05 16:27:09 -05:00
Steve a62bb9c6c1 Updated enclosure version 2016-08-25 14:14:01 -05:00
Arron Atchison 5a1184eff9 Fixed issue #334 with a try: clause 2016-08-21 13:32:28 -05:00
isaacnward aa8c8dbdae added mouth reset (#342) 2016-08-18 17:25:22 -05:00
Ethan Ward 73a74761bc Fix wifi indication in speech client main 2016-08-18 17:09:00 -05:00
Arron Atchison 56b0f9ac5c Merge pull request #340 from MycroftAI/no-sudo-rm
rm'd sudo from rm
2016-08-18 16:35:21 -05:00