• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Change MMM-Page page using MMM-PIR

Scheduled Pinned Locked Moved Unsolved Troubleshooting
5 Posts 3 Posters 1.6k Views 2 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.
  • A Offline
    aunrea
    last edited by Sep 6, 2019, 2:03 PM

    How can I change the page for MMM-Page using MMM-PIR I have MMM-PIR and I want it to change the page when the senor doesn’t detect movement and then change it back when it does. Is there a way to do this?

    S 1 Reply Last reply Sep 7, 2019, 2:09 PM Reply Quote 0
    • S Away
      sdetweil @aunrea
      last edited by Sep 7, 2019, 2:09 PM

      @aunrea i don’t think MMM-PIR can do that…

      I think you might be able to use pages, or remotecontrol or profile (all mmm- leading chars) to do that tho

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • A Offline
        AxLed Module Developer
        last edited by Sep 7, 2019, 5:53 PM

        @aunrea
        Your request should be possible, check the following module MMM-NotificationTrigger.

        As MMM-PIR uses USER_PRESENCEwith values true and false, you can convert the notifications with MMM-NotificationTrigger to control MMM-Page.

        AxLED

        A 1 Reply Last reply Sep 7, 2019, 8:27 PM Reply Quote 0
        • A Offline
          aunrea @AxLed
          last edited by Sep 7, 2019, 8:27 PM

          @AxLed said in Change MMM-Page page using MMM-PIR:

          USER_PRESENCE

          I am not sure how to configure the config file to make that happen. There isn’t any documentation for the MMM-NotificationTrigger module, just examples that don’t really fit my needs.

          1 Reply Last reply Reply Quote 0
          • A Offline
            aunrea
            last edited by Sep 22, 2019, 2:37 PM

            I switched to MMM-PIR-Sensor and I am using MMM-NotificationTrigger to let MMM-PIR-Sensor communicate with MMM-Page. I am using the following in my config:

            {
            	module: 'MMM-PIR-Sensor',
            	config: {
            		sensorPin: 4,
            		sensorState: 1,
            		powerSaving: false,
            		powerSavingDelay: 60 * 10,
            		relayPin: false,
            		relayState: 1,
            		alwaysOnPin: false,
            		alwaysOnState: 1,
            		alwaysOffPin: false,
            		alwaysOffState: 1,
            	}
            },
            {
              module: 'MMM-NotificationTrigger',
              config: {
                triggers:[
                  {
                    trigger: "USER_PRESENCE",
                    fires: [ 
                      {
                        fire:"PAGE_CHANGED", 
                        payload: (payload) => { 
                          if (payload == false) {
                            return 1
                          } else {
                            return 0
                          }
                        },
                      },
                    ],
                  },
                ]
              },
            }
            

            I can’t get this to work. If I turn powerSaving: true, I can get the screen to turn off when the sensor doesn’t detect movement for 10 minutes. I just can’t get the page to change. Am I doing something wrong?

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • 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