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

MMM-WeatherBackground question

Scheduled Pinned Locked Moved Solved Troubleshooting
7 Posts 3 Posters 1.9k Views 3 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.
  • L Offline
    lkthomas
    last edited by Jan 10, 2019, 8:19 AM

    if I am using currentweather (openweathermap) as the source, what keywords should I use on Collections?

    ? 1 Reply Last reply Jan 10, 2019, 9:05 AM Reply Quote 0
    • ? Offline
      A Former User @lkthomas
      last edited by Jan 10, 2019, 9:05 AM

      @lkthomas
      You can use these as keywords.

      sunny, clouds, cloudy, windy, heavy rain, rain, thunderstorm, snow, fog, clear night, cloudy night, night rain, night thunderstorm, night snow, windy night
      
      M 1 Reply Last reply Apr 10, 2019, 9:47 PM Reply Quote 0
      • ? Offline
        A Former User
        last edited by A Former User Jan 10, 2019, 10:35 AM Jan 10, 2019, 10:35 AM

        @lkthomas
        And you can adjust keywords also by configuration

        sources: {
          "currentweather": {
            notification: "CURRENTWEATHER_DATA",
            payloadConverter: (payload)=> {
              var iconMap = {
                "01d": "sunny",
                "02d": "clouds",
                "03d": "cloudy",
                "04d": "windy",
                "09d": "heavy rain",
                "10d": "rain",
                "11d": "thunderstorm",
                "13d": "snow",
                "50d": "fog",
                "01n": "clear night",
                "02n": "cloudy night",
                "03n": "cloudy night",
                "04n": "cloudy night",
                "09n": "night rain",
                "10n": "night rain",
                "11n": "night thunderstorm",
                "13n": "night snow",
                "50n": "windy night"
              }
              return iconMap[payload.data.weather[0].icon]
            },
          ...
        
        1 Reply Last reply Reply Quote 0
        • M Offline
          mohace @Guest
          last edited by mohace Apr 10, 2019, 10:12 PM Apr 10, 2019, 9:47 PM

          @Sean said in MMM-WeatherBackground question:

          @lkthomas
          You can use these as keywords.

          sunny, clouds, cloudy, windy, heavy rain, rain, thunderstorm, snow, fog, clear night, cloudy night, night rain, night thunderstorm, night snow, windy night
          

          Hi Sean, your module is really very nice, thank You.
          I was working with collections and I couldn’t make module loads my ones, despite your instructions in the 2 previous posts.
          So, I took a look to console log and see that You url always appends in the url the weather conditions. When condititions carry on “-” between words, your url also carry on that sign.
          I meant, when I wrote in config.js

          collections: {
          				  "clear-day": "4613658"
          				  "sunny": "4613658",
          				  "clouds": "4557538",
          				  "cloudy": "4557538",
          				  "cloudy night": "4613565",
          				  "partly cloudy day": "4618566",
          				  "partly cloudy night": "4618856",
          				  "windy": "4613696",
          				  "wind": "4613696",
          				  "heavy rain": "4613730",
          				  "rain": "4613732",
          				  "night rain": "4613625",
          				  "clear night": "4613623",
          				  "fog": "4618886",
          				  "thunderstorm": "4613853",
          				  "tornado": "4619143",
          				  /*"hail": "",
          				  "i-rain": "",
          				  "i-wind": "",
          				  "sleet": "",
          				  "snow": "",*/
          

          featured photos was loaded anyway.
          But when I did set collections in this way:

          				  "clear-day": "4613658",  
          				  "sunny": "4613658",
          				  "clouds": "4557538",
          				  "cloudy": "4557538",
          				  "cloudy-night": "4613565",
          				  "partly-cloudy-day": "4618566",
          				  "partly-cloudy-night": "4618856",
          				  "windy": "4613696",
          				  "wind": "4613696",
          				  "heavy-rain": "4613730",
          				  "rain": "4613732",
          				  "night-rain": "4613625",
          				  "clear-night": "4613623",
          				  "fog": "4618886",
          				  "thunderstorm": "4613853",
          				  "tornado": "4619143",
          				  /*"hail": "",
          				  "i-rain": "",
          				  "i-wind": "",
          				  "sleet": "",
          				  "snow": "",*/
          

          photos I collected was loaded fine.
          clear-day was worked but today was a partly-cloudy-day
          Last commented conditions I don’t know what it means but snow, but in my place never goes snow.
          Collections was “collected” from unsplash people following unsplash rules, so, I think any people can use it for MagicMirror. Feel free to use it for this wonderful module. Thank you.

          Sometimes, unsplash could return mismatched images with keyword.
          

          By using mentioned collections this won’t happen.

          0_1554934214133_2019-04-10-235906_1366x768_scrot_resized.png

          0_1554934368253_2019-04-11-001048_1366x768_scrot_resized.png

          ? 1 Reply Last reply Apr 10, 2019, 10:48 PM Reply Quote 0
          • ? Offline
            A Former User @mohace
            last edited by Apr 10, 2019, 10:48 PM

            @mohace
            Which weather module are you using? Keywords depends on which weather module be used.

            1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User
              last edited by A Former User Apr 11, 2019, 6:22 AM Apr 11, 2019, 6:22 AM

              If you are using “currentweather”,
              https://github.com/MichMich/MagicMirror/blob/b508a629e8a727358f1b88e3c7df842d14669ec4/modules/default/currentweather/currentweather.js#L49-L66
              these value could be used as collection mapping.

              If you are using “DarkskyForecast”,
              https://github.com/jclarke0000/MMM-DarkSkyForecast/tree/master/icons/1c
              These icon names could be used.

              Sorry for incomplete information on repository.

              M 1 Reply Last reply Apr 11, 2019, 8:13 AM Reply Quote 0
              • M Offline
                mohace @Guest
                last edited by Apr 11, 2019, 8:13 AM

                @Sean said in MMM-WeatherBackground question:

                Sorry for incomplete information on repository.

                Don’t worry. It was just to contribute!

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