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 2.1k 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

      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 Reply Quote 0
      • S Offline
        sdetweil @aunrea
        last edited by

        @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

          @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 Reply Quote 0
          • A Offline
            aunrea @AxLed
            last edited by

            @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

              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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 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