MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. BJ Duncan
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    B
    Offline
    • Profile
    • Following 4
    • Followers 0
    • Topics 3
    • Posts 15
    • Groups 0

    Posts

    Recent Best Controversial
    • Looking for a notification type module...

      Hi to all my MagicMirror mates. :-)

      Is there a “Notification” type module that will let you display notices from my own website database? So objectively, to have something similar to the “Alert” module but customise it for my own alert that I want to place on the screen from my own website database?

      posted in Development
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 / MMM-Hotword Issue

      Hey @JonoGee, mate I have been researching but to no avail. Sorry mate on that. I’m just not too familiar with your set up.
      The Mic and Speakers I got are just some cheap USB type models.
      Speakers | Mic

      If you do go by this type of setup then the previous code I placed up should work #fingersCrossed ;-)

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 / MMM-Hotword Issue

      Sorry @JonoGee mate, I may not be the best person to resolve as I have USB Mic so my settings will be different to yours.

      I will attempt to do some research for you though and see if I can assist with a solution.

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 / MMM-Hotword Issue

      What type of microphone is it? Is it USB?
      Also, what version of Raspbian are you using? And is it Raspberry Pi 3+ ?

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: How to configure more than one calendar?

      You can do it one of two ways; if you wanted a label of each calendar then you can just duplicate the module with the alternating title and calendar link.
      EG:

      			module: "calendar",
      			header: "US Holidays",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check",
      						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
      					}
      				]
      			}
      		},
      		{
      			module: "calendar",
      			header: "Another Calendar",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check",
      						url: "webcal://www.calendarlabs.com/templates/ical/Another-calendar-link.ics"
      					}
      				]
      			}
      		},
      

      The other option is to place the links in the one calendar.
      EG:

      	{
      			module: "calendar",
      			header: "US Holidays",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check",
      						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
      					},
                                             {
                                             						symbol: "calendar-check",
                                             						url: "webcal://www.calendarlabs.com/templates/ical/AnotherCalendar.ics"
                                            },
                                           {
                                           						symbol: "calendar-check",
                                           						url: "webcal://www.calendarlabs.com/templates/ical/AndAThirdOneIfYouWant.ics"
                                           	}
      				]
      			}
      		}       
      
      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 / MMM-Hotword Issue

      No dramas at all.

      Now you need to double check that you are pointing to the correct device number for your audio with the Assistant module.
      In a terminal at the root directory (pi@raspberrypi:~ ) Check the device list for audio input:

      arecord -l
      

      This should provide you a list of CAPTURE Hardware Devices. The numbers you want to write down is the Card number, and device number.
      As an example on my device I have it as Card: 2 Device: 0

      Now within the config.js of the MagicMirror ensure that the device number is the same. Here is what it looks like within my config.js:

      {
      		  module: "MMM-AssistantMk2",
      		  position: "bottom_bar",
      		  config: {
      		    record: {
      		      recordProgram : "arecord",  
      		      device        : "plughw:2",
      		    },
      		
      		    notifications: {
      		      ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
      		      ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
      		    },
      		  }
      		},
      		{
      		  module: "MMM-Hotword",
      		  config: {
      		    chimeOnFinish:null,
      		    mic: {
      		      recordProgram : "arecord",  
      		      device        : "plughw:2",
      		    },
      		    models: [
      		      {
      		        hotwords    : "smart_mirror",
      		        file        : "smart_mirror.umdl",
      		        sensitivity : "0.5",
      		      },
      		    ],
      		    defaultCommand: {
      		      notificationExec: {
      		        notification: "ASSISTANT_ACTIVATE",
      		        payload: (detected, afterRecord) => {
      		          return {profile:"default"}
      		        }
      		      },
      		      afterRecordLimit:0,
      		      restart:false,
      		    },
      		  },
      },
      

      Notice within both my modules because my card number is ‘2’, that the

      device : "plughw:2",
      

      So make sure your number corresponds with your Card number.

      Give that a test and we will go from there.

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 / MMM-Hotword Issue

      Have you test your microphone to see if it working in general?

      From home directory:

      arecord test.wav
      

      and talk for about 5 seconds into your microphone.
      Then cancel that by Ctrl+C

      Once you have cancelled the test check your directory to ensure that the ‘test.wav’ file is there:

      dir
      

      if your file shows up then you can test that file to ensure it recorded your voice from the microphone:

      aplay test.wav
      

      You should be able to hear back what you just recorded.
      If you can, that means it is a configuration setting that just needs to be tweaked. If not, then there is something wrong with either the microphone settings or audio settings within the pi itself.

      I will keep monitoring and let me know how you go.

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 terminating and not activating by voice after that.

      @Sean said in MMM-AssistantMk2 terminating and not activating by voice after that.:

      mpg321

      Woo-Hoo! - Thank you so much @Sean - That worked for me. I just reinstalled (or maybe just installed) mpg321 and it is completing the whole sentence without any cutoff. #veryHapppy :-)

      The code I used was:

      sudo apt-get -y install mpg321
      

      Thanks to all that contributed to this post and I hope it helps others out just as it helped me.

      Regards,
      BJ Duncan

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 terminating and not activating by voice after that.

      Thanks @Ivanov_d I found that link the other day and did try those solutions. They didn’t work for me.

      However, I will try @Sean’s suggestion and will post back on the forum if it worked or not.

      Thanks to everyone for your assistance. Very much appreciated.

      Regards,
      BJ Duncan

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 terminating and not activating by voice after that.

      So I have been testing random things and I have noticed that if I ask it to tell me a joke, it actually completes that request. If I ask it for any type of information (eg. weather, time, who invented the telephone etc) that’s when it cuts off.

      Could it be something to do with sending a request online?

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 terminating and not activating by voice after that.

      @sdetweil Is there some setting I need to adjust to allow it to complete the request? Have I inadvertently changed a default setting somewhere?

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 terminating and not activating by voice after that.

      So I’m almost there now. I realised that I had the incorrect data within my config.js file as I used the configuration for v1 rather than v2. I also added the same position as the MMM-AssistantMk2 with the config.js (thanks to @Sean for that ;-) )

      My only issue now is that it still seems to terminate before completing the return request.
      E.g.
      Me: “Smart Mirror, what is the time?”
      (OSD: “what is the time?”)
      AssistantMk2: “The time is 8” - terminates
      (OSD: returns back to original icon immediately after termination.)
      – no ererors appear when I run this in dev mode –

      This occurs after each attempt regardless of the actual question. Could there possibly be a conflict with another module? Has anyone else come across this issue?

      Regards,
      BJ Duncan

      posted in Troubleshooting
      B
      BJ Duncan
    • RE: MMM-AssistantMk2 terminating and not activating by voice after that.

      @blee1997 - It would not acknowledge or activate when I say “smart mirror”, “hey google” or anything. I am not even sure how to set that actual activating word/s. I assumed the default was “smart mirror”. But if I click the icon with the mouse it will listen to anything and interpret anything I say including the above mentioned words.

      @Sean - Looking through the config.js it doesn’t appear to have position, so I will give that a go also.

      Thanks for replying and I will keep at it and will reply once I have a solution.

      Regards,
      BJ Duncan

      posted in Troubleshooting
      B
      BJ Duncan
    • Please help - MMM-AssistantMk2

      G’day every one. I am having issues with integrating MMM-AssistantMk2. When I start the MagicMirror, it seems to load. It initiates the default (“brief today”) and it activates a response, but towards the end of response the module appears to just terminate without completing correctly. I only seem to activate by using mouse function and clicking on the GA icon (via VNC Viewer). The microphone picks up my command and translates it onto the screen but there does not seem to be any response after that.

      I ran npm start dev and the only error I could see (and not sure how to fix) was:

      Uncaught TypeError: Cannot set property 'className' of null
          at Class.status (MMM-Hotword.js:261)
          at Class.socketNotificationReceived (MMM-Hotword.js:170)
          at module.js:246
          at r.<anonymous> (socketclient.js:25)
          at r.emit (index.js:83)
          at r.onevent (index.js:83)
          at r.MMSocket.self.socket.onevent (socketclient.js:19)
          at r.onpacket (index.js:83)
          at r.<anonymous> (index.js:83)
          at r.emit (index.js:83)
      

      Any advice or tips would be very much appreciated.

      Regards, BJ Duncan

      posted in Troubleshooting
      B
      BJ Duncan
    • MMM-AssistantMk2 terminating and not activating by voice after that.

      G’day to all.
      I am having issues with MMM-AssistantMk2 whereby when I launch MagicMirror, the module appears to be working. It makes the “beep” sound from speakers, it initiates the default call (“brief today”) but just towards the conclusion it terminates. From here I am unable to activate any command via voice. I have to activate it via mound (via VNC Viewer). If I activate by mouse it ‘hears’ my command and interprets what I am saying onto the screen, however it fails to respond.

      I ran it through npm start dev and this was the error I could see:

      MMM-Hotword.js:261 Uncaught TypeError: Cannot set property 'className' of null
          at Class.status (MMM-Hotword.js:261)
          at Class.socketNotificationReceived (MMM-Hotword.js:170)
          at module.js:246
          at r.<anonymous> (socketclient.js:25)
          at r.emit (index.js:83)
          at r.onevent (index.js:83)
          at r.MMSocket.self.socket.onevent (socketclient.js:19)
          at r.onpacket (index.js:83)
          at r.<anonymous> (index.js:83)
          at r.emit (index.js:83)
      

      Any assistance in this matter would be greatly appreciated.
      Regards,
      BJ Duncan

      posted in Troubleshooting
      B
      BJ Duncan
    • 1 / 1