MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Elizashahh
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 0

    Elizashahh

    @Elizashahh

    0
    Reputation
    2
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Elizashahh Unfollow Follow

    Latest posts made by Elizashahh

    • Could Someone Guide me with Custom Module for Weather API Integration?

      Hello there,

      I have been working on my MagicMirror setup for a few weeks now and I have been thoroughly enjoying it. I have already installed a few modules and customized the interface; but now I am trying to create my own custom module that integrates data from a weather API.

      While I have managed to get basic API calls working using JavaScript; I am struggling to understand how to properly fetch the data and display it within the MagicMirror framework.

      I can retrieve the JSON data from the API; but I am unsure of the best way to periodically update the display with new data. Should I handle this within getDom or is there a better place to manage the periodic updates?

      I have followed the basic template for a MagicMirror module; but I am unclear about best practices for splitting the API call logic and the display logic. Is it better to keep the API logic in the node_helper.js file; or can I handle everything in the main module file?

      Also, I have gone through this post; https://forum.magicmirror.builders/topic/17644/a-workday-weather-module which definitely helped me out a lot.

      Once the weather data is retrieved, what is the recommended method for applying custom CSS? Should I create a dedicated CSS file for my module, or are there predefined styles I should leverage to maintain consistency with the rest of the MagicMirror interface?

      Thanks in advance for your help and assistance.

      posted in General Discussion
      E
      Elizashahh