MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. MilkShake
    M
    • Profile
    • Following 1
    • Followers 0
    • Topics 7
    • Posts 53
    • Best 1
    • Controversial 0
    • Groups 0

    MilkShake

    @MilkShake

    1
    Reputation
    133
    Profile views
    53
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    MilkShake Unfollow Follow

    Best posts made by MilkShake

    • RE: Syntax of MMM-NotificationTrigger

      @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"
      		   }
      		]
      	 },
         ]
        }
      },
      
      posted in General Discussion
      M
      MilkShake

    Latest posts made by MilkShake

    • RE: Rasp4 running MagicMirror stops responding after some time

      @sdetweil said in Rasp4 running MagicMirror stops responding after some time:

      @MilkShake could be

      I would start by looking in the /var/logs folder where the system logs are written

      there are multiple

      so you would need to look at the latest dates,
      usually when u boot the previous is saved and a new is started

      Thansk man. I will dig around and see what I can find. It is annoying to say the least.

      posted in Hardware
      M
      MilkShake
    • Rasp4 running MagicMirror stops responding after some time

      Hi All,
      I have a magic mirror that I built 3 years ago, running on a Rapsberry 4. It uses a small motionsensor on the left of the mirror to activate. After booting the rasp it usually works for 2-3 days after which it stops responding to SSH, motion detection and RDP. I can still ping it.

      Would anyone know how to go about troubleshooting this? Could it be memory build up?

      Best regards
      Lars Kragh-Hvidberg

      posted in Hardware
      M
      MilkShake
    • RE: Syntax of MMM-NotificationTrigger

      @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"
      		   }
      		]
      	 },
         ]
        }
      },
      
      posted in General Discussion
      M
      MilkShake
    • RE: [Guide] Control MM via Google Home

      @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"
      		   }
      		]
      	 },
         ]
        }
      },
      
      posted in General Discussion
      M
      MilkShake
    • RE: [Guide] Control MM via Google Home

      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?

      posted in General Discussion
      M
      MilkShake
    • RE: Syntax of MMM-NotificationTrigger

      @MilkShake So IFTTT makes a webrequest that looks like this:

      URL: https://MMPUBLICURL/webhook
      Method: POST
      Content type: application/json
      Body: { “sender”: { “name”:“IFTTT” }, “notification”: “OPEN_GATE”}

      I thought I could do something like:

      {
      module: "MMM-NotificationTrigger",
            config: {
              useWebhook: true,
              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!"
                          }
                      },
                    }
                  ],
                },
      		  {
      			trigger: "OPEN_GATE",
      			fires: [
      				exec: "home/pi/open_gate.py"
      			],
      		  
      		  
      		  },
              ]
            }
      },
      

      What is the correct syntax to fire a script?

      posted in General Discussion
      M
      MilkShake
    • Syntax of MMM-NotificationTrigger

      Hi,
      I am having difficulties with the syntax of MMM-NotificationTrigger. I have this syntax working (semi):

      {
      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!"
                          }
                      },
                    }
                  ],
                },
      
              ]
            }
      },
      

      I need to add a trigger using webhook for the notification “Open_Gate” that fires a local script. Every time I change the syntax it seems to get broken. Can anyone help?

      posted in General Discussion
      M
      MilkShake
    • RE: Ideas Needed

      @Bugsounet Thanks Bugs! I will look into that when I have time for it.

      posted in General Discussion
      M
      MilkShake
    • RE: Ideas Needed

      I went the way of dataplicity.io/wormhole, NGINX, IFTTT and MMM-NotificationTrigger. That way I should be able to use a webhook to execute the python script.

      posted in General Discussion
      M
      MilkShake
    • RE: Ideas Needed

      @retroflex The mirror and the gate are on the same LAN. The assistant understands the “Open Gate” command and replies with “Ok, Opening the gate”, but if I were to use a Google Action to do the GET, it would come from the internet.

      I don’t know how to catch the event locally on the mirror. If I did, I would just call the python script and the gate would open.

      posted in General Discussion
      M
      MilkShake