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

Config modules from external file (JSON)

Scheduled Pinned Locked Moved Troubleshooting
config modulesjsonfile
14 Posts 3 Posters 3.0k 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.
  • S Away
    sdetweil @telmini
    last edited by Jan 27, 2021, 5:32 PM

    @telmini because its looking for the (optional) node_helper.js of a module.
    this one, currentweather doesnt use one

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • S Away
      sdetweil @telmini
      last edited by Jan 27, 2021, 5:33 PM

      @telmini so the returncode is right but its not fatal in mm view.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • T Offline
        telmini
        last edited by Jan 27, 2021, 6:59 PM

        It could probably be that the XmlHttpRequest is async and the page is already loaded when the request has finished executing.

        1 Reply Last reply Reply Quote 0
        • T Offline
          tatianobusatto
          last edited by Jul 5, 2022, 5:28 AM

          Hi, I’m trying something similar. Have you managed to solve your issue using this fuction loadJSON? If not, did you find any solution to update config.js “dinamicaly”?

          S 1 Reply Last reply Jul 5, 2022, 10:14 AM Reply Quote 0
          • S Away
            sdetweil @tatianobusatto
            last edited by Jul 5, 2022, 10:14 AM

            @tatianobusatto others have written js/python code that takes their settings ( file, database, web service) and applied to a model config.js. (all their modules with fake strings for keys, etc)
            and call that js/python just before launching mm

            in installers/mm.sh

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            T 1 Reply Last reply Jul 5, 2022, 9:12 PM Reply Quote 0
            • T Offline
              tatianobusatto @sdetweil
              last edited by Jul 5, 2022, 9:12 PM

              @sdetweil thanks for the tip. Unfortunately, I couldn’t find a good js/python script example for that. For a while, I ended up creating a simple batch script to append multiple json config files for each module in between the config header and footer. In case you remember a place were I can find a thread for that discussion, please let me know.

              1 Reply Last reply Reply Quote 0
              • 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