MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. ejay-ibm
    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 7
    • Posts 94
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Mouse arrow doesn't hide after MagicMirror is loaded

      Hi,

      From the doc here:

      https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi

      Autohiding the Mouse Pointer
      Install unclutter:
      
      sudo apt-get install unclutter
      You can create an .xinitrc script to run the tool.
      See https://wiki.archlinux.org/index.php/Unclutter
      
      But a simpler option is to add a line to the end of the file:
      
      $ nano ~/.config/lxsession/LXDE-pi/autostart
      ...
      @unclutter -display :0 -idle 3 -root -noevents
      This will add a 3 second delay, before the pointer disappears from the screen when not using it.
      
      

      Hope this helps

      Ejay

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Total rookie, got it "running" but need help

      @motdog said in Total rookie, got it "running" but need help:

      timeFormat: 12

      You are missing a comma at line 25

      it should be

      timeFormat: 12,
      

      Ejay

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: installation problem MMM-Hotword & MMM-AssistantMk2

      @somya HI,

      You should give a try with the following command .

      npm cache clean --force
      

      Then I would delete the MMM-Asssitantmk2 and MMM-Hotword folders from the modules directory and give a new try.

      Ejay

      posted in Utilities
      ejay-ibmE
      ejay-ibm
    • RE: Considering taking donations to support the MagicMirror project. Interested in your thoughts!

      @MichMich Done, Your work definitely worth it !
      Thanks for your work and given time.

      posted in MagicMirror
      ejay-ibmE
      ejay-ibm
    • Control your Mirror Volume with Voice ( MMM-AssistantMk2 )

      Hi Members,

      I want to share my experience here using MMM-AssistantMk2.
      My objective was to be able to control my Mirror with voice command eg: “Set volume to 5” to have it at 50%

      Looking at the MMM-Assistantmk2.js code I saw the transcription hook and decided to use that.
      With the help of @Sean who has developed this module, I have implemented some additional lines in the mentioned file. ( all coding credit goes to Sean ) Else the same working code would have been ugly if it was by me :)

      First in the section: transcription hook
      add

      "VOL_HOOK": {
        pattern: "set volume to ([0-9]+)",
        command: "VOL_COMMAND"
      },
      

      then lower in section command

      "VOL_COMMAND": {
        shellExec: {
          exec: "amixer sset -M 'PCM'",
          options: (params, key) => {
            return (params[1] * 10) + "%" 
          }
        },
      } 
      

      This allows me now to say “Jarvis” … “set volume to 5” then my volume will be set to 50%.

      Note that you will need to pull the last update from git to get this works as we found a bug in the code with the ‘param’ while I tried to implement that. Sean fixed that very quickly and it’s now available.

      Hope that will be useful for the community and thanks again to Sean for this great module.

      You can find the full discussion on this topic here https://github.com/eouia/MMM-AssistantMk2/issues/89

      Ej

      posted in Development
      ejay-ibmE
      ejay-ibm
    • RE: Hide modules when display goes off through PIR (power saving)

      @broberg
      Indeed you don’t save power but when placing the module “on sleep” you stop them for making them network request with API calls .

      posted in Requests
      ejay-ibmE
      ejay-ibm
    • RE: Hide modules when display goes off through PIR (power saving)

      @thedk Hi ,
      I finally manage to find a solution that works quite good.
      I do not deserve the credit for the solutions, only for the implementation as it merges multiple sources.
      First : PIR need a first trigger to work .
      Workaround : Make the HDMI OFF when the mirror start ( so your screen doesn’t stay ON always until someone pass in front of the miror )

      For this Edit :
      in the MMM-PIR-SENSOR folder
      node_helper.js
      around line 139

      this.started = true;
          self.deactivateMonitor();  // add this to turn off monitor at startup . 
      

      Then to deactivate the idle / sleep mode of the modules due to MMM-Assistant

      Still in the node_helper.js modify line 34 like :

      exec(“/usr/bin/vcgencmd display_power 1 && xdotool key ctrl+r”, null); // add here xdotool key ctrl+r

      You need to install xdotool for this. That will allow to simulate the ctrl+r from keybaord that refresh the module therefore bring them back on screen .

      I set in the config.js file the pir module to put the screen off after 15 mins

      “powerSavingDelay”: “900”,

      I applied the same setting in MMM-AssistantMk2.js

      onIdle: {
      timer: 10006015, // if you don’t want to use this feature, just set timer as 0 or command as “”
      command: “HIDEMODULES”

      Summary When I start my mirror the screen is off. The PIR detect my presence and turn it ON .
      After 15 mins the screen goes off and the modules goes in sleep .

      As soon as the user presence is detected again , the screen goes on and modules are refreshed and come back .

      Hope this helps .

      EJ

      posted in Requests
      ejay-ibmE
      ejay-ibm
    • RE: Hide modules when display goes off through PIR (power saving)

      Hi @thedk ,

      I think my post is related to that too.
      https://forum.magicmirror.builders/topic/9792/blank-screen-issue-another-one-again-after-one-hour-or-so/7

      It look like you figured out faster than me the lack of communication of the PIR modules to the other .

      You will see in the post that I have open a git to the PIR dev to ask for some help .

      Hopefully we will find a way to make it .

      I’m not a dev at all but I understand coding .
      I confident that playing with some code for a week or 2 will bring me to what I want.

      If we don’t get consistent answer in the meantime I’ll ( If i’m able to make it) definitly share with the community my findings.

      Cheers

      posted in Requests
      ejay-ibmE
      ejay-ibm
    • RE: Blank screen issue ( another one again ) after one hour or so...

      Me again

      I Would Say that you should mark the post as solved As We have root cause here.
      I have created that git

      https://github.com/paviro/MMM-PIR-Sensor/issues/73
      To get some help from paviro and see if the ondetected function of MK2 assistant could be implemented in the PIR module so they could be kind of sync.

      Thanks to @sdetweil for driving me in the right debug way for finding the root cause of the problem.

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Blank screen issue ( another one again ) after one hour or so...

      Ok Great ! That was the issue !
      Placing the timer to 0 prevent the module to be suspended .

      Now I would like to put this back in the code so the modules in suspended mode that is great as indeed I don’t need them update when the screen is Off but i’d like to resume with the onDetected when motion is detected by the PIR module ?

      Is it possible to Sync the Idle and onDetected with the PIR Module ?

      Thanks .

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Blank screen issue ( another one again ) after one hour or so...

      Searching for similar log in other thread I found someone saying :
      “It might be due to “onIdle” and “onDetected” features. Disable them”
      So I have added to my config.js in the MM assistant module

       onIdle: {
            timer: 0,  // if you don't want to use this feature, just set timer as `0` or command as ""
            command: "HIDEMODULES"
          },
      

      I’m testing and will report results.
      Thanks

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Blank screen issue ( another one again ) after one hour or so...

      Once the screen goes OFF

      module.js:198 				MMM-Hotword is suspended.
      module.js:198				MMM-PIR-Sensor is suspended.
      module.js:198 				clock is suspended.
      module.js:198 				MMM-AssistantMk2 is suspended.
      module.js:198 				MMM-Traffic is suspended.
      module.js:198 				MMM-Hue is suspended.
      module.js:198 				MMM-DarkSkyForecast is suspended.
      module.js:198 				mmm-systemtemperature is suspended.
      module.js:198 				newsfeed is suspended.
      received TRAFFIC_COMMUTE 	MMM-Traffic.js:273 
      

      I Get now blank screen . Nothing happens in the log/dev console

      Now I moove and screen goes ON , but MM still blank I say “Jarvis” and the console logs shows.

      clock received a module notification: ASSISTANT_ACTIVATE from sender: MMM-Hotword
      module.js:154 clock received a module notification: HOTWORD_PAUSE from sender: MMM-AssistantMk2
      module.js:154 MMM-Traffic received a module notification: HOTWORD_PAUSE from sender: MMM-AssistantMk2
      module.js:154 MMM-Hue received a module notification: HOTWORD_PAUSE from sender: MMM-AssistantMk2
      module.js:154 MMM-DarkSkyForecast received a module notification: HOTWORD_PAUSE from sender: MMM-AssistantMk2
      module.js:154 mmm-systemtemperature received a module notification: HOTWORD_PAUSE from sender: MMM-AssistantMk2
      newsfeed.js:340 newsfeed - received notification: HOTWORD_PAUSE
      newsfeed.js:391 newsfeed - unknown notification, ignoring: HOTWORD_PAUSE
      module.js:154 MMM-Traffic received a module notification: ASSISTANT_ACTIVATE from sender: MMM-Hotword
      module.js:154 MMM-Hue received a module notification: ASSISTANT_ACTIVATE from sender: MMM-Hotword
      module.js:154 MMM-DarkSkyForecast received a module notification: ASSISTANT_ACTIVATE from sender: MMM-Hotword
      module.js:154 mmm-systemtemperature received a module notification: ASSISTANT_ACTIVATE from sender: MMM-Hotword
      newsfeed.js:340 newsfeed - received notification: ASSISTANT_ACTIVATE
      newsfeed.js:391 newsfeed - unknown notification, ignoring: ASSISTANT_ACTIVATE
      module.js:154 clock received a module notification: HOTWORD_SLEEPING from sender: MMM-Hotword
      module.js:154 MMM-Traffic received a module notification: HOTWORD_SLEEPING from sender: MMM-Hotword
      module.js:154 MMM-Hue received a module notification: HOTWORD_SLEEPING from sender: MMM-Hotword
      module.js:154 MMM-DarkSkyForecast received a module notification: HOTWORD_SLEEPING from sender: MMM-Hotword
      module.js:154 mmm-systemtemperature received a module notification: HOTWORD_SLEEPING from sender: MMM-Hotword
      newsfeed.js:340 newsfeed - received notification: HOTWORD_SLEEPING
      newsfeed.js:391 newsfeed - unknown notification, ignoring: HOTWORD_SLEEPING
      module.js:205 clock is resumed.
      module.js:205 MMM-AssistantMk2 is resumed.
      module.js:205 MMM-Hotword is resumed.
      module.js:205 MMM-Traffic is resumed.
      module.js:205 MMM-Hue is resumed.
      module.js:205 MMM-DarkSkyForecast is resumed.
      module.js:205 MMM-PIR-Sensor is resumed.
      module.js:205 mmm-systemtemperature is resumed.
      module.js:205 newsfeed is resumed.
      
      

      So it look like the suspended state create the blank screen. (am I right ? :/ )
      If yes Now the question is , how to prevent the modules to be suspended.
      Is that because of the PIR module ?

      thanks

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Blank screen issue ( another one again ) after one hour or so...

      @ejay-ibm said in Blank screen issue ( another one again ) after one hour or so...:

      // {
      // “module”: “updatenotification”,
      // “position”: “top_bar”
      // },

      Is that the module you are talking about ( as you can see it’s already commented ) ? If not how do you disable the updater module ?

      I’m running dev mode now waiting for the issue to reoccur.

      thanks

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • Blank screen issue ( another one again ) after one hour or so...

      Hi to all members!

      First I want to thank all contributor for the Magic Mirror project. I really enjoy this project to build my own mirror and learn new things.

      I have a pi 3b+ running on the latest OS :
      stretch V9.6

      I have installed MM and followed all documentations then implemented a few modules.
      the defaults one they are working fine ( some are commented such as alert and notifications (For debugging the blank screen issue I have and make sure the cause was not those modules)
      MMM-AssistantMk2 & MMM-Hotword ( perfectly works )
      MMM-NowPlayingOnSpotify working fine but commented for as well because getting too much errors ( when nothing was played )
      mmm-systemtemperature : Works OK
      MMM-DarkSkyForecast :Works OK
      MMM-Hue : Works OK
      MMM-Traffic : Works OK
      MMM-PIR-Sensor (To turn off&on the HDMI Port) : Works OK

      You will tell me all “works OK” so what’s wrong with you guy :)

      Well after I start my MM all is “work ok” (Again)
      The Pir sensor delay works and well shutdown the HDMI port and it comes back when a movement is detected. My delay is set to 10 mins and if I come back after 15mins the screen is back ON, So far so good .

      Now my issue : When I come back after a while let’s say an hour or more, the PIR sensor turn ON the HDMI port and my screen goes on.

      Then surprise I get a blank screen.

      I know I’m not in screen saver mode because after a VNC connection I see the little popup on screen and I can see the mouse moving as well.

      My conclusion is that the MM is in a kind of “sleep” mode waiting to be wake up.

      I can bring the MM modules back on screen for example by giving input via the Hotword/assistant module so when I say “Jarvis” the hotword is detected and MM & all modules directly come back on screen.

      No error in the MM error log from PM2 nor in the out file.
      Dev mode ( Shift CTRL I ) show me that the modules are still well receiving notification from other modules )

      Before posting this thread here as I said I read the full installation documentation and more. I did many research for a similar problem and didn’t find . I looked at many places and applied several solutions. Unfortunately without success ).

      It look like it’s a matter in the MM code itself ( But I maybe wrong I do not want to bother anyone by saying this ) Just a personnal thought.

      Here is my setup :
      /etc/lightdm/lightdm.conf

      [SeatDefaults] ( I had to create this entry in the file ) 
      xserver-command=X -s 0 -dpms
      

      As well added to

      [Seat:*] ( which was existing prior editing the file )
      xserver-command=X -s 0 -dpms
      

      Just in case ( but I have added this after and that didn’t help )

      The file /etc/xdg/lxsession/LXDE-pi/autostart

      @pcmanfm --desktop --profile LXDE-pi
      @xscreensaver -no-splash
      point-rpi
      @xset s noblank
      @xset s off
      @xset -dpms
      

      And /etc/xdg/lxsession/LXDE/autostart

      @lxpanel --profile LXDE
      @pcmanfm --desktop --profile LXDE
      @xscreensaver -no-splash
      @xset s noblank
      @xset s off
      @xset -dpms
      

      I didn’t make it in /.config/lxsession/LXDE-pi/autostart because when creating this file my system boot in openbox and not in desktop session.
      And I want to keep the desktop for other reason.

      I installed xscreen and turn of powersaving on screen and screen saver.

      My config.js file :

      /* Magic Mirror Config Sample
      *
      * By Michael Teeuw http://michaelteeuw.nl
      * MIT Licensed.
      */
      var config = {
      	"port": 8080,
      	"language": "fr",
      	"timeFormat": 24,
      	"units": "metric",
      	"modules": [
      //		{
      //			"module": "alert"
      //		},
      //		{
      //			"module": "updatenotification",
      //			"position": "top_bar"
      //		},
      		{
      			"module": "clock",
      			"position": "top_left"
      		},
      
      /*		{
      			"module": "MMM-NowPlayingOnSpotify",
      			"position": "top_left",
      			"config": {
      				"clientID": "f---------------------------0",
      				"clientSecret": "7------------------------------6",
      				"accessToken": "B------------------------------------------A",
      				"refreshToken": "A------------------------------------A"
      			}
      		},
      */
      		{
      			"module": "MMM-AssistantMk2",
      			"position": "top_right",
      			"config": {
      				"record": {
      					"recordProgram": "arecord",
      					"device": "plughw:1"
      				},
      				"play": {
      					"playProgram": "mpg321"
      				},
      				"deviceLocation": {
      					"coordinates": {
      						"latitude": 48.739464,
      						"longitude": 2.557584
      					}
      				},
      				"defaultProfile": "default",
      				"profiles": {
      					"default": {
      						"profileFile": "default.json",
      						"lang": "fr-FR"
      					}
      				},
      				"responseVoice": true,
      				"responseScreen": true,
      				"responseAlert": true,
      				"screenZoom": "80%",
      				"screenDuration": 3000,
      				"youtubeAutoplay": true,
      				"pauseOnYoutube": false,
      				"youtubePlayerVars": {
      					"controls": 0,
      					"loop": 1,
      					"rel": 0
      				},
      				"youtubePlayQuality": "default",
      				"verbose": false,
      				"auth": {
      					"keyFilePath": "./credentials.json"
      				},
      				"action": {},
      				"transcriptionHook": {},
      				"command": {},
      				"notifications": {
      					"ASSISTANT_ACTIVATE": "ASSISTANT_ACTIVATE",
      					"ASSISTANT_DEACTIVATE": "ASSISTANT_CLEAR",
      					"ASSISTANT_ACTIVATED": "HOTWORD_PAUSE",
      					"ASSISTANT_DEACTIVATED": "HOTWORD_RESUME",
      					"ASSISTANT_ACTION": "ASSISTANT_ACTION",
      					"DEFAULT_HOOK_NOTIFICATION": "ASSISTANT_HOOK",
      					"TEXT_QUERY": "ASSISTANT_QUERY",
      					"SAY_TEXT": "ASSISTANT_SAY"
      				}
      			}
      		},
      		{
      			"module": "MMM-Hotword",
      			"config": {
      				"snowboy": [
      				/*	{
      						"hotwords": "smartmirror",
      						"file": "resources/models/smart_mirror.umdl",
      						"sensitivity": "0.5"
      					},
      					{
      						"hotwords": "snowboy",
      						"file": "resources/models/snowboy.umdl",
      						"sensitivity": "0.5"
      					},
      */
      
      					{
      						"file": "resources/models/jarvis.umdl",
      						"sensitivity": "0.6,0.60",
      						"hotwords": [
      							"jarvis",
      							"jarvis"
      						]
      					}
      				],
      				"record": {
      					"sampleRate": 16000,
      					"threshold": 0.5,
      					"thresholdStart": null,
      					"thresholdEnd": null,
      					"silence": 1,
      					"verbose": false,
      					"recordProgram": "arecord",
      					"device": "plughw:1"
      				},
      				"autostart": true,
      				"autorestart": true,
      				"notifications": {
      					"PAUSE": "HOTWORD_PAUSE",
      					"RESUME": "HOTWORD_RESUME",
      					"LISTENING": "HOTWORD_LISTENING",
      					"SLEEPING": "HOTWORD_SLEEPING",
      					"ERROR": "HOTWORD_ERROR"
      				},
      				"onDetected": {
      					notification: function (payload) {
              				return "ASSISTANT_ACTIVATE";
            					},
            					payload: function (payload){
              				return {
                      			profile: payload.hotword
      					};
      				}
      			},
      		},
      },
      		{
      			"module": "MMM-Traffic",
      			"position": "lower_third",
      			"config": {
      				"api_key": "A--------------------------------------------E",
      				"mode": "driving",
      				"origin": "my street France",
      				"destination": "my street , France",
      				"route_name": "De la maison au travail",
      				"changeColor": true,
      				"showGreen": true,
      				"limitYellow": 5,
      				"limitRed": 20,
      				"traffic_model": "best_guess",
      				"interval": 1000000
      			},
      			"classes": "dimmed medium"
      		},
      
      		{
      			"module": "MMM-Hue",
      			"position": "top_center",
      			"config": {
      				"bridgeip": "192.168.0.44",
      				"userid": "H---------------------------------u",
      				"colour": false,
      				"refreshTime": "30000"
      			}
      		},
      
      {
        module: "MMM-DarkSkyForecast",
        header: "Weather",
        position: "top_right",
        classes: "default everyone",
        disabled: false,
        config: {
          apikey: "4------------------------------------------5",
          latitude: "48.725610",
          longitude: "2.572350",
          updateInterval: "60",
          language: "fr",
          label_timeFormat: "k[h]",
          label_days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"],
          iconset: "4c",
          concise: false,
          forecastLayout: "tiled"
        }
      },
               {
                     module: 'MMM-PIR-Sensor',
      		config: {
      			"sensorPIN": "23",
      			"powerSavingDelay": 600,
      		}
      	},
      
      	{
      		module: 'mmm-systemtemperature',
      		position: 'bottom_left',	// This can be any of the regions.
      		classes: 'small dimmed', // Add your own styling. Optional.
      		config: {
      			// See 'Configuration options' for more information.
      		}
      	},
      
      
      		{
      			"module": "newsfeed",
      			"position": "bottom_bar",
      			"config": {
      				"feeds": [
      					{
      						"title": "BFMTV",
      						"url": "https://www.bfmtv.com/rss/info/flux-rss/flux-toutes-les-actualites/"
      					}
      				],
      				"showSourceTitle": true,
      				"showPublishDate": true
      			}
      		}
      	],
      	"address": "localhost",
      	"ipWhitelist": [
      		"127.0.0.1",
      		"192.168.0.21",
      		"::ffff:192.168.0.23/24",
      		"192.168.0.23/24"
      	]
      };
      /*************** DO NOT EDIT THE LINE BELOW ***************/ 
      if (typeof module !== 'undefined') {module.exports = config;}
      
      

      Finally I’m up to date on MM and all Modules.

      I didn’t use the OpenGL driver in /boot/config.txt as in was generating error in the logs, and my pi is Fan cooled So I don’t worry for now about system temp ( always around 50°C) and CPU usage ( around 40% when MM + VNC are running )

      So if anyone have clue / good question to ask my to help me dig out this issue and resolve it you are most that welcome !!! I hope that this post was not too long but I wanted to give as much details as I can.

      If you need any other info feel free to ask me.

      Thank you again for all your work and help .

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • 1 / 1