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

    oemel09

    @oemel09

    9
    Reputation
    89
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    oemel09 Unfollow Follow

    Best posts made by oemel09

    • RE: weatherforecast showing only two days.

      Had the same issue after the update.
      The problem is, that the weatherforecast first checks the paid version of the API to get full day forecasts (https://api.openweathermap.org/data/2.5/forecast/daily?id=xxx&cnt=7&units=metric&lang=de&APPID=xxx)

      This results in a 401 for me because I’m using a free API token.

      Next the weatherforecast module falls back using the 5 day / 3 hour Forecast API by using the same cnt value (https://api.openweathermap.org/data/2.5/forecast?id=xxx&cnt=7&units=metric&lang=de&APPID=xxx). Here the value 7 for cnt returns 7 entries, that’s why there is only a two day forecast.

      I’ll try to write a fix.
      In the meantime as a quick fix you can change line 297 of weatherforecast.js from:

      params += "&cnt=" + (this.config.maxNumberOfDays < 1 || this.config.maxNumberOfDays > 17 ? 7 : this.config.maxNumberOfDays);
      

      to

      params += "&cnt=" + (this.config.maxNumberOfDays < 1 || this.config.maxNumberOfDays > 5 ? 40 : this.config.maxNumberOfDays * 8);
      

      Remeber the fallback API provides only a 5 day forecast, that’s why maxNumberOfDays is limited to 5.

      posted in Troubleshooting
      O
      oemel09

    Latest posts made by oemel09

    • RE: weatherforecast showing only two days.

      Had the same issue after the update.
      The problem is, that the weatherforecast first checks the paid version of the API to get full day forecasts (https://api.openweathermap.org/data/2.5/forecast/daily?id=xxx&cnt=7&units=metric&lang=de&APPID=xxx)

      This results in a 401 for me because I’m using a free API token.

      Next the weatherforecast module falls back using the 5 day / 3 hour Forecast API by using the same cnt value (https://api.openweathermap.org/data/2.5/forecast?id=xxx&cnt=7&units=metric&lang=de&APPID=xxx). Here the value 7 for cnt returns 7 entries, that’s why there is only a two day forecast.

      I’ll try to write a fix.
      In the meantime as a quick fix you can change line 297 of weatherforecast.js from:

      params += "&cnt=" + (this.config.maxNumberOfDays < 1 || this.config.maxNumberOfDays > 17 ? 7 : this.config.maxNumberOfDays);
      

      to

      params += "&cnt=" + (this.config.maxNumberOfDays < 1 || this.config.maxNumberOfDays > 5 ? 40 : this.config.maxNumberOfDays * 8);
      

      Remeber the fallback API provides only a 5 day forecast, that’s why maxNumberOfDays is limited to 5.

      posted in Troubleshooting
      O
      oemel09
    • MMM-DailyPower

      Description:

      Display the daily bible verse from DailyPower.

      Screenshots:

      Screenshot

      Download:

      [card:oemel09/MMM-DailyPower]


      Version 1.0

      • First release
      posted in Education
      O
      oemel09