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

MMM-WorldTides, no output on screen

Scheduled Pinned Locked Moved Troubleshooting
14 Posts 3 Posters 7.5k 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.
  • P Offline
    pjkoeleman @yawns
    last edited by Oct 2, 2017, 5:57 PM

    @yawns
    Thanks for your time.
    When I can help (test) give a call .

    1 Reply Last reply Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer @yawns
      last edited by Mykle1 Oct 3, 2017, 10:44 AM Oct 3, 2017, 12:58 AM

      @yawns said in MMM-WorldTides, no output on screen:

      I will try to take a look into this tomorrow, but I cannot promise.

      XMLHttpRequest cannot load http://www.worldtides.info/api?extremes&lat=40.543&lon=-74.140&start=1506916800&key=da40ad48-3c4f-4fd7-b50a-2138e8866e2b. Redirect from 'http://www.worldtides.info/api?extremes&lat=40.543&lon=-74.140&start=1506916800&key=da40ad48-3c4f-4fd7-b50a-2138e8866e2b' to 'https://www.worldtides.info/api?extremes&lat=40.543&lon=-74.140&start=1506916800&key=123456789 has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://0.0.0.0:8080' is therefore not allowed access.
      

      Create a working config
      How to add modules

      P 1 Reply Last reply Oct 3, 2017, 8:03 AM Reply Quote 1
      • P Offline
        pjkoeleman @Mykle1
        last edited by Oct 3, 2017, 8:03 AM

        @Mykle1
        I would highly appreciate it.

        M 1 Reply Last reply Oct 3, 2017, 10:56 AM Reply Quote 0
        • M Offline
          Mykle1 Project Sponsor Module Developer @pjkoeleman
          last edited by Oct 3, 2017, 10:56 AM

          @pjkoeleman said in MMM-WorldTides, no output on screen:

          I would highly appreciate it.

          What? haha That post was directed to yawns. I thought I would give him a headsup on the error.

          However, tell me what info you are looking for regarding the tides. Do you simply want the current day’s high and low tides with the times they occur? I could try and put something together for you if I have the time. Then yawns can look at his module when he has the time.

          Create a working config
          How to add modules

          P 1 Reply Last reply Oct 3, 2017, 12:26 PM Reply Quote 1
          • P Offline
            pjkoeleman @Mykle1
            last edited by Oct 3, 2017, 12:26 PM

            @Mykle1 said in MMM-WorldTides, no output on screen:

            However, tell me what info you are looking for regarding the tides. Do you simply want the current day’s high and low tides with the times they occur?

            I’am living near the coast and often go for a walk along the beach. It’s handy to now when it’s high or low tides, especially if I want to photograph. But I have patience, do not hurry, just worry that I do not get it working.

            1 Reply Last reply Reply Quote 0
            • P Offline
              pjkoeleman
              last edited by Oct 3, 2017, 1:50 PM

              @pjkoeleman said in MMM-WorldTides, no output on screen:

              http://www.worldtides.info/api?extremes&lat=52.212&lon=4.399&lenght=2592000000&key=

              @yawns and @Mykle1,

              I found the problem, yeah !!!
              The apiBase URL has to change from

              apiBase: "http://worldtides.info/api"
              

              to

              apiBase: "https://worldtides.info/api"
              
              Y 1 Reply Last reply Oct 4, 2017, 1:23 PM Reply Quote 1
              • Y Offline
                yawns Moderator @pjkoeleman
                last edited by Oct 4, 2017, 1:23 PM

                @pjkoeleman
                Yep, you are right. However you cannot simply replace the apibase, do you? I guess I have to change the module to use request() to allow access to https and to avoid no-origin replies.

                P 1 Reply Last reply Oct 5, 2017, 7:58 AM Reply Quote 0
                • P Offline
                  pjkoeleman @yawns
                  last edited by Oct 5, 2017, 7:58 AM

                  @yawns said in MMM-WorldTides, no output on screen:

                  Yep, you are right. However you cannot simply replace the apibase, do you? I guess I have to change the module to use request() to allow access to https and to avoid no-origin replies.

                  I replaced the apibase in the file MMM-WorldTides.js as discribed above (line 29). So I think you should update the module with this.
                  I will be looking in to your code to make some changes in the layout off the out put, so when you are interested let me now.

                  1 Reply Last reply Reply Quote 1
                  • Y Offline
                    yawns Moderator
                    last edited by Oct 5, 2017, 10:30 AM

                    I received a pull request on github which replaced the apiBase. I did not know the standard XMLHttpRequest() can handle https as well. You should be able to git pull on your device to update the version.
                    Sure, play around with it and present it. WorldTides was my first module, there is a lot of space for improvement.

                    M 2 Replies Last reply Oct 5, 2017, 7:36 PM Reply Quote 1
                    • M Offline
                      Mykle1 Project Sponsor Module Developer @yawns
                      last edited by Mykle1 Oct 5, 2017, 7:42 PM Oct 5, 2017, 7:36 PM

                      @pjkoeleman

                      It’s handy to now when it’s high or low tides

                      @yawns said in MMM-WorldTides, no output on screen:

                      Sure, play around with it and present it.

                      As per conversations with you both, here is my approach to a tide module, using the same API as the WorldTides module.

                      @yawns - Thanks for your permission to attempt another tide module. :^)

                      @pjkoeleman - Here is what I’ve done for you so far. It rotates through the next 48 hours of tides with day, date and times, tide height variance, location name and the actual coordinates of the tide station being used by the module. Tide height variance can be in feet(ft) or meters(m). The API chooses the closest tide station to the latitude and longitude you enter in the config.

                      If you prefer a static list of tides then please let me know and I’ll see what I can do.

                      Here’s 2 screenshots of WorldTides with SimpleTides underneath. They look pretty good together. Obviously, you can’t see the rotation in a picture, but you get the idea.

                      0_1507232171426_11.JPG 0_1507232188983_22.JPG

                      Create a working config
                      How to add modules

                      1 Reply Last reply Reply Quote 1
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        7/14
                        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