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

    Posts

    Recent Best Controversial
    • RE: How to load config data from file?

      Error message is:
      Uncaught ReferenceError: require is not defined at config.js:15

      posted in Troubleshooting
      A
      acimail01
    • RE: How to load config data from file?

      no, it is the kiosk mode. but I also tried the serveronly mode.

      posted in Troubleshooting
      A
      acimail01
    • RE: How to load config data from file?

      Here’s my attempt that does not work:
      this line causes the error: var myfs = require(‘fs’)
      what am I doing wrong ?

      pi@raspberrypi:~/MagicMirror $ cat my.json
      {
         "clockmodule": {
                      "showDate": true,
                      "displayType": "both"
              }
      }
      
      
      

      and config.js

      var myfs = require('fs')
      //var myconfig = JSON.parse(myfs.readFileSync('./my.json', 'utf8'))
      
      var config = {
         ....
      
      	modules: [
      		{
      			module: "clock",
      			position: "top_left",
      			//showDate: myconfig.module_clock["showDate"],
      			//displayType: myconfig.module_clock["displayType"],
      		},
      

      0_1563735026845_error.png

      posted in Troubleshooting
      A
      acimail01
    • How to load config data from file?

      Is it possible to load a config value from a file (yml, json or other)?

      modules: [
      	{
      		module: "clock",
      		position: "top_left",	// This can be any of the regions.
      		config: {
                                 displayType: #LOAD_VALUE_FROM_FILE#
      		}
      	}
      ]
      
      posted in Troubleshooting
      A
      acimail01
    • RE: Execute shell commands when AssistantMk2 starts or stops

      @Sean said in Execute shell commands when AssistantMk2 starts or stops:

      TANT_RESPONSE_END

      thank you!
      MMM-NotificationTrigger did the trick.

      {
        module: "MMM-NotificationTrigger",
        config: {
          triggers:[
            {
              trigger: "ASSISTANT_RESPONSE_END",
              fires: [{ fire:"MY_COMMAND1", exec: "sleep 1; ls -al" },],
            },
            {
              trigger: "ASSISTANT_UNDERSTOOD",
              fires: [{ fire:"MY_COMMAND2", exec: "sleep 1; ls -h" },],
            },
          ]
        }
      },
      
      posted in Troubleshooting
      A
      acimail01
    • Execute shell commands when AssistantMk2 starts or stops

      Hello,

      I have the modules MMM-Hotword and MMM-AssistantMk2 installed. And it works that far.
      Now I want to execute a shell command when the wizard starts to speak and execute another shell command when the wizard is quit.
      How should I proceed?

      posted in Troubleshooting
      A
      acimail01
    • Possible to combine MM-ProfileSwitcher and MMM-pages ?

      Hello,
      Is it possible to create several Profiles with several pages each?

      ist es möglich MMM-ProfileSwitcher and MMM-pages so zu kombinieren, dass man mehrere Profile mit mehreren Seiten hat? Oder gibts es andere Module für diese Lösung ?

      posted in Requests
      A
      acimail01
    • 1 / 1