Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    How to dynamically show/hide and configure other modules from my module?

    Development
    2
    2
    1445
    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.
    • M
      micsa last edited by

      How can I dynamically (via API calls)

      1. Show/hide other modules (pre-configured in config.js)
      2. Change their configuration and apply configuration dynamically?

      Case example:

      I would like to dynamically show the standard weather forecast module, and configure the module to show the forecast of a specific location which name or ID I would pass dynamically.

      1 Reply Last reply Reply Quote 0
      • D
        doubleT Module Developer last edited by doubleT

        Sounds like you want the configuration from a json instead of the config.js – because then you can change the content.
        Or json first and config.js as fallback (and default after that as the last fallback).
        So the weather module would have to read it’s config from that json and you can create a module that writes to this json something like weather_source: “location”, and triggers the weather module to reload.

        Interesting idea.

        EDIT: I found this module while looking for help with something similar:
        https://github.com/Jopyth/MMM-Remote-Control

        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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy