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

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

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 1.7k 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.
  • M Offline
    micsa
    last edited by Dec 5, 2017, 1:50 PM

    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 Offline
      doubleT Module Developer
      last edited by doubleT Dec 24, 2017, 12:42 AM Dec 24, 2017, 12:33 AM

      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 Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy