• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-AssistantMk2 (v3)

Scheduled Pinned Locked Moved System
135 Posts 27 Posters 51.6k Views 25 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.
  • S Offline
    sdetweil @jimmydew
    last edited by May 12, 2020, 7:16 PM

    @jimmydew in the future please use the markdown for code

    select the text and hit the </> icon above the editor

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • J Offline
      jimmydew @Guest
      last edited by May 13, 2020, 4:39 AM

      @Bugsounet
      i got quite a few errors on the rebuild:

      ✖ Rebuild Failed
      
      An unhandled error occurred inside electron-rebuild
      make: Entering directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build'
        CXX(target) Release/obj.target/snowboy/lib/snowboy.o
      In file included from /home/pi/.electron-gyp/6.1.7/include/node/v8-internal.h:14,
                       from /home/pi/.electron-gyp/6.1.7/include/node/v8.h:25,
                       from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63,
                       from ../../../nan/nan.h:56,
                       from ../lib/snowboy.cc:1:
      /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
         declarator __attribute__((deprecated(message)))
                                                       ^
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8205:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’
         V8_DEPRECATE_SOON("Use *WithData version.",
         ^~~~~~~~~~~~~~~~~
      /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
         declarator __attribute__((deprecated(message)))
                                                       ^
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8214:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’
         V8_DEPRECATE_SOON("Use *WithData version.",
         ^~~~~~~~~~~~~~~~~
      In file included from ../lib/snowboy.cc:1:
      ../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
      ../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
           , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                                    ^
      ../lib/snowboy.cc: In constructor ‘SnowboyDetect::SnowboyDetect(const string&, const string&)’:
      ../lib/snowboy.cc:38:31: warning: catching polymorphic type ‘class std::runtime_error’ by value [-Wcatch-value=]
         } catch (std::runtime_error e) {
                                     ^
      In file included from ../../../nan/nan.h:56,
                       from ../lib/snowboy.cc:1:
      ../lib/snowboy.cc: At global scope:
      /home/pi/.electron-gyp/6.1.7/include/node/node.h:572:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
             (node::addon_register_func) (regfunc),                          \
                                                 ^
      /home/pi/.electron-gyp/6.1.7/include/node/node.h:606:3: note: in expansion of macro ‘NODE_MODULE_X’
         NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
         ^~~~~~~~~~~~~
      ../lib/snowboy.cc:183:1: note: in expansion of macro ‘NODE_MODULE’
       NODE_MODULE(SnowboyDetect, SnowboyDetect::Init)
       ^~~~~~~~~~~
      In file included from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63,
                       from ../../../nan/nan.h:56,
                       from ../lib/snowboy.cc:1:
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
      /home/pi/.electron-gyp/6.1.7/include/node/node_object_wrap.h:84:78:   required from here
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                      reinterpret_cast<Callback>(callback), type);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
      ../../../nan/nan_object_wrap.h:65:61:   required from here
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
        SOLINK_MODULE(target) Release/obj.target/snowboy.node
      /usr/bin/ld: cannot find -lcblas
      collect2: error: ld returned 1 exit status
      make: *** [snowboy.target.mk:143: Release/obj.target/snowboy.node] Error 1
      make: Leaving directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build'
      gyp ERR! build error 
      gyp ERR! stack Error: `make` failed with exit code: 2
      gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/node-gyp/lib/build.js:194:23)
      gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
      gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
      gyp ERR! System Linux 5.4.35-v7l+
      gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/lib/node/binding/Release/electron-v6.1-linux-arm" "--remote_path=./snowboy/v1.4.7/Release/" "--package_name=snowboy-v1.4.7-electron-v6.1-linux-arm.tar.gz" "--host=https://github.com/bugsounet/snowboy"
      gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy
      gyp ERR! node -v v10.20.1
      gyp ERR! node-gyp -v v6.1.0
      gyp ERR! not ok 
      
      Failed with exit code: 1
      
      Error: make: Entering directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build'
        CXX(target) Release/obj.target/snowboy/lib/snowboy.o
      In file included from /home/pi/.electron-gyp/6.1.7/include/node/v8-internal.h:14,
                       from /home/pi/.electron-gyp/6.1.7/include/node/v8.h:25,
                       from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63,
                       from ../../../nan/nan.h:56,
                       from ../lib/snowboy.cc:1:
      /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
         declarator __attribute__((deprecated(message)))
                                                       ^
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8205:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’
         V8_DEPRECATE_SOON("Use *WithData version.",
         ^~~~~~~~~~~~~~~~~
      /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
         declarator __attribute__((deprecated(message)))
                                                       ^
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8214:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’
         V8_DEPRECATE_SOON("Use *WithData version.",
         ^~~~~~~~~~~~~~~~~
      In file included from ../lib/snowboy.cc:1:
      ../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
      ../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
           , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                                    ^
      ../lib/snowboy.cc: In constructor ‘SnowboyDetect::SnowboyDetect(const string&, const string&)’:
      ../lib/snowboy.cc:38:31: warning: catching polymorphic type ‘class std::runtime_error’ by value [-Wcatch-value=]
         } catch (std::runtime_error e) {
                                     ^
      In file included from ../../../nan/nan.h:56,
                       from ../lib/snowboy.cc:1:
      ../lib/snowboy.cc: At global scope:
      /home/pi/.electron-gyp/6.1.7/include/node/node.h:572:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
             (node::addon_register_func) (regfunc),                          \
                                                 ^
      /home/pi/.electron-gyp/6.1.7/include/node/node.h:606:3: note: in expansion of macro ‘NODE_MODULE_X’
         NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
         ^~~~~~~~~~~~~
      ../lib/snowboy.cc:183:1: note: in expansion of macro ‘NODE_MODULE’
       NODE_MODULE(SnowboyDetect, SnowboyDetect::Init)
       ^~~~~~~~~~~
      In file included from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63,
                       from ../../../nan/nan.h:56,
                       from ../lib/snowboy.cc:1:
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
      /home/pi/.electron-gyp/6.1.7/include/node/node_object_wrap.h:84:78:   required from here
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                      reinterpret_cast<Callback>(callback), type);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
      ../../../nan/nan_object_wrap.h:65:61:   required from here
      /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
        SOLINK_MODULE(target) Release/obj.target/snowboy.node
      /usr/bin/ld: cannot find -lcblas
      collect2: error: ld returned 1 exit status
      make: *** [snowboy.target.mk:143: Release/obj.target/snowboy.node] Error 1
      make: Leaving directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build'
      gyp ERR! build error 
      gyp ERR! stack Error: `make` failed with exit code: 2
      gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/node-gyp/lib/build.js:194:23)
      gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
      gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
      gyp ERR! System Linux 5.4.35-v7l+
      gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/lib/node/binding/Release/electron-v6.1-linux-arm" "--remote_path=./snowboy/v1.4.7/Release/" "--package_name=snowboy-v1.4.7-electron-v6.1-linux-arm.tar.gz" "--host=https://github.com/bugsounet/snowboy"
      gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy
      gyp ERR! node -v v10.20.1
      gyp ERR! node-gyp -v v6.1.0
      gyp ERR! not ok 
      
      Failed with exit code: 1
          at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/spawn-rx/lib/src/index.js:267:84)
          at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:205:16)
          at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:156:26)
          at Subscriber._error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:92:26)
          at Subscriber.error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:72:18)
          at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:92:26)
          at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:72:18)
          at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/spawn-rx/lib/src/index.js:242:65)
          at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:205:16)
          at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:143:22)
      
      > @bugsounet/snowboy@1.4.7 postinstall /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy
      > tsc -p tsconfig.json
      
      + @bugsounet/snowboy@1.4.7
      added 20 packages from 25 contributors and audited 315 packages in 38.481s
      
      3 packages are looking for funding
        run `npm fund` for details
      
      found 6 low severity vulnerabilities
        run `npm audit fix` to fix them, or `npm audit` for details
      @bugsounet/snowboy library installed
      
      1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User
        last edited by A Former User May 13, 2020, 1:01 PM May 13, 2020, 1:01 PM

        @jimmydew said in MMM-AssistantMk2 (v3):

        Linux 5.4.35-v7l+

        ah …

        and what version of gcc do you use ?

        try gcc --version in console

        J 1 Reply Last reply May 13, 2020, 9:05 PM Reply Quote 0
        • J Offline
          jimmydew @Guest
          last edited by May 13, 2020, 9:05 PM

          @Bugsounet

          pi@raspberrypi:~/MagicMirror $ gcc --version
          gcc (Raspbian 7.3.0-19) 7.3.0
          Copyright (C) 2017 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions.  There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
          
          1 Reply Last reply Reply Quote 0
          • E Offline
            electros Project Sponsor @Guest
            last edited by May 14, 2020, 7:33 AM

            @Bugsounet Hi, again. I managed to make my radio station list and everything works fine, just I don’t know how to stop the radio. Can you please explain me how to add a stop radio command?
            Thank you

            1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User
              last edited by May 14, 2020, 8:55 AM

              @jimmydew can you do this command for more informations, please ?

              cat /etc/*release

              @electros :
              Good job !

              For stop radio (and other A2D module), i create a feature in AMk2 (A2D Server part)
              You can define your prefered stop command
              by default it’s stop but … it’s depend of your language !
              for exemple in french language, when i say stop, google transcript stoppe

              you have an exemple in AMk2 structure sample

              E J 2 Replies Last reply May 14, 2020, 9:14 AM Reply Quote 0
              • E Offline
                electros Project Sponsor @Guest
                last edited by May 14, 2020, 9:14 AM

                @Bugsounet OK I understand that but if I configure that “stop” in english for example just I must say " jarvis stop" or “jarvis stop radio” ?

                1 Reply Last reply Reply Quote 0
                • ? Offline
                  A Former User
                  last edited by A Former User May 14, 2020, 9:43 AM May 14, 2020, 9:28 AM

                  It’s depend what’s google return in transcription
                  for verify what it return
                  You have 2 solutions:

                  1. turn Fullscreen ui , activate jarvis and say stop.
                    AMk2 will display in real time what it understand, so if it display stop, it’s ok
                    en french it display stoppe then i have to modify A2DStopCommand: "stoppe",
                  2. in console and debug mode actived
                    activate jarvis and say stop.
                    you will see the transcription of google
                    transcription: { transcription: 'stoppe', done: true },

                  notes:

                  • if you say stop and method 1 or 2 result is stop too
                    no A2DStopCommand configuration require
                  • stop command defined in A2DStopCommand stops all process of A2D : weblinks, cast, youtube, radio, photos (and MMM-FreeboxTV for french user)

                  Use:

                  just say jarvis (for activating) … stop (or your prefered A2DStopCommand)

                  E 1 Reply Last reply May 14, 2020, 9:39 AM Reply Quote 0
                  • E Offline
                    electros Project Sponsor @Guest
                    last edited by May 14, 2020, 9:39 AM

                    @Bugsounet OK, thank you

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      jimmydew @Guest
                      last edited by May 14, 2020, 9:57 PM

                      @Bugsounet

                      sure:

                      pi@raspberrypi:~/MagicMirror $ cat /etc/*release
                      PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
                      NAME="Raspbian GNU/Linux"
                      VERSION_ID="10"
                      VERSION="10 (buster)"
                      VERSION_CODENAME=buster
                      ID=raspbian
                      ID_LIKE=debian
                      HOME_URL="http://www.raspbian.org/"
                      SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
                      BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
                      
                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 7
                      • 8
                      • 9
                      • 10
                      • 11
                      • 12
                      • 13
                      • 14
                      • 9 / 14
                      9 / 14
                      • First post
                        86/135
                        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