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.

    Module Refresh at Midnight

    Scheduled Pinned Locked Moved Development
    7 Posts 2 Posters 1.4k 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.
    • S Offline
      sdetweil @jmwyds
      last edited by

      @jmwyds in your getDom, you only work off the first data item/word
      item[0]

      dataNotification != null){
      			var wordd = this.dataNotification.rss.channel.item[0].title;
      			var summ = this.dataNotification.rss.channel.item[0].summary.toString();
      			var shortDef = this.dataNotification.rss.channel.item[0].shortdef.toString();
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jmwyds @sdetweil
        last edited by

        @sdetweil Correct, yes. Merriam Webster by default supplies a list of 5 or so Words of the Day. By grabbing the first element, I am grabbing the first word with it’s definition, sentence, part of speech, etc.
        Do you see me doing something else there?

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @jmwyds
          last edited by

          @jmwyds well, u said it didn’t work, with the current timing.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            jmwyds @sdetweil
            last edited by

            @sdetweil Ah, I’m sorry about that Sam. The module does work! The only thing that doesn’t work is that it doesn’t refresh itself at midnight like I want it to. If I do a restart of the mirror it pulls the word and it’s properties correctly. So I was hoping that you or someone else might have some expertise on that update interval aspect

            Thanks!
            Jack

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @jmwyds
              last edited by

              @jmwyds so, use the moment() class to calculate the number of milliseconds until u want the next word, and use that as the timer interval, then sendSocketNotification to the node_helper like u do at start time, to get the next word.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @sdetweil
                last edited by sdetweil

                @jmwyds or
                millis in a day is

                 24*60*60*1000
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                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