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

Multiple URL Querys to fill JSON

Scheduled Pinned Locked Moved Solved Troubleshooting
10 Posts 3 Posters 410 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
    htilburgs @sdetweil
    last edited by Dec 11, 2024, 2:40 PM

    @sdetweil Wow, it works!
    Just checking, it has to be done in node_helper and the MMM-Module?

    (still trying to learn JS, but not afraid to ask) ☺

    S 1 Reply Last reply Dec 11, 2024, 2:47 PM Reply Quote 0
    • S Offline
      sdetweil @htilburgs
      last edited by Dec 11, 2024, 2:47 PM

      @htilburgs the sendSocketNotification(xyz,foo) ------->socketNotificationReceived(notification, payload)
      in both directions…

      only one received on each side… if there are multiple, then the last one seen is used.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      H 1 Reply Last reply Dec 11, 2024, 2:54 PM Reply Quote 0
      • H Offline
        htilburgs @sdetweil
        last edited by Dec 11, 2024, 2:54 PM

        @sdetweil Thnx, you helped me a lot!!

        (still trying to learn JS, but not afraid to ask) ☺

        1 Reply Last reply Reply Quote 0
        • M Offline
          MMRIZE
          last edited by Dec 11, 2024, 3:51 PM

          This is not a direct answer to the question, but just for your reference.
          The fetch API can be executed directly in the browser, not just in a Node.js environment. You can call the fetch API directly in MMM-MyModule.js without needing node_helper.js.

          Additionally, since the fetch API works asynchronously, you can manage the responses of two fetch calls as follows:

          • If you need to use the response that arrives first, use Promise.race() or Promise.any().
          • If you need to wait for both responses to arrive before proceeding, use Promise.all().

          Using these methods can help you manage data synchronization more efficiently.

          S H 2 Replies Last reply Dec 11, 2024, 3:59 PM Reply Quote 1
          • S Offline
            sdetweil @MMRIZE
            last edited by Dec 11, 2024, 3:59 PM

            @MMRIZE quite true, since fetch is now part of electron.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • H Offline
              htilburgs @MMRIZE
              last edited by Dec 11, 2024, 10:01 PM

              @MMRIZE Thanks for your reaction.

              (still trying to learn JS, but not afraid to ask) ☺

              1 Reply Last reply Reply Quote 0
              • S sdetweil has marked this topic as solved on Dec 14, 2024, 2:45 PM
              • 1 / 1
              1 / 1
              • First post
                9/10
                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