MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Kalliope assistant + MM

    Scheduled Pinned Locked Moved Fun & Games
    58 Posts 10 Posters 47.4k Views 12 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      E3V3A @sispheor
      last edited by

      @sispheor Sorry, but I would never use a pre-compiled image of anything. It just doesn’t make sense. Most people already has a bunch of stuff installed that they don’t want to loose.

      So from what I understand from your github comment, we need to install at least 3 separate Kalliope things in order to use it. Now, that’s quite a bunch of work, and a lot of separate reading. It would be great to have all steps in one place.

      No, I don’t want to sound pessimistic or anything, but I believe in trying to keep basic installation info in one place. I’m so sick of dealing with the lack of documentation and easy to follow instructions for 99% of what you find on github. Those things alone can be total project killers.

      KISS principle! (At least to get up and running.)

      "Everything I do (here) is for free – altruism is the way!"
      MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

      1 Reply Last reply Reply Quote 0
      • S Offline
        sispheor
        last edited by sispheor

        As Kalliope is a complete separate project, yes it has its own installation process. But il you take a look to the manual install doc it’s not a big deal.

        I don’t know what you mean by having all info in one place. MM has is installation doc in one place, and modules have their own doc per module.

        It’s exactly the same for Kalliope. You need to install the core project and then module (neuron).

        Don’t hesitate to tell me if something is missing.

        E 1 Reply Last reply Reply Quote 1
        • E Offline
          E3V3A @sispheor
          last edited by

          @sispheor

          I don’t know what you mean by having all info in one place

          What I mean is:

          People already has MM installed, so they go to MMM-kalliope in hope to just get it working/installed, but instead just find:

          Module to bind Kalliope with your Magic Mirror.
          …
          Note: On Kalliope, a neuron is available to talk with this module directly.

          Huh!? WTF is a neuron!? What is that? Well…ok.

          So they go to kalliope_neuron_magic_mirror and find the same screenshot there…but still no installation info to follow. Eh, what does this do, and why is not just part of the MMM? Circular back link to MMM-kalliope, since there is no ref link back to main kalliope.

          By this time I’m already annoyed, but try to persist and follow:

          Kalliope installation documentation

          Then … I have to follow the next link:

          Please follow the right link bellow to install requirements depending on your target environment:
          Raspbian (Raspberry Pi 2 & 3)

          and the next one…and now I’m totally sick of shitty instructions. And whatever was good, I’ve already forgotten.

          One page please!?

          I think it should be simple enough for you guys to do, especially for simple unified devices like the RPi’s, where everyone is pretty much running the same stuff.

          "Everything I do (here) is for free – altruism is the way!"
          MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

          1 Reply Last reply Reply Quote 0
          • E Offline
            E3V3A
            last edited by E3V3A

            A hot KISS tip for writing any kind of SW installation documentation:

            • Ask your girlfriend, boyfriend or 9 year old kid, who has not used it before to follow it.

            Could they complete it within 1 hour?

            No? - Then it’s shit written documentation.

            "Everything I do (here) is for free – altruism is the way!"
            MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

            1 Reply Last reply Reply Quote 0
            • E Offline
              E3V3A
              last edited by

              I just want to inform the rest of the forum members, that in case you think I come across as a bit hardass here, I’m in good contact with @sispheor who I think understand now, what the problems are.

              What are they?

              • How to make great project modules more reachable outside the developer expert community!
              • Everyone want to talk to their computers, Google, Alexa, Siri, Jarvis, AI-this-that-and-what-not!

              "Everything I do (here) is for free – altruism is the way!"
              MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

              1 Reply Last reply Reply Quote 0
              • S Offline
                sispheor
                last edited by

                We have added a single line command install for Kalliope.

                Tested on a single Raspberry Pi, both project fit perfectly and the whole can be installed in two command line.

                Thanks for your feedback !

                E 1 Reply Last reply Reply Quote 1
                • E Offline
                  E3V3A @sispheor
                  last edited by E3V3A

                  @sispheor said in Kalliope assistant + MM:

                  We have added a single line command install for Kalliope.

                  Is it for the MMM-kalliope?

                  Fantastic! Sound like music to our ears!

                  "Everything I do (here) is for free – altruism is the way!"
                  MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sispheor
                    last edited by sispheor

                    No it’s for Kalliope core. MMM-Kalliope need to be installed via only a clone of the module as usual.

                    And the kalliope neuron can be installed via the kalliope CLI. It’s in the doc of each community neuron.

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      NoNameRo
                      last edited by

                      @sispheor when trying to install Kalliope on a freshly installed system, I have 2 errors

                      Searching for SpeechRecognition>=3.7.1
                      Reading https://pypi.python.org/simple/SpeechRecognition/
                      No local packages or working download links found for SpeechRecognition>=3.7.1
                      error: Could not find suitable distribution for Requirement.parse('SpeechRecognition>=3.7.1')
                      
                      Searching for apscheduler>=3.3.1
                      Reading https://pypi.python.org/simple/apscheduler/
                      Downloading https://pypi.python.org/packages/c4/16/8be21944c787ef13cd7581c62d446053d079f36aa54ef20b5b45b378944d/APScheduler-3.5.1.tar.gz#md5=18c2050f24bad3dd82e17dd4b5f182df
                      Best match: APScheduler 3.5.1
                      Processing APScheduler-3.5.1.tar.gz
                      Writing /tmp/easy_install-NmMSMf/APScheduler-3.5.1/setup.cfg
                      Running APScheduler-3.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-NmMSMf/APScheduler-3.5.1/egg-dist-tmp-px4K5B
                        File "build/bdist.linux-armv7l/egg/apscheduler/executors/base_py3.py", line 12
                          async def run_coroutine_job(job, jobstore_alias, run_times, logger_name):
                                  ^
                      SyntaxError: invalid syntax
                      
                      creating /usr/local/lib/python2.7/dist-packages/APScheduler-3.5.1-py2.7.egg
                      Extracting APScheduler-3.5.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
                        File "/usr/local/lib/python2.7/dist-packages/APScheduler-3.5.1-py2.7.egg/apscheduler/executors/base_py3.py", line 12
                          async def run_coroutine_job(job, jobstore_alias, run_times, logger_name):
                                  ^
                      SyntaxError: invalid syntax
                      

                      then a little excitement, add the starter configuration to rpi_install_kalliope.sh, and let the user during the installation choose which language he wants to install

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sispheor @NoNameRo
                        last edited by

                        @NoNameRo said in Kalliope assistant + MM:

                        SpeechRecognition

                        Hi,

                        I had this one time.
                        Can you try to install the lib manually?

                        sudo pip install SpeechRecognition
                        

                        Then run the install again from the kalliope folder (in /home/pi)

                        sudo python setup.py
                        

                        It’s weird, sometime pip doesn’t find this lib.

                        N 1 Reply Last reply Reply Quote 0
                        • E Offline
                          E3V3A
                          last edited by E3V3A

                          You should not have the pip installation in that script without:

                          1. checking if it is already installed
                          2. make sure what python version your using. pip2 or pip3?
                          3. allow user to cancel that installation, if they know they already have it

                          Most of the time, if you have both Py2 and Py3 installed, pip would apply to Py2 and pip3 to Py3.

                          "Everything I do (here) is for free – altruism is the way!"
                          MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                          S 1 Reply Last reply Reply Quote 0
                          • N Offline
                            NoNameRo @sispheor
                            last edited by

                            @sispheor SpeechRecognition was successfully installed, but sudo python setup.py has another error

                            pi@MagicMirror:~/kalliope $ sudo python setup.py
                            usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
                               or: setup.py --help [cmd1 cmd2 ...]
                               or: setup.py --help-commands
                               or: setup.py cmd --help
                            
                            error: no commands supplied
                            
                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sispheor @E3V3A
                              last edited by

                              @E3V3A
                              Actually, we consider here that the user start the installation from a fresh install raspbian.
                              So he is using Python 2 and pip2.

                              S 1 Reply Last reply Reply Quote 1
                              • S Offline
                                sispheor @NoNameRo
                                last edited by

                                @NoNameRo sorry, forgot one word

                                sudo python setup.py install
                                
                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sispheor @sispheor
                                  last edited by sispheor

                                  @E3V3A but yes you are right, a good script should be idempotent.
                                  I’ll enhance it.

                                  1 Reply Last reply Reply Quote 0
                                  • E Offline
                                    E3V3A
                                    last edited by E3V3A

                                    Does MMM-kalliope allow or have any Google Assistant or Alexa functionality?
                                    If, yes, how to install it. I didn’t see anything in the neuron list…

                                    Although Kalliope look very nice and surely better documented now, it will be hard to sell without these features. People wanna talk to AI, not only ask to turn your lights on or off, which you can do by your self. Perhaps a phone plugin so you can call it up and talk?

                                    In addition it is a huge obstacle that you have to make plugins (or neurons or synapses or whatever you call it) for just about everything you want to talk to Kalliope about. This learning should be automated by ML, and integrated to the productivity tools you already have, including future Alexa and GA compatibility.

                                    "Everything I do (here) is for free – altruism is the way!"
                                    MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                                    1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sispheor
                                      last edited by

                                      Kalliope is not an IA but a framework to make an assistant. Kalliope is like Ansible actually by design.
                                      From neuron you can cover almost all features provided by current assistant like Google or Alexa.

                                      There is a Android app to control kalliope from your phone and a “Tasker” neuron to control your phone from kalliope.

                                      Users have to make their brain in the language they want by using neuron. We provide “starter kit” to give a basic config and new user to understand the concept.

                                      I Understand that is not what you are looking for. You should give a try to another app.

                                      E 1 Reply Last reply Reply Quote 1
                                      • E Offline
                                        E3V3A @sispheor
                                        last edited by

                                        @sispheor Cool! Thanks a lot for clarifying.

                                        "Everything I do (here) is for free – altruism is the way!"
                                        MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          marcnlx
                                          last edited by marcnlx

                                          Hi,

                                          I really love the Kalliope Virtual Assistant. I used the Manual Install (Method #2) option, since the one-liner command failed on my RPi.

                                          I managed to install Kalliope (“Kalliope version”: “0.5.1b”), but I have some issues having all the messages show in MMM-Kalliope module (in upper_third) on the mirror.

                                          I have added this to my ~/MagicMirror/config/config.js file:

                                          {
                                              module: "MMM-kalliope",
                                              position: "upper_third",
                                                                  config: {
                                                                          max: "5",
                                                                          keep_seconds: "8",
                                                                          title: "Kalliope",
                                                                          notification: "KALLIOPE",
                                                                          payload: "my message"
                                                                          }
                                          
                                          }
                                          

                                          I have added this to my ~/kalliope_starter_en/brain.yml file:

                                          - name: "mm-say"
                                            signals: []
                                            neurons:
                                              - magic_mirror:
                                                  mm_url: "http://127.0.0.1:8080/kalliope"
                                                  notification: "KALLIOPE"
                                                  payload: "{{ kalliope_memory['kalliope_last_tts_message'] }}"
                                          
                                          - name: "mm-alert"
                                            signals:
                                              - order: "send an alert to magic mirror"
                                            neurons:
                                              - magic_mirror:
                                                  mm_url: "http://127.0.0.1:8080/kalliope"
                                                  notification: "SHOW_ALERT"
                                                  payload:
                                                    title: "my alert title"
                                                    message: "the message"
                                                    timer: 5000
                                          

                                          And I have added this to the hooks in my ~/kalliope_starter_en/settings.yml file:

                                          #  on_start_speaking:
                                            on_start_speaking: "mm-say"
                                          

                                          I’m not sure what I am missing here…would anybody be able to help me out?

                                          I also sometimes have an issue after Kalliope gets triggered by the WakeUp word related to the microphone/audio (but this might also be caused by the mic on the usb webcam I am using…):

                                          what can i do for you?
                                          Threshold set to: 4000
                                          Say something!
                                          Google Speech Recognition could not understand audio
                                          I don't recognize that order
                                          Waiting for trigger detection
                                          yes sir?
                                          Threshold set to: 4000
                                          Say something!
                                          Google Speech Recognition could not understand audio
                                          I don't know this order
                                          Exception in thread Thread-2:
                                          Traceback (most recent call last):
                                            File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
                                              self.run()
                                            File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1b0-py2.7.egg/kalliope/signals/order/order.py", line 84, in run
                                              self.start_trigger()
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 382, in trigger
                                              return self.machine._process(func)
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 1020, in _process
                                              self._transition_queue[0]()
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 398, in _trigger
                                              return self._process(event_data)
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 408, in _process
                                              if trans.execute(event_data):
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 262, in execute
                                              self._change_state(event_data)
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 273, in _change_state
                                              event_data.machine.get_state(self.dest).enter(event_data)
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 119, in enter
                                              event_data.machine.callback(handle, event_data)
                                            File "/usr/local/lib/python2.7/dist-packages/transitions-0.6.4-py2.7.egg/transitions/core.py", line 990, in callback
                                              func(*event_data.args, **event_data.kwargs)
                                            File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1b0-py2.7.egg/kalliope/signals/order/order.py", line 92, in start_trigger_process
                                              self.trigger_instance = TriggerLauncher.get_trigger(settings=self.settings, callback=self.trigger_callback)
                                            File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1b0-py2.7.egg/kalliope/core/TriggerLauncher.py", line 32, in get_trigger
                                              parameters=trigger.parameters)
                                            File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1b0-py2.7.egg/kalliope/core/Utils/Utils.py", line 140, in get_dynamic_class_instantiation
                                              return klass(**parameters)
                                            File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1b0-py2.7.egg/kalliope/trigger/snowboy/snowboy.py", line 51, in __init__
                                              sleep_time=0.03)
                                            File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1b0-py2.7.egg/kalliope/trigger/snowboy/snowboydecoder.py", line 98, in __init__
                                              stream_callback=audio_callback)
                                            File "build/bdist.linux-armv7l/egg/pyaudio.py", line 750, in open
                                              stream = Stream(self, *args, **kwargs)
                                            File "build/bdist.linux-armv7l/egg/pyaudio.py", line 441, in __init__
                                              self._stream = pa.open(**arguments)
                                          IOError: [Errno -9985] Device unavailable
                                          

                                          When starting kalliope with the –debug option, I see lines like this in the debug log:

                                          2018-03-17 13:55:30 :: kalliope-0.5.1b :: Magic_mirror call Magic Mirror MMM-kalliope-API: http://127.0.0.1:8080/kalliope
                                          2018-03-17 13:55:31 :: kalliope-0.5.1b :: Magic_mirrorcannot get a valid json from returned content
                                          
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronLauncher] replacing brackets from {'notification': 'KALLIOPE', 'mm_url': 'http://127.0.0.1:8080/kalliope', 'is_api_call': True, 'payload': "{{kalliope_memory['kalliope_last_tts_message']}}", 'no_voice': False}, using {}
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronLauncher] replacing brackets from KALLIOPE, using {'kalliope_memory': {'kalliope_last_tts_message': 'what can i do for you?'}}
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronLauncher] replacing brackets from http://127.0.0.1:8080/kalliope, using {'kalliope_memory': {'kalliope_last_tts_message': 'what can i do for you?'}}
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronLauncher] replacing brackets from True, using {'kalliope_memory': {'kalliope_last_tts_message': 'what can i do for you?'}}
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronLauncher] replacing brackets from {{kalliope_memory['kalliope_last_tts_message']}}, using {'kalliope_memory': {'kalliope_last_tts_message': 'what can i do for you?'}}
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronLauncher] replacing brackets from False, using {'kalliope_memory': {'kalliope_last_tts_message': 'what can i do for you?'}, 'name': 'sir'}
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: Run neuron: "{'name': 'magic_mirror', 'parameters': {'notification': 'KALLIOPE', 'mm_url': 'http://127.0.0.1:8080/kalliope', 'is_api_call': True, 'payload': 'what can i do for you?', 'no_voice': False}}"
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [Utils]-> get_dynamic_class_instantiation : package path : kalliope.neurons.magic_mirror.magic_mirror
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [Utils]-> get_dynamic_class_instantiation : loading path : resources/neurons/magic_mirror/magic_mirror.py, as package Magic_mirror
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronModule] TTS args: {'name': 'pico2wave', 'parameters': {'cache': True, 'language': 'en-US'}}
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: Magic_mirror call Magic Mirror MMM-kalliope-API: http://127.0.0.1:8080/kalliope
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: Magic_mirrorcannot get a valid json from returned content
                                          2018-03-17 13:55:09 :: kalliope-0.5.1b :: [NeuronModule] Say() called with message: {'content': '<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot POST /kalliope</pre>\n</body>\n</html>\n', 'status_code': 404, 'response_header': {'Content-Length': '148', 'X-XSS-Protection': '1; mode=block', 'X-Download-Options': 'noopen', 'X-Content-Type-Options': 'nosniff', 'Content-Type': 'text/html; charset=utf-8', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains', 'Connection': 'keep-alive', 'Content-Security-Policy': "default-src 'self'", 'Date': 'Sat, 17 Mar 2018 12:55:09 GMT', 'X-Frame-Options': 'SAMEORIGIN', 'X-DNS-Prefetch-Control': 'off'}}
                                          

                                          Accessing the URL http://192.168.1.16:8080/kalliope, gives me this:

                                          Cannot GET /kalliope
                                          

                                          I also see the following error using the CURL example (removed the “<” from the beginning on the output of each line):

                                          pi@mirror:~ $ curl -H "Content-Type: application/json" -X POST -d '{"notification":"KALLIOPE", "payload": "my message"}' http://127.0.0.1:8080/kalliope      
                                          !DOCTYPE html>
                                          html lang="en">
                                          head>
                                          meta charset="utf-8">
                                          title>Error</title>
                                          /head>
                                          body>
                                          pre>Cannot POST /kalliope</pre>
                                          /body>
                                          /html>
                                          pi@mirror:~ $
                                          
                                          S 2 Replies Last reply Reply Quote 0
                                          • S Offline
                                            sispheor @marcnlx
                                            last edited by

                                            @marcnlx why are you trying to reach the URL from your browser? It’s an API. It should be accessed from a script only.

                                            M 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy