MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    MMM-Hotword - actions not being processed and restarting after detection

    Troubleshooting
    1
    1
    294
    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.
    • P
      pythugoras last edited by sdetweil

      Hi,

      massive fan of the project. I’m trying to get MMM-Hotword working with some simple off/on module commands. when I start the process using

      npm start dev
      

      I get the following output (console):

      Connecting socket for: MMM-Hotword
      [HOTWORD] MMM-Hotword starts
      Sockets connected & modules started ...
      Launching application.
      Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/75/UK_Holidays.ics - Interval: 300000
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/josh.shallow%40gmail.com/private-a91aad9e61329573cb33a74704da0fb3/basic.ics - Interval: 300000
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/cazz.bradshaw%40gmail.com/private-4a0e201364e11e14451b7d4310a52d9b/basic.ics - Interval: 300000
      Create new news fetcher for url: http://feeds.bbci.co.uk/news/rss.xml - Interval: 300000
      model.file :  /home/pi/MagicMirror/modules/MMM-Hotword/models/smart_mirror.umdl
      modelPath :  /home/pi/MagicMirror/modules/MMM-Hotword/models
      model.file :  /home/pi/MagicMirror/modules/MMM-Hotword/models/hideall.pmdl
      modelPath :  /home/pi/MagicMirror/modules/MMM-Hotword/models
      [HOTWORD] begins.
      [HOTWORD] Detector starts listening.
      [HOTWORD] Detected: hideall
      [HOTWORD] stops.
      [HOTWORD] Final Result: { detected: true, hotword: 'hideall', file: null }
      

      My questions are:

      • is there a way to restart the HOTWORD listening process once a keyword is detected?
      • when I run not in dev mode, the actions are not processed on the screen.

      my config is set up as below:

              {   
                  module: "MMM-Hotword",
                  config: {
                      mic: {
                          recordProgram : "arecord",
                          device: "plughw:1,0"        // recording device (e.g.: "plughw:1")
                      },  
                      models: [
                          {   
                              hotwords    : "smart_mirror",
                              file        : "smart_mirror.umdl",
                              sensitivity : "0.5",
                          },
                          {
                            hotwords    : "hideall",
                            file        : "hideall.pmdl",
                            sensitivity : "0.5",
                          },
                          {
                            hotwords    : "showall",
                            file        : "showall.pmdl",
                            sensitivity : "0.5",
                          },
                      ],
                      defaultCommand: {
                          notificationExec: {
                              notification: "ASSISTANT_ACTIVATE",
                              payload: (detected, afterRecord) => {
                              return {profile:"default"}
                              }
                          },
                          afterRecordLimit:0,
                          restart:false,
                      },
                      commands: {
                          "hideall": {
                            moduleExec: {
                              module: [],
                              exec: (module) => { module.hide()}
                            }
                          },
                          "showall": {
                            moduleExec: {
                              module: [],
                              exec: (module) => { module.show()}
                            }
                          },
                      },
                      restart: true,
                      testMic: true,
                      useDisplay: true,
                      verbose: true
                  }
              }
      

      any guidance would be appreciated!

      Josh

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy