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-EnvCanada stopped working ...

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    27 Posts 9 Posters 1.8k Views 9 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 @sunsetrider
      last edited by

      @sunsetrider right. just changing apiVersion back to 3.0 isn’t all that is required…
      the endpoints changed, and you now need lat and lon,
      and the header location has to be added manually…

      api 3.0 requires a credit card , and provides 1000 uncharged api request per day.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • crazylegsC Offline
        crazylegs @charlesf
        last edited by crazylegs

        @charlesf I took a quick look at your solution and happy to hear that it works! I agree that being able to preserve all the XML parsing is definitely the way to go. To be honest, I was assuming that your approach (parsing the correct file out of the directory listing) was going to be a massive PITA, but I think you did a very nice job! Congrats!

        And if you don’t mind, I hope to lean on your solution to make updates to the envCanada provider code when I get a chance :)

        To anyone using the envCanada provider in the default Weather module: I’m the original author of the envCanada provider. I have been traveling and unable to make corrections to the code, but I do hope to get it all working sometime in August (the earlier the better).

        charlesfC 1 Reply Last reply Reply Quote 0
        • charlesfC Offline
          charlesf @crazylegs
          last edited by

          @crazylegs Thanks. And by all means use as you see fit. I borrowed heavily from your code when I wrote my module 2 years ago.

          Perhaps you can educate me: when I fetch the xml file the async process seems to wait till it is done and then the data is available. But if I use the same steps to fetch the directory list, the calling function receives a pending promise. That’s why I implemented the fetching of the xml file within what is effectively a call back - it didn’t work otherwise, but I can’t see what is different between the two cases. But as I said earlier, I don’t know much about this environment - I am am old assembler/C/C++/C# coder from the mists of time.

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

            @charlesf is the function for the directory list marked async?? if so, then you could await it

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil yes, and that is how I started, but it didn’t work.

              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 3
              • 2 / 3
              • 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