MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.

    SOLVED Struggling with Weather... module

    Troubleshooting
    5
    34
    311
    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.
    • D
      D3dl3g @sdetweil last edited by D3dl3g

      @sdetweil,

      apiBase commented out in config.
      c0056a38-65e2-49ff-a3d4-5324c5cca865-image.png

      server restart, and browser log request, showing loaded weather modules
      b10c9006-1351-4cfe-865b-26def301bf3b-image.png
      i still have “loading” in module location

      looking at source gives me the impression that i need to go and look at 2 more .js files. Previously i have been working with /default/weather/ukmetofficedatahub.js and /MagicMirror/config/config.js

      ill see if thes hold any info:
      /root/MagicMirror/modules/default/weather/weatherproviders.js
      (Edit: //weather provider properties: null, modified to:
      8bca5c6c-09d9-4987-8940-0233b5e827c7-image.png )

      /root/MagicMirror/modules/default/weather/weather.js
      (Edit: this file is set to “openweathermap”, changing to “ukmetofficedatahub”

      a2763dbe-9a57-47bc-b036-505bd38e8e4e-image.png )

      server restart, no effect noted 😞

      1 Reply Last reply Reply Quote 0
      • D
        D3dl3g last edited by D3dl3g

        @Kayababe @sdetweil

        openweathermap works… albiet the location its suggested is 3 miles down the road. (ukmetoffice has data for 2 streets away)

        1625ac6e-c4f6-43ec-a86a-9c6cb7a05d31-image.png

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

          @D3dl3g you ONLY setup from config.js

          please try with NO apibase set

          Sam

          Create a working config
          How to add modules

          D 1 Reply Last reply Reply Quote 0
          • D
            D3dl3g @sdetweil last edited by D3dl3g

            @sdetweil

            weather.js and weatherprovider.js i have set back to defaults.

            i have set config.js as requested

              weatherProvider: 'ukmetofficedatahub',
              lat: "52.###############",
              long: "-1.###############",
            //apiBase: 'https://api-metoffice.apiconnect.ibmcloud.com/v0/forecasts/point/daily/',
              apiKey: 'e52#############################',
              apiSecret: 'd3a#############################',
            

            the result:-
            7eba740f-a745-4800-a364-6d8a94be739a-image.png

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

              @D3dl3g send me your API key… config from config.js via email or direct message so I can debug

              did u look in the browser messages?

              my email is my same userid at gmail

              Sam

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • D
                D3dl3g last edited by D3dl3g

                Just to update the forum, as to what happened behind closed doors

                Sam kindly tested my code, and it worked for him.

                I am recieving browser errors (previously requested but i wasnt looking in the right bit of the browser window)… he is not

                Issues Tab
                a6d930c5-9a8d-4954-b85f-0a690ebf979a-image.png

                Console Tab
                28bb215d-8d84-42ca-90bd-f32d898fa203-image.png
                the last 5 entries here will reoccur, im guessing at every “retry” for weather info

                attempted to use useCorsProxy: true to no avail

                Sam kindly posted into git hub issues.
                https://github.com/MichMich/MagicMirror/issues/271

                karsten13 1 Reply Last reply Reply Quote 0
                • karsten13
                  karsten13 @D3dl3g last edited by

                  tested ukmetofficehub and it works out of the box (without setting the useCorsProxy flag).

                  Looking into the provided config

                    weatherProvider: 'ukmetofficedatahub',
                    lat: "52.###############",
                    long: "-1.###############",
                  

                  which is messed up. It has to be:

                    weatherProvider: 'ukmetofficedatahub',
                    lat: 52.###############,
                    lon: -1.###############,
                  
                  S 1 Reply Last reply Reply Quote 0
                  • S
                    sdetweil @karsten13 last edited by

                    @karsten13 I tested w those in quotes, and it worked ok

                    Sam

                    Create a working config
                    How to add modules

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

                      @sdetweil

                      did only test without, but there is another error lon vs. long …

                      S D 3 Replies Last reply Reply Quote 0
                      • S
                        sdetweil @karsten13 last edited by

                        @karsten13 I just copy pasted and it worked.

                        weird

                        Sam

                        Create a working config
                        How to add modules

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 3 / 4
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy