MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. aaronaxvig
    3. Best
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 9
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Open weather Api 3.0

      I found this thread when my usage of the openweathermap.org API stopped working a few days ago. I guess they actually did cut off the API 2.5 users now? Anyways, I have it working using the 3.0 API now. A few comments to help anyone:

      • I did add my credit card info on my account but I am not 100% sure this was necessary.
      • I am using the same API key as before.
      • The locationID value does not appear to work any more. So I have replaced the locationID config lines with lat and lon lines.
      • The timezone was getting appended to the header so I had to start setting appendLocationNameToHeader to false.

      Before example:

      {
          module: "weather",
          position: "top_right",
          header: "Hollywood, FL",
          config: {
              weatherProvider: "openweathermap",
              type: "current",
              location: "Hollywood, FL",
              locationID: "4158928",
              apiKey: "xxxxxxxxxxxxxxxxxxxxxx",
              roundTemp: true
          }
      },
      

      After example:

      {
          module: "weather",
          position: "top_left",
          header: "Mandan, ND",
          config: {
              weatherProvider: "openweathermap",
              type: "current",
              lat: "46.8258",
              lon: "-100.88875",
              apiKey: "xxxxxxxxxxxxxxxxxxxxxx",
              apiVersion: "3.0",
              appendLocationNameToHeader: false,
              weatherEndpoint: "/onecall",
              roundTemp: true
          }
      },
      
      posted in Utilities
      A
      aaronaxvig
    • Windows 10 setup (including VS Code debugging)

      I have an Intel Compute Stick which runs Windows 10 that I am planning to use for my mirror. Getting Magic Mirror running was really easy as the manual steps outlined in the README.md file are mostly cross-platform.

      But I wanted to create modules and debug them using VS Code. There are a couple hurdles there.

      1. You can launch Magic Mirror using VS Code. You will have to create a launch.json file as outlined here. Make sure to read the comments as they are helpful. I will put my final file in a reply to this.
      2. You may run into an exception: TypeError: Cannot read property 'name' of undefined in MagicMirror\modules\default\updatenotification\node_helper.js:35:43. The root cause of this is some Error: spawn git ENOENT messages that you may see further up in the log. I think this is an effort to check GitHub for updates…anyways it seems to do something with git and this error means it can’t find git in your path. (Basically if you opened a command prompt and typed git it would tell you that it is an unrecognized command.) Install Git from git-scm.com and that should solve it (must restart VS Code though). The installer has an option about the Windows path–choose to add Git to the path. I had GitHub Desktop installed and it apparently uses its own portable version of Git which it doesn’t add to the path.

      These should get you a good running setup. Debugging works for the main code base but doesn’t seem to work for modules. That is next on my list.

      posted in Tutorials
      A
      aaronaxvig
    • RE: Modify the Gap/Margins

      Replying to an old post…I know. But it shows up in search engine results.

      One way to easily/cleanly make this adjustment is included in the sample custom.css. Below is an example with the relevant parts only, and adjustments to my preferences (were all 60px values before).

      :root {
        --gap-body-top: 10px;
        --gap-body-right: 20px;
        --gap-body-bottom: 10px;
        --gap-body-left: 20px;
      }
      
      posted in Development
      A
      aaronaxvig
    • RE: Open weather Api 3.0

      @sdetweil You’re welcome! I saw afterwards that there is another thread with similar info but this is the one the search engine led me to.

      After a few days of use I can see on the OpenWeatherMap.org website Billing section that I am running somewhere around 600 API calls per day. This is with four weather modules in place (for four different locations). So about 150 calls per day per module. The default updateInterval value is 10 minutes which would be 144 per day in theory. I’m going to bump my non-local ones to a 30 minute setting (careful to specify milliseconds i.e. 1,800,000 but without commas of course).

      posted in Utilities
      A
      aaronaxvig
    • 1 / 1