• 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.

Dynamic Module Chaining

Scheduled Pinned Locked Moved Development
3 Posts 3 Posters 92 Views 3 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.
  • H Offline
    haji6
    last edited by 8 days ago

    That may be a poor title - but I am trying to understand how modules can work with each other based off of various returns variables, states, etc.

    For example - I would like to use a weather module (default/any) that based on the current weather (sunny, rain, storm, snow, etc.) it would then dynamically use something like MMM-Eye-Candy module and based on what the weather variable is, call the corresponding gif/sticker that relates to the current weather and then have this change as the weather changes dynamically? Would using something like MMM-Remote-Control be what I am looking for in this instance?

    More to the question - is this something that is doable and just requires the code to do so or would there be any limitations within the core mm platform that would not let this work?

    S B 2 Replies Last reply 8 days ago Reply Quote 0
    • S Online
      sdetweil @haji6
      last edited by sdetweil 8 days ago 8 days ago

      @haji6 modules can share information with other modules

      by broadcasting their data (api sendNotification)

      consuming modules accept the broadcast by ( api notificationReceived) and check the notification string

      the default calendar and weather modules already send out their data for other modules

      the weather also responds to some notifications sent from other modules

      see the documentation

      many other modules document the notifications they support receiving as well as send

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • B Offline
        BKeyport Module Developer @haji6
        last edited by 7 days ago

        @haji6 Every module that supports this SHOULD have documentation that shows how they talk to each other.

        Imagine a room full of people. In that room - only one person can speak at a time.

        Person A (Calendar) will yell out “I have an Event at 8:30 called Appointment” and write it on it’s part of the whiteboard (Might be nowhere). Then Person B will hear it and write it on a whiteboard where it’s told to for all to see.

        This is a simplified version of how the notification system works.

        My module (MMM-Multimonth) and others uses the above concept to display data. Why rewrite work when you can use what’s provided?

        The "E" in "Javascript" stands for "Easy"

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        1 / 1
        • First post
          1/3
          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