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.

    How do notifications work?

    Scheduled Pinned Locked Moved Troubleshooting
    notificationsbuttonprofileswticher
    11 Posts 4 Posters 9.0k Views 4 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.
    • ? Offline
      A Former User @Sruc91
      last edited by A Former User

      @Sruc91 as i know, you are right.
      Or you can build your ‘translator’ module which send CURRENT_PROFILE message when BTN_PRESSED message is coming between btn module and prflswtchr module… Its better to keep original legacy codes.

      1 Reply Last reply Reply Quote 0
      • J Offline
        j.e.f.f Project Sponsor Module Developer @Sruc91
        last edited by

        @Sruc91 well yeah, but the way MMM-Buttons works, it would send the same payload each time. So if you configured the button press to send the notification ‘CURRENT_PROFILE’ with the payload ‘Jeff’, each button press would be a request to show Jeff’s profile.

        So you need something that always receives the same notification/payload pair to do something different each time with it. That’s what my modification to ‘MMM-ProfileSwitcher’ does, or you can do as @Sean says and write another module to keep track of which profile is next and relay the ‘CURRENT_PROFILE’ notification to the MMM-ProfileSwitcher.

        1 Reply Last reply Reply Quote 0
        • S Offline
          Sruc91
          last edited by

          @j-e-f-f That makes sense, thank you very much.

          Is there any way that I can track those notifications? Like for example, if I send a notification with the MMM-Buttons, is it registered anyway that I can check?

          J cowboysdudeC 2 Replies Last reply Reply Quote 0
          • J Offline
            j.e.f.f Project Sponsor Module Developer @Sruc91
            last edited by

            @Sruc91 you’ll see output in Electron’s console when the event is broadcast.

            1 Reply Last reply Reply Quote 0
            • cowboysdudeC Offline
              cowboysdude Module Developer @Sruc91
              last edited by

              @Sruc91

              console.log(your output);

              1 Reply Last reply Reply Quote 1
              • 1
              • 2
              • 2 / 2
              • 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
                OSZAR »