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

GIF update from URL with MMM-EyeCandy

Scheduled Pinned Locked Moved Troubleshooting
26 Posts 5 Posters 10.9k Views 5 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
    Mykle1 Project Sponsor Module Developer @ninjabreadman
    last edited by Mar 23, 2018, 12:30 AM

    @ninjabreadman

    Thanks again but the problem still exists. Let me explain what I’ve done so far.

    1. Added your setInterval(function().
    2. Tried to seed the url of the .gif file with a timestamp but that was rejected with a 404 error.
    3. Added a timestamp div/tag so I could check if the module was actually updating. It is.

    This url is not refreshing upon updateDom but the timestamp is.
    https://icons.wxug.com/data/weather-maps/radar/united-states/united-states-current-radar-animation.gif

    I’m lost. :-/

    0_1521765022297_3.png

    Create a working config
    How to add modules

    N 1 Reply Last reply Mar 23, 2018, 1:18 AM Reply Quote 1
    • N Offline
      ninjabreadman @Mykle1
      last edited by Mar 23, 2018, 1:18 AM

      @Mykle1 How did you seed the url with a timestamp? When I visit https://icons.wxug.com/data/weather-maps/radar/united-states/united-states-current-radar-animation.gif?1521767776, I get the image returned (not a 404).

      Problem with config or JavaScript? Copy/paste it into JSHint.
      Check out the detailed walkthroughs on install, config, modules, etc.

      M 1 Reply Last reply Mar 23, 2018, 1:32 AM Reply Quote 1
      • M Offline
        Mykle1 Project Sponsor Module Developer @ninjabreadman
        last edited by Mar 23, 2018, 1:32 AM

        @ninjabreadman

        Like this, because I need the seed to change. Feel free to tell me what I’m doing wrong. Hehe :-)

        var getTimeStamp = new Date().getTime();
        img.src = "https://icons.wxug.com/data/weather-maps/radar/united-states/united-states-current-radar-animation.gif&seed=" + getTimeStamp;
        pic.appendChild(img);
        wrapper.appendChild(pic);
        

        Create a working config
        How to add modules

        N 1 Reply Last reply Mar 23, 2018, 1:35 AM Reply Quote 1
        • N Offline
          ninjabreadman @Mykle1
          last edited by ninjabreadman Mar 23, 2018, 1:48 AM Mar 23, 2018, 1:35 AM

          @Mykle1 Yep, just needs to be a ? before the first parameter. Anything after gets appended with an &, e.g. https://icons.wxug.com/data/weather-maps/radar/united-states/united-states-current-radar-animation.gif?seed=1521767776&otherseed=4846528&page=2.

          Making your code the following:

          ... // img creation, etc
          var getTimeStamp = new Date().getTime();
          img.src = "https://icons.wxug.com/data/weather-maps/radar/united-states/united-states-current-radar-animation.gif?seed=" + getTimeStamp;
          pic.appendChild(img);
          wrapper.appendChild(pic);
          

          Problem with config or JavaScript? Copy/paste it into JSHint.
          Check out the detailed walkthroughs on install, config, modules, etc.

          M M 3 Replies Last reply Mar 23, 2018, 2:30 AM Reply Quote 2
          • M Offline
            Mykle1 Project Sponsor Module Developer @ninjabreadman
            last edited by Mar 23, 2018, 2:30 AM

            @ninjabreadman said in GIF update from URL with MMM-EyeCandy:

            Making your code the following:

            That did the trick. The .gif file is refreshing to reflect the new data when it changes.

            Thanks for the lesson. I do appreciate the help.

            Peace!

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 1
            • M Offline
              Mykle1 Project Sponsor Module Developer @JRWJR
              last edited by Mykle1 Mar 23, 2018, 2:56 AM Mar 23, 2018, 2:32 AM

              @JRWJR

              I will post the update on github shortly. Thanks to our friend, @ninjabreadman, the module now works as it should.

              EDIT:

              A git pull in the /MagicMirror/modules/MMM-EyeCandy folder will fix you up. Please take note of the changes to the config.js entry. Also, please take into account that the url you gave only updates itself about every 15 minutes.

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 1
              • J Offline
                JRWJR
                last edited by Mar 23, 2018, 5:22 PM

                Made the changes and did some testing this AM with no results.

                -Was able to pull update and verify changes in EyeCandy.js were reflected.
                -Updated config.js to reflect the example as well.
                -Tracked my radar url for time stamp over time for change and no results.

                See some commented code, do I need to uncomment as test?

                M 2 Replies Last reply Mar 23, 2018, 7:42 PM Reply Quote 0
                • M Offline
                  Mykle1 Project Sponsor Module Developer @JRWJR
                  last edited by Mar 23, 2018, 7:42 PM

                  @JRWJR said in GIF update from URL with MMM-EyeCandy:

                  Made the changes and did some testing this AM with no results.

                  WTH?

                  I’m testing it right now. I will report shortly

                  Create a working config
                  How to add modules

                  1 Reply Last reply Reply Quote 1
                  • M Offline
                    Mykle1 Project Sponsor Module Developer @JRWJR
                    last edited by Mar 23, 2018, 8:29 PM

                    @JRWJR

                    Umm, it’s working fine here. The radar from your url has updated twice in the last 42 minutes and the module reflects those changes.

                    The update interval for the module is now 2 minutes but you won’t see changes to your radar url for 15 minute periods. That’s the url, not the module. Is that what you are talking about?

                    Create a working config
                    How to add modules

                    J 1 Reply Last reply Mar 23, 2018, 9:16 PM Reply Quote 1
                    • J Offline
                      JRWJR @Mykle1
                      last edited by Mar 23, 2018, 9:16 PM

                      @Mykle1 Once issue pm2 restart mm or reboot, it will download\load gif from url and play only that loop.

                      I am going to isolate and maybe move to a new MM2 load to test. Will report back.

                      M 1 Reply Last reply Mar 23, 2018, 11:51 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        9/26
                        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