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

Struggling with Weather... module

Scheduled Pinned Locked Moved Solved Troubleshooting
34 Posts 5 Posters 7.9k Views 6 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.
  • D Offline
    D3dl3g @sdetweil
    last edited by D3dl3g Jun 29, 2022, 1:34 PM Jun 29, 2022, 1:32 PM

    @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 Jun 29, 2022, 2:32 PM Reply Quote 0
    • S Offline
      sdetweil @D3dl3g
      last edited by Jun 29, 2022, 2:32 PM

      @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

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • D Offline
        D3dl3g
        last edited by D3dl3g Jun 29, 2022, 3:56 PM Jun 29, 2022, 3:54 PM

        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

        K 1 Reply Last reply Jun 29, 2022, 8:53 PM Reply Quote 0
        • K Offline
          karsten13 @D3dl3g
          last edited by Jun 29, 2022, 8:53 PM

          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 Jun 29, 2022, 9:52 PM Reply Quote 0
          • S Offline
            sdetweil @karsten13
            last edited by Jun 29, 2022, 9:52 PM

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

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            K 1 Reply Last reply Jun 29, 2022, 9:53 PM Reply Quote 0
            • K Offline
              karsten13 @sdetweil
              last edited by Jun 29, 2022, 9:53 PM

              @sdetweil

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

              S D 3 Replies Last reply Jun 29, 2022, 9:55 PM Reply Quote 0
              • S Offline
                sdetweil @karsten13
                last edited by Jun 29, 2022, 9:55 PM

                @karsten13 I just copy pasted and it worked.

                weird

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • D Offline
                  D3dl3g @karsten13
                  last edited by Jun 29, 2022, 10:38 PM

                  @karsten13

                  i too am getting this… showing me some 80+miles SEE of my actual location

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    D3dl3g @karsten13
                    last edited by D3dl3g Jun 30, 2022, 2:47 PM Jun 30, 2022, 2:00 PM

                    @karsten13
                    also… replace the hash symbols with various numbers… im not posting my exact Lat/Long for obvious reasons…

                    make sure ur doing

                    lat:
                    

                    and

                    lon:
                    

                    i had it set to lat & lon(G) which is incorrect. hence why it was 80+miles, way tf over there!

                    quote marks or none surronding the numbers doesnt appear to matter, for me at least

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      D3dl3g
                      last edited by D3dl3g Jun 30, 2022, 3:12 PM Jun 30, 2022, 3:06 PM

                      This “issue” is fixed.

                      Advised by Sam, I ran these 2 commands to find modified files that differ from a “clean install/default” of MM.

                      git status
                      git diff
                      

                      Any that varied… I ran:

                      git checkout <dir-tree>/file.extension
                      

                      Rebuilt my config.js and found that apiBase HAS to be commented out.

                      On reflection DO NOT CHANGE ANY FILE aside from “config.js”
                      I had 3 causes for this issue.

                      • (edit) i had longitude set in config.js to “long:”… it should be “lon:” and the lat/lon do not have to be surrounded by any quote marks.
                      • I’d modified other *.js files, that didn’t need to be modified.
                      • the “apiBase” argument listed in (MagicMirror Documentation > Modules > Weather Module > Configuration Options) was, in my case, not “REQUIRED”.
                        c82b60b1-1dd9-43bb-a09a-94a3009810bb-image.png

                      @sdetweil … Sam, publically, I cant thank you enough for your help with this. Sorry for being a n00b, your insight and help was invaluable, and you taught me some stuff, which is great!!

                      S 1 Reply Last reply Jun 30, 2022, 3:16 PM Reply Quote 2
                      • 1
                      • 2
                      • 3
                      • 4
                      • 3 / 4
                      3 / 4
                      • First post
                        28/34
                        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