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

    Posts

    Recent Best Controversial
    • RE: turning monitor on by incoming call?

      Never tryed those module but you should open the code, find where MMM-FRITZ-Box-CallMonitor detect a call (I beleive it’s on the socketNotificationReceived function).
      Then you should identify which function is called when the sensor detect you in the MMM-PIR-Sensor.
      Then you can add a this.sendNotification("THE_NAME_YOU_WANT", {}) in the MMM-FRITZ-Box-CallMonitor side and a

      if (notification === "THE_NAME_YOU_WANT") {
        //call the function that the sensor thing call
      }
      

      And it should work.
      I can’t help you more than that because I do not own those sensors.
      Good luck

      posted in Requests
      romainR
      romain
    • RE: Calendar no entries

      your link works for me (the http://www.ifeiertage.de/he-sk.ics one) it’s telling me Walpurgisnacht is in 5 days, Tag der Arbeit in 6 days etc etc…
      So you might have done something wrong in your config.js file like forgot a comma or some quotation marks around the url

      posted in Troubleshooting
      romainR
      romain
    • RE: 3 different Alexa modules, which one is the best?

      @borrigan

      AlexaPi service, when running, is “Always On”? It is always listening? How to test it directly without having integrated with MMM-AlexaPi Yet?

      you should hear “hello” when it start and then if you say Alexa you should hear “yes” then you can ask a question. It is always listening.
      A little tips for you, before using the service, try to run AlexaPi yourself. It provide you more debugging info that way.
      To do it, first desactivate the service with the terminal by writing sudo systemctl stop AlexaPi.service; sudo systemctl disable AlexaPi.service (you can reactivate later by doing sudo systemctl enable AlexaPi.service).
      Then you can run AlexaPi yourself by writing in the terminal /opt/AlexaPi/src/main.py -d (If you you putted it on that location anyway).

      Where can the activation word be configured? If I just say “Alexa”, should it work?

      in the yaml file in /etc/opt/AlexaPi/config.yaml there is a section pocketsphinx: (this is what is use to detect words I believe). in that section you have a key phrase: with "alexa" as a value. you can simply change the word to another word. Do not choose an over complicated one though, I think pocketsphinx try to guess what it supposed to sound like based on the spelling so if you choose a word not in English it might not guess correctly. You shoudl let alexa untill you get it to work though, because we know that one work for sure. You can test other word later.

      Finally, I spent hours troubleshooting the microphone. It is a very standard Logitech Microphone. I just could not get it working.

      I am no expert in sound but I going to try to help you.
      First, I rather have the output from arecord -l rather than arecord -L . the later give to much information to my understanding.
      The output of my arecord -l look like this:

      pi@raspberrypi:~ $ arecord -l
      **** List of CAPTURE Hardware Devices ****
      card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
        Subdevices: 1/1
        Subdevice #0: subdevice #0
      

      I can see it’s “card 1” and “device 0” . that’s what I am interesting about.
      then, my aplay -l give me

      pi@raspberrypi:~ $ aplay -l
      **** List of PLAYBACK Hardware Devices ****
      card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
        Subdevices: 8/8
        Subdevice #0: subdevice #0
        Subdevice #1: subdevice #1
        Subdevice #2: subdevice #2
        Subdevice #3: subdevice #3
        Subdevice #4: subdevice #4
        Subdevice #5: subdevice #5
        Subdevice #6: subdevice #6
        Subdevice #7: subdevice #7
      card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
        Subdevices: 1/1
        Subdevice #0: subdevice #0
      card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
        Subdevices: 1/1
        Subdevice #0: subdevice #0
      

      I using the default speaker output, which is the bcm2835 Alsa device which is “card 0” and “device 0”

      Knowing that you can test if your device working by doing the following:
      meaning you should be able to do a aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav to test your speaker where “hw:0,0” (you could also put “plughw:0,0”) is your output device. Not sur what does “hw” and “plughw” mean, but the numbers are the card number and the device number. 0,0 in my example (remember the aplay -l above)
      this will use the vlc handler i beleive. You can test it the same way with play instead of aplay for the sox handler.

      you can test your michrophone in the same way by doing arecord -r 48000 -f S16_LE -D hw:1,0 -d 5 test.wav this will tell to record with the device hw:1,0 (in my example the card 1, device 0) for 5 second at a rate of 48000Hz and as S16_Le type (not sure what that is) and the result will be put in a file name test.wav. You can then play or aplay that file to see if the recording whent well.

      If you manage to make those command work. In the /etc/opt/AlexaPi/config.yaml there is a section sound: with a key “input_device:” and a key “output_device:” . Both of those key have for value “default” . for the output it’s easy, the default is the system defautl output which is hw:0,0 in my example. so you can let default or put “hw:0,0” instead if you want to use that output like me.
      The tricky part is the input. The input is your michrophone, but there is no “default” michrophone in the pi right ? so the chance AlexaPi understand what you are talking about are prett slim in my opinion.
      But when I wrote “hw:1,0” or “plugwh:1,0” instead of default , I had an error. For some reason it didn’t wanted to take that value. That’s when trickery was needed for me. I’m sure some people hadn’t to do that but I did.
      I creat a alsa configuration file name “asound.conf” with the following in it :

      pcm.myTest {
          type dsnoop
          ipc_key 816357492
          ipc_key_add_uid 0
          ipc_perm 0666
          slave {
              pcm "hw:1,0"
              channels 1
          }
      }
      
      pcm.!default {
              type asym
              playback.pcm {
                      type plug
                      slave.pcm "hw:0,0"
              }
              capture.pcm {
                      type plug
                      slave.pcm "myTest"
              }
      }
      

      This overrite what is the “default” configuration.
      type asym mean my playback and default arn’t on the same sound device.
      the playback.pcm describe what is my output device. In my example you can see i putted “hw:0,0” because I use the default output.
      the capture.pcm describe the input device (microphone). I put “MyTest” as a name which is describe above in the file (the name isn’t very explicit but I was testing and never changed it >.> )
      I am not going to enter in the detail for the myTest thing, but basically, it’s tell that the michrophone can be use in multiple application at the time and that it is the “hw:1,0” (remember the arecord -l thing above in the post)

      This asound.conf file should be put in the /etc/ folder.

      Well. That’s it. That’s what I had to do to make my microphone work for AlexaPi. Adapt this to your own devices and it might work like me.
      Remember to test it whitout the service first and when that’s work you activate the service and see if it still work or not. and if not we’ll try to understand why.

      posted in General Discussion
      romainR
      romain
    • RE: Cant figure out how to install a module in the config.js

      @Edswald you didn’t put the module info at the right place and you missing

       ],
              paths: {
                      modules: "modules",
                      vendor: "vendor"
              }
      }
      

      just before the do not edit the line bellow.

      Your file should look like this at the end

                      {
                              module: "newsfeed",
                              position: "bottom_bar",
                              config: {
                                      feeds: [
                                              {
                                                      title: "New York Times",
                                                      url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                                              }
                                      ],
                                      showSourceTitle: true,
                                      showPublishDate: true
                              }
                      },
      		{
      			module: 'twitControl',
      			position: 'top_left',
      			config: {
      				maxNumTweets: 5,
      				streamType: 'followings',
      				api_keys: {
      					consumer_key: 'YOUR CONSUMER KEY',
      					consumer_secret: 'YOUR CONSUMER SECRET',
      					access_token_key: 'YOUR ACCESS TOKEN KEY',
      					access_token_secret: 'YOUR ACCESS TOKEN SECRET'
      				}
      			}
      		},
              ],
              paths: {
                      modules: "modules",
                      vendor: "vendor"
              }
      }
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== 'undefined') {module.exports = config;}
      
      posted in Troubleshooting
      romainR
      romain
    • RE: Cant figure out how to install a module in the config.js

      in the config file you should have a modules: [ line. In fact, there should be almost at the end of the file an ]
      This mean modules is an array. ([ value1, value2, etc... ] is an array.
      Every value of the array is a dictionnary (a list of keys associates with a value) . it should look like this

      {
                 key: value,
                 next_key: value,
                 etc..
      }
      

      Two key/value pair should be separated by a , and two dictionary should be separated by a ,
      as an example

      {
                 key: value,
                 next_key: value,
                 etc..
      },
      {
                 key: value,
                 next_key: value,
                 etc..
      }
      

      the , is very important because without it, it does’nt understand it changed value and you end up with an error because it doesn’t understand why you put a { or a : in the middle of an unfinished value

      What you should know is this : a [ is always closed by a ], if you having one without the other few characters later somethings is wrong. a { is always closed by a }, if you having one without the other few characters later somethings is wrong.
      two element in the same array should be separeted by ,. same thing with two element in a dictionnary.
      If you have a config issue it probably mean you forgot one of the following , { } [ ] : somewhere.
      Since you probably just copy past the config in the readme, my best bet is that you either forgot the first { or the last }, . Or maybe the configuration didn’t put a , at all at the end in their example because it suppose you add it at the end of the array. In that case
      The last element of the array might not have a , because it’s the last element. So if you add an alement after it, you have tu put it yourself.

      Hopefully that was clear enough

      posted in Troubleshooting
      romainR
      romain
    • RE: 3 different Alexa modules, which one is the best?

      @borrigan Hello. I end up successfully setting MMM-AlexaPi and MMM-alexa.
      they both have adventages and inconvinient
      -MMM-AlexaPi

      • This module isn’t a stand alone module. You need to install AlexaPi on you pi ( https://github.com/alexa-pi/AlexaPi )
      • This module is ONLY to show the status of AlexaPi. And this is AlexaPi that allow you to talk to Alexa. Meaning you don’t need the mirror at all to use it. But it’s neat because you can “see” what’s happening. Also Alexa saying “yes” when you say her name.
      • It might or might not be easy to setting up. Some people won’t have any issue using it by following the setup instruction and other would have to tweaks some things.
      • slower than MMM-alexa

      -MMM-alexa

      • It is a stand alone module. Meaning you just need this module to talk to Alexa.
      • The square indicate you the status . yellow is bad configuration if I recall correctly. Red is ready to listen. green is listening.
      • It is not activated by voice. You need either a button or to send the right notification to the module to make Alexa listen to you.
      • It seem to not answer as much as MMM-AlexaPi
      • You need to add https://sakirtemel.github.io/MMM-alexa/ to the allow return URL in your avs security settings of your device . And need to generate the first token by going in that first url and enter the requested information
      • faster than MMM-AlexaPi

      in both case I had to tweak some of my sound configurations files so my microphone is picked up and the output is my speaker.
      Because MMM-Alexa needed to be activated manually or by another module (and the fact it seem to provide less answer) I think MMM-AlexaPi is better. Even though AlexaPi seem a bit slower to answer. To trigger MMM-Alexa I used the voicecontrol module (it’s a module that convert voice into notification. I set up the word “Alexa” to send the right notification to mmm-alexa) but the voicecontrol module seem to have a loooooooooot of false positive. It was activated way to much even if I didn’t talk sometime.

      I didn’t successfully made mirrormirroronthewall worked though (I might try again later. I didn’t tryed since I made the other two works)
      I think mirrormirroronthewall is probably the best module of all three since is suppositivly allow you to do more than the other two that only allow you to ask question to alexa and get answers from it.

      as for the

      But it does not say how to develop this module :(

      You can either use an already existing moduel like “voicecontrol” to do that.

      or developping something yourself. to do that:
      You can for example take as a template the helloworld module in the ~/MagicMirror/modules/default as a template . copy/past it in the ~/MagicMirror/modules , rename the folder to something else. let’s say “toto” as an example, then rename the file inside it to match that name. helloworld.js should now be toto.js . now open the toto.js and replace all the hello words by toto.
      Then delete the text: "Hello World!" and the wrapper.innerHTML = this.config.text; since you don’t need to display anything.
      Now you can write this.sendNotification('ALEXA_START_RECORDING', {}); where was the wrapper.innerHTML = this.config.text;
      And that send the notification to start recording what you are saying to mmm-alexa. However that example will only work once.

      If you never code something before, I don’t recomand you to do the developping of a module like this yourself. It’s better to use an already existing module.

      /!\ if your sound configuration isn’t good, you might not be able to use voicecontrol and mmm-alexa in the same time.
      Explaining the sound configuration here would be pointless since you might not have those issue.

      posted in General Discussion
      romainR
      romain
    • RE: AlexaPi

      @davidrq7 Sure, you go to your AlexPi folder
      cd /opt/AlexaPi/
      Then you use the command git checkout v1.4
      (you could have write git checkout then press the tab key once or two time so it show you all available version. This work for most github repository)

      posted in Troubleshooting
      romainR
      romain
    • RE: AlexaPi

      @davidrq7 Wait, are you still on your connexion issue ? Or it’s a sound issue ? Because the user might be an issue for the sound, but it’s unlickly to be an issue for the connexion

      posted in Troubleshooting
      romainR
      romain
    • RE: Admin - Pin a 'Usefull Terminal Commands' post?

      All the sudo apt-get whatever command can be replace by sudo apt whatever apt does the same as apt-get but provide a progress bar in addition.

      Also you put two point 14. And the first one is missing a step and there is a a space missing.
      cd ~/MagicMirror should be cd ~/MagicMirror/modules and ~MagicMirror/modules/ $ gitclone https://github.com/NAMEOFMODULE should become ~MagicMirror/modules/ $ git clone https://github.com/NAMEOFMODULE
      But maybe instead of https://github.com/NAMEOFMODULE maybe it would be easier to say moduleUrl or something ? because the url doesn’t onlt content the url of the module but also who did it. So if somebody who never used git before try to write https://github.com/MMM-AlexaPi for example, it will fail. because part of the url is missing.

      posted in Troubleshooting
      romainR
      romain
    • RE: AlexaPi

      @davidrq7 This mean you have already an instance of alexaPi running. reboot or kill the already running alexapi

      posted in Troubleshooting
      romainR
      romain
    • RE: AlexaPi

      Not completly sure about this but the http server : 5055 might just be the port AlexaPi using to comunicate with the MagicMirror module MMM-AlexaPi . I do have the same message and it doesn’t prevent AlexaPi to work

      posted in Troubleshooting
      romainR
      romain
    • RE: Trying to connect via SSH or VNC

      You might have to activate the ssh through the sudo raspi-config panel. It should be under interfacing option. also you need to have ssh keys ssh-keygen It will ask you some stuff but you can let it empty

      posted in Troubleshooting
      romainR
      romain
    • RE: No sound ober USB-Card

      I’m quite new in Rpi and I had a loooooooooooooot of troubble with the sounds.

      I believe there is a way to desactivate HDMI audio somewhere in the sudo raspi-config and forcing the 3.5 m jack in the Advanced Options and Audio

      if that doesn’t work, I noticed that if you open alsamixer through a terminal, you can just change the value of the different channel but not “select” it as the default device to use.
      You can, however, open the “Audio Device Settings” in “Preferences” within the main menu of the pi on the desktop and choose the “default card” to use and reboot.

      Alternatively, you can creat a .asoundrc in your pi folder to describe what is the default card.(It will only concern the pi user though. You can make it globale if you use a /etc/asound.conf file instead). Those files probably doesn’t exist at first, you might have to create them.

      But at the end of the day, I never trully succeded to use my usb sound card fully. Not sure why but in a lot of circumstances the driver crash or something if I play a sound with it and all my usb devices directly plug in the pi freez. so I end up configure the asound.file to say that my output is the normal output of the pi and my microphone is the external sound card.

      posted in Troubleshooting
      romainR
      romain
    • RE: Two module with voice control in the same time

      I did it, It wasn’t easy but it’s work, I can use voicecontrol and others voicecontrol driven module at the same time.
      I had to change my /etc/asound.conf file again (yes, again. Because changing it already solve some of my issue on the past)

      before my file looked like this:

      pcm.!default {
              type asym
              playback.pcm {
                      type plug
                      slave.pcm "hw:0,0"
              }
              capture.pcm {
                      type plug
                      slave.pcm "hw:1,0"
              }
      }
      

      Easy enough when you know what your doing (that wasn’t my case). this file is there to say what is the default device to playback and capture (A lot of application or software just use the default device so if the default configuration isn’t working for you, you need to change it for you.) In my cas ethe microphone is the “hw:1,0” and my speaker is the “hw:0,0”

      That worked well when my microphone is used by one application at the time. However, not so much when it need to be used by multiple ones.
      So my new /etc/asound.conf file is looking like this now

      pcm.myTest {
          type dsnoop
          ipc_key 2241234
          slave {
              pcm "hw:1,0"
              channels 1
          }
      }
      
      pcm.!default {
              type asym
              playback.pcm {
                      type plug
                      slave.pcm "hw:0,0"
              }
              capture.pcm {
                      type plug
                      slave.pcm "myTest"
              }
      }
      

      instead of directly say that my input device is the “hw:1,0” I say it’s “myTest”, which is describe above. myTest’s type is “dsnoop” , that’s whats allow the michrophone to be use by multiple application at the same time. The ipc_key is there with a random value because when I tested with arecord, it asked me to put one. The channels is there because it was on the documentation ( http://alsa.opensrc.org/Dsnoop ) >.> not sure what it does though.
      And there you go, after that I could use two voice control things at the time

      posted in Troubleshooting
      romainR
      romain
    • RE: VoiceControl module

      I did it, It wasn’t easy but it’s work, I can use voicecontrol and others voicecontrol driven module at the same time.
      I had to change my /etc/asound.conf file again (yes, again. Because changing it already solve some of my issue on the past)

      before my file looked like this:

      pcm.!default {
              type asym
              playback.pcm {
                      type plug
                      slave.pcm "hw:0,0"
              }
              capture.pcm {
                      type plug
                      slave.pcm "hw:1,0"
              }
      }
      

      Easy enough when you know what your doing (that wasn’t my case). this file is there to say what is the default device to playback and capture (A lot of application or software just use the default device so if the default configuration isn’t working for you, you need to change it for you.) In my cas ethe microphone is the “hw:1,0” and my speaker is the “hw:0,0”

      That worked well when my microphone is used by one application at the time. However, not so much when it need to be used by multiple ones.
      So my new /etc/asound.conf file is looking like this now

      pcm.myTest {
          type dsnoop
          ipc_key 2241234
          slave {
              pcm "hw:1,0"
              channels 1
          }
      }
      
      pcm.!default {
              type asym
              playback.pcm {
                      type plug
                      slave.pcm "hw:0,0"
              }
              capture.pcm {
                      type plug
                      slave.pcm "myTest"
              }
      }
      

      instead of directly say that my input device is the “hw:1,0” I say it’s “myTest”, which is describe above. myTest’s type is “dsnoop” , that’s whats allow the michrophone to be use by multiple application at the same time. The ipc_key is there with a random value because when I tested with arecord, it asked me to put one. The channels is there because it was on the documentation ( http://alsa.opensrc.org/Dsnoop ) >.> not sure what it does though.
      And there you go, after that I could use two voice control things at the time

      posted in Utilities
      romainR
      romain
    • RE: VoiceControl module

      @disakos I didn’t use it to run script, I wanted it specificaly for mmm-alexa. However I did check that the other module received the notification It send.
      I did that by writing my own useless module that only print the notification it received.
      You need in your main file a

      notificationReceived: function(notification, payload, sender){
         //Whatever you want to do
      },
      

      This is different to “socketNotificationReceived” , socket notification receive only deal with your node helper file. But “notificationReceived” catch notification send from a module to another.

      With that in mind, you can add the notificationReceived thing to the module you want to control with the voicecontrol module or add whatever you need to it if it already exist

      posted in Utilities
      romainR
      romain
    • RE: VoiceControl module

      Hello everybody, I try to use this voicecontrol module AND mmm-alexa in the same time (mmm-alexa need to be trigger by a notification. That where voicecontrol is interesting at the moment) but because both the module use the mic, it doesn’t work.
      If I put only one module at the time no problem. Both of them in the same time, voice control doesn’t work.
      How can I use the same mic for two different module ?

      posted in Utilities
      romainR
      romain
    • RE: MMM-Alexa don't work :/

      @theusu5k MMM-AlexaPi is module that show what https://github.com/alexa-pi/AlexaPi is sending to it so you need to install this as well.

      As for MMM-alexa, it need to be activated either by receiving the right notification or by using a button. I’m not sure on which pins the button should go though

      posted in Troubleshooting
      romainR
      romain
    • Two module with voice control in the same time

      Hello, I wanted to use the MMM-alexa module but it need to be trigger and I do not have a button. The alternative is to send a notification to trigger it. Which is working (I tryed by sending a notification every 30 second and ask a question then).
      The next natural step was to use a voice detection module to send the notification right ? So I cloned alexyak voicecontrole module. The idea of that module is that it would send a notification to others module when a specific keywork is detected .
      Even though a bunch of error show up on the screen, I am able to make that module works. I can say “Alexa” and it does send the notification I chosed to other module.
      So, both module work separatly.
      But if I run both module in the same time, It doesn’t work anymore.
      I noticed that If a module is using my mic, I can’t do an “arecord” on the terminal. So I’m guession that the MMM-alexa module prevent other programme to use it in the same time.

      Is it a way to use the same mic with two different module ?

      posted in Troubleshooting
      romainR
      romain
    • RE: Black Screen after Launching application.

      @undergroundauth This is weird, you said you did not add module and yet, your log talk about “modules/aiclient” wich isn’t a default module . In a fresh cloned repository, your modules folder should only have a “default” folder, a “node_modules” folder and a “Readme.md” file in it.
      your error talk about a “modules/aiclient” so it’s clear that you have another folder named “aiclient” in it. And If there is an error on it, it’s also mean the magic mirror try to call it which mean you add a section on the “config/config.js” file in the magic mirror repository.
      So this module must have an error in it that messed up the display.
      do something like renaming the current config file and reset the default value on a new one.
      the following command should do the trick

      mv ~/MagicMirror/config/config.js ~/MagicMirror/config/old_config.js.save
      cp ~/MagicMirror/config.js.sample ~/MagicMirror/config.js
      

      If you didn’t mess with the config.js.sample it should reset your config.js to the default configuration.
      Try to run the magic mirror next and tell us if something appear on the mirror.

      posted in Troubleshooting
      romainR
      romain
    • 1 / 1