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.

    Weather based on current location (while traveling)

    Scheduled Pinned Locked Moved Requests
    7 Posts 2 Posters 727 Views 2 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.
    • donblancoD Offline
      donblanco
      last edited by

      We are currently traveling around the US. I need for the current weather and weather forecast to change every time we change locations. Currently this would involve manually changing the station ID and name in four different places in config.js.

      Any ideas on how to automate this?

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @donblanco
        last edited by

        @donblanco you could create 4 variables at the top of config.js

        var key1= ‘… ’
        var key2=’… ’
        var location_name=‘… ’
        var our_location_id=’… ’

        then use those variable names in the module definitions

        location_id: our_location_id,

        so u only have to change it once, in one isolated place

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • donblancoD Offline
          donblanco
          last edited by

          but that’s not automated. I guess I was hoping for something like when you go to a weather web site and it automatically uses your location for the current obs and forecast…

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @donblanco
            last edited by

            @donblanco none of these apps consider that you move. so they all take fixed locations

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            donblancoD 1 Reply Last reply Reply Quote 1
            • donblancoD Offline
              donblanco @sdetweil
              last edited by

              @sdetweil yeah, guess I’ll have to find something else or roll my own, maybe w/ an iframe solution? shrug

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @donblanco
                last edited by sdetweil

                @donblanco you could write some script that could figure it out, and update the config as mm starts

                like this for lat/long

                https://www.google.com/amp/s/www.tecmint.com/find-linux-server-geographic-location/amp/

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                donblancoD 1 Reply Last reply Reply Quote 0
                • donblancoD Offline
                  donblanco @sdetweil
                  last edited by

                  @sdetweil I’m still going through various widgets. As it turns out, my location based on IP is highly inaccurate. My AT&T cell signal shows up as an IP out of Seattle. So I’ll need GPS info, but I don’t think my wireless device has that built in, just my phones.

                  Oh well, something to work on, better than being bored lol

                  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