MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    [Guide] Control MM via Google Home

    Scheduled Pinned Locked Moved General Discussion
    24 Posts 6 Posters 9.1k Views 6 Watching
    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.
    • S Offline
      sgarg15
      last edited by

      Ok so i got it to work with MMM-Remote-Control, So now i am wondering how can you have multiple commands, like send multiple notifications to for ex. turn on and off the monitor? Any ideas? @Sean

      1 Reply Last reply Reply Quote 0
      • M Offline
        MilkShake
        last edited by

        Hi, Thanks for the guide. I got it working as IFTTT actually sends a webrequest to my mirror. I am having trouble with the syntax of NotificationTrigger. I already use that module to turn on my Mirror if my gate button is pushed and display an alert.

        I would like to execute a script when the trigger OPEN_GATE is received. Here is my current config:

        {
        module: "MMM-NotificationTrigger",
              config: {
                  triggers:[
                  {
                    trigger: "PLAY_SOUND",
                    fires: [
                      {
                        fire:"USER_PRESENCE",
                        payload: function(payload) {
                          return false
        
                        }
                      },
        
                      {
                        fire:"SHOW_ALERT",
                        payload: function(payload) {
                          return {
                            type: "notification",
                            title: "Porten",
                            message: "Der er nogen ved porten!"
                            }
                        },
                      }
                    ],
                  },
        
                ]
              }
        },
        

        Can anyone help with the syntax to add a trigger for “OPEN_GATE” notification that fires a script?

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MilkShake @MilkShake
          last edited by

          @MilkShake
          Got it to work using:

          {
             module: "MMM-NotificationTrigger",
             config: {
               useWebhook:true,
          	 triggers:[
          	   {
          	      trigger: "PLAY_SOUND",
          		  fires: [
          		    {
          			fire: "USER_PRESENCE",
          			payload: function(payload) {
                            return false
                          }
          			}
          		  
          	   ]
          	 },
          	 {
          	    trigger: "OPEN_GATE",
          		fires: [
          		   {
          		   fire: "OPENING_THE_GATE",
          		   exec: "sudo python /home/pi/open_gate.py"
          		   }
          		]
          	 },
             ]
            }
          },
          
          1 Reply Last reply Reply Quote 0
          • M Offline
            mopedmann
            last edited by

            Hi guys,
            thanks for the great guide @sean.
            I am currently using it with MMM-Carousel w/ Slide Navigation and it works fine.
            I am struggling to execute a command for another project. https://community.spiceworks.com/how_to/123787-raspberry-pi-powered-surveillance-camera-monitoring-display
            The command is /etc/init.d/displaycameras {start|stop|repair}.
            How can I execute the command via webhook?
            I would be delighted to hear from you.
            With kind regards
            mopedmann

            1 Reply Last reply Reply Quote 0
            • 1
            • 2
            • 3
            • 3 / 3
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy