Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    MMM-WeatherBackground

    Utilities
    9
    42
    8495
    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.
    • Sean
      Sean Module Developer @richland007 last edited by

      @richland007
      I’ll reply to u next monday.

      1 Reply Last reply Reply Quote 1
      • Sean
        Sean Module Developer @richland007 last edited by

        @richland007
        MMM-WeatherBackground will display photos in ANYWHERE you appoint.
        Maybe you’ve been appointing .fullscreen.below as targetDOM, so, it shows photos on fullscreen_below - where is shared with all pages of screen globally.

        So, here is a simple(?) trick.

        I made a dummy module for doing nothing but just existing.
        https://github.com/eouia/MMM-Dummy
        Install that, and modify configuration like this.

        {
          module:"MMM-Dummy",
          position: "fullscreen_below",
          config: {
            width:"100vw",
            height: "100vh",
          }
        },
        {
          module: "MMM-WeatherBackground",
          config: {
            targetDOM: ".MMM-Dummy"
          }
        },
        

        Now MMM-Dummy will contain weatherphotos as its background image. You can show/hide this module with any page controlling modules.(MMM-Pages? MMM-Caroulsel?)

        richland007 1 Reply Last reply Reply Quote 4
        • richland007
          richland007 @Sean last edited by

          @sean Thank you very much it worked like a charm …you guys that know how to code are cool 🙂
          thanks again

          cowboysdude 1 Reply Last reply Reply Quote 1
          • cowboysdude
            cowboysdude Project Sponsor Module Developer @richland007 last edited by

            @richland007 Yes they are…I play with code…THEY know it.

            Mykle1 1 Reply Last reply Reply Quote 2
            • Mykle1
              Mykle1 Project Sponsor Module Developer @cowboysdude last edited by

              @cowboysdude said in MMM-WeatherBackground:

              I play with code…THEY know it.

              Don’t sell yourself short, bro. There hasn’t been a module I’ve broken that you haven’t been able to fix. I tip my hat to you.

              cowboysdude 1 Reply Last reply Reply Quote 1
              • cowboysdude
                cowboysdude Project Sponsor Module Developer @Mykle1 last edited by

                @mykle1 yeah well…

                1 Reply Last reply Reply Quote 0
                • Sean
                  Sean Module Developer last edited by Sean

                  I’ve added configuration sample for NOAA3.
                  I like @cowboysdude’s forked version, but it’s images are static.
                  I always love random. That is why I build this module.
                  Fortunately, since @cowboysdude updated his NOAA3, now I can suggest a configuration for my original to use with NOAA3

                  {
                    //disabled:true,
                    module: "MMM-WeatherBackground",
                    config: {
                      targetDOM: ".MMM-Dummy", // < -- change to where you want to display
                      notification: "WEATHER",
                      payloadConverter:(payload)=>{
                        var n = (moment().isAfter(moment(payload.sunset))) ? "night" : "day"
                        var iconMap = {
                          "tstorms": "thunderstorm",
                          "chancesnow": "snow"
                        }
                        var ret = (payload.icon in iconMap) ? iconMap[payload.icon] : payload.icon
                        return ret + " " + n
                      }
                    }
                  },
                  
                  
                  1 Reply Last reply Reply Quote 1
                  • BKeyport
                    BKeyport Module Developer last edited by

                    This module is supposed to be weather images, yet, I have seen exactly one image that’s weather related.

                    Most of the time, it’s keyboards, computer related stuff, people, etc.

                    Can I restrict the pictures?

                    Sean 2 Replies Last reply Reply Quote 0
                    • Sean
                      Sean Module Developer @BKeyport last edited by

                      @bkeyport
                      Frankly, it is not so easy, because images are the result of searching keywords in unslpash.
                      Ideally, https://source.unsplash.com/featured/?clouds should show the clouds - weather related image. But in unsplash, many images - not related with weather itself - might have that name “clouds” because, just photographer named as it.
                      I regard it as a funny random stuffs - not weather itself but something like mood or feeling.
                      You can adjust obvious keywords in payloadConverter to clearer ones. By example, In above configuration, I change “tstorms” => “thunderstorm”.

                      Or if you are using MMM-NOAA3, Try cowboysdude’s forked version.(https://github.com/cowboysdude/MMM-WeatherBackground).
                      Instead getting image from unsplash, it serves prepared static image.

                      1 Reply Last reply Reply Quote 1
                      • cowboysdude
                        cowboysdude Project Sponsor Module Developer last edited by

                        It’s a great module!! Yes it’s random pictures but it’s still VERY cool because in reality the pictures returned are usually really good!!!

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 4 / 5
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy