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

    Posts

    Recent Best Controversial
    • RE: Hourly Weather Forecasts???

      If you’re still looking @mrlowndes, I recently got an hourly weather forecast modification of the default weather module working. It uses the OpenWeatherMap One Call API which allows for 1 hour interval forecasts for the next 48 hours.

      Link to repo branch.

      Screenshot and example module config available in the forum post I made in Development while trying to debug it.

      posted in Requests
      L
      lost
    • RE: [DEBUG] Default Weather Module with OpenWeatherMap One Call API

      Got it working! I think I’ll just avoid dot notation from now on…

      Repo is linked below. If anyone’s looking to use this, OpenWeatherMap’s One Call API asks for latitude and longitude instead of a location or location ID. But in return, you can get not only current and daily (max 7 days) forecasts, but also hourly forecasts (max 48 hours).

      All original functionality of the module should remain intact.

      Sample Module Configurations:

      {
      	module: "weather",
      	position: "bottom_left",
      	header: "Current Forecast",
      	config: {
      		weatherProvider: "openweathermap",
      		weatherEndpoint: "/onecall",
      		type: "wDataCurrent",
      		apiKey: "OPENWEATHERMAPAPIKEY", // your OpenWeatherMap API key
      		initialLoadDelay: 0,
      		lat: 40.7128, // your latitude
      		lon: -74.0060, // your longitude
      	}
      },
      {
      	module: "weather",
      	position: "bottom_center",
      	header: "Hourly Forecast",
      	config: {
      		weatherProvider: "openweathermap",
      		weatherEndpoint: "/onecall",
      		type: "wDataHourly",
      		apiKey: "OPENWEATHERMAPAPIKEY", // your OpenWeatherMap API key
      		initialLoadDelay: 2500,
      		lat: 40.7128, // your latitude
      		lon: -74.0060, // your longitude
      		maxEntries: 32, // max 48, set by OWM One Call API
      		showPrecipitationAmount: true
      	}
      },
      {
      	module: "weather",
      	position: "bottom_right",
      	header: "Daily Forecast",
      	config: {
      		weatherProvider: "openweathermap",
      		weatherEndpoint: "/onecall",
      		type: "wDataDaily",
      		apiKey: "OPENWEATHERMAPAPIKEY", // your OpenWeatherMap API key
      		initialLoadDelay: 5000,
      		lat: 40.7128, // your latitude
      		lon: -74.0060, // your longitude
      		maxEntries: 7, // max 7, set by OWM One Call API
      		colored: true,
      		showPrecipitationAmount: true
      	}
      }
      

      Sample MagicMirror Output:
      Current, Hourly, and Daily Forecasts using the OpenWeatherMap One Call API

      Link to Branch

      Not making a pull request yet since I don’t know how the default Weather module is meant to be designed.

      posted in Development
      L
      lost
    • RE: [DEBUG] Default Weather Module with OpenWeatherMap One Call API

      minor correction, the maxNumberOfEntries config parameter is wrong, it should be maxEntries instead:

      module: "weather",
      position: "bottom_center",
      header: "Hourly Forecast",
      config: {
      	weatherProvider: "openweathermap",
      	type: "wDataHourly", // wDataCurrent and wDataDaily theoretically work but currently don't have .njk files
      	apiKey: "OPENWEATHERMAPAPIKEY", // your OpenWeatherMap API key
      	lat: 40.7128, // your latitude
      	lon: -74.0060, // your longitude
      	weatherEndpoint: "/onecall",
      	maxEntries: 12
      }
      
      posted in Development
      L
      lost
    • [DEBUG] Default Weather Module with OpenWeatherMap One Call API

      Hey all, I’m trying to get a basic implementation of OpenWeatherMap’s One Call API working inside the default Weather module, mainly so I can get hourly weather data, but I’m running into some problems.

      Link to Branch.

      Files with changes inside the modules/default/weather/ directory:

      • weather.js
      • weatherprovider.js
      • providers/openweathermap.js
      • wdatahourly.njk (renamed from wdataHourly.njk, Windows is being stupid)

      Sample Module Configuration: (all included config parameters are required for the moment)

      module: "weather",
      position: "bottom_center",
      header: "Hourly Forecast",
      config: {
      	weatherProvider: "openweathermap",
      	type: "wDataHourly", // wDataCurrent and wDataDaily theoretically work but currently don't have .njk files
      	apiKey: "OPENWEATHERMAPAPIKEY", // your OpenWeatherMap API key
      	lat: 40.7128, // your latitude
      	lon: -74.0060, // your longitude
      	weatherEndpoint: "/onecall",
      	maxNumberOfEntries: 12
      }
      

      The module just stays at “Loading …” indefinitely. The console tab in the menu that shows up after I hit Ctrl+Shift+I doesn’t report any errors or warnings, so I’m not sure what’s causing the readings to not show up.

      Any advice is appreciated since I haven’t worked too much with in the past with JavaScript, Node.js, etc. so I’m not sure what the proper way to troubleshoot problems is.


      *edit: The module seems to be loaded just fine and the weather provider gets initialized as expected. Still not sure what the problem could be.

      console log 01

      console log 02

      posted in Development openweathermap one call api default weather module hourly current daily
      L
      lost
    • RE: Raspberry Pi Current Requirements

      @sdetweil Thanks yeah, I made my post after looking at the website. With 0.4A bare plus the 0.05A for the HDMI it seemed theoretically possible, but I didn’t know how much processing power MagicMirror would take up on top of that. So I was wondering if anyone had ever taken measurements in the past.

      It doesn’t seem like it’ll work though, since in the forum post I edited in, they had a RPi3B that worked at 2.1A but a RPi3B+ that didn’t, meaning a 0.1A increase might have been enough to kick off the low power warning. It’s entirely possible the TV just had a USB that didn’t provide clean power, but regardless it seems like 0.5A won’t be enough.

      posted in Hardware
      L
      lost
    • Raspberry Pi Current Requirements

      Wasn’t able to find an answer to this searching through the forums, but does anyone have any measurements on the current draw of their Raspberry Pi while running MagicMirror?

      The original plan I had was to shove my Raspberry Pi 3 Model B (not a B+) behind a TV, hook it up via HDMI, and power it through one of the TV’s USB ports. However I recently discovered that the ports only output 5V at 0.5A which I’m worried is on the low side.

      Will this be enough to run MagicMirror? If not, how many amps does your unit usually draw?


      *edit: Nevermind, looks like this won’t be anywhere near enough power. Found this forum post saying they had a port outputting 2.1A.

      https://forum.magicmirror.builders/topic/9140/powrering-the-raspberry-pi-from-the-tv-possible-solution

      Time to buy a wall wart…

      posted in Hardware amp ampere current draw power requirements usb volt
      L
      lost
    • 1 / 1