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-NOAAAlerts

    Scheduled Pinned Locked Moved Utilities
    3 Posts 3 Posters 707 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.
    • mattkabM Offline
      mattkab
      last edited by mattkab

      I built this module more by need than anything else – the Seattle area where I live has been hit by some relatively severe weather the past few days, that have caused real problems for the area. While I wasn’t caught off-guard this time, I realized that the MM weather modules I had didn’t emphasize local warnings, alerts, and weather watches. So I built a module expressly for solving that problem:

      MMM-NOAAAlerts
      Special Weather Statement:
      Warning.png

      Flood Warning:
      Flood.png

      USING THE MODULE

      Github Link

      Standard installation:

      git clone https://github.com/mmtsweng/MMM-NOAAAlerts
      cd MMM-NOAAAlerts
      npm install 
      

      Basic configuration:

      {
        module: "MMM-NOAAAlerts",
        position: "top_bar",
        config: {
            userAgent: "Magic Mirror ([email protected])" //Custom contact information
            APIURL: "https://api.weather.gov/alerts/active?point=47.593,-122.333", //See below for other options
            debug: false, // [Optional] Print extended debugging logs to the console
            rotateInterval: 20*1000, // [Optional] How often to switch to the next alert/alarm
            updateInterval: 30*60*1000, // [Optional] How often to ping the API for more data
            }
      },
      

      NOAA provides a free API to retrieve weather alerts, which this API uses. There is no registration required.
      There are multiple ways to set the forecast area, and NOAA provides through documentation if you need extensive help. But the basics are

      • By State: https://api.weather.gov/alerts/active?area={state}
      • By Zone: https://api.weather.gov/alerts/active?zone={zone}
      • By Lat/Long: https://api.weather.gov/points/{latitude},{longitude}
      • By Grid: https://api.weather.gov/gridpoints/{office}/{grid X},{grid Y}/forecast

      NOAA requires that a User-Agent header be provided. Please set your own custom agent in the config with unique contact information (the suggested header is: User-Agent: (myweatherapp.com, [email protected]) , so following that format makes sense.

      This is still very much a work in progress. I have spent very little time styling it, and I haven’t even put together the README file yet (I’m going to steal this post, actually!). But I have had it running for the past 2 days with no major issues. So far I’ve only tested it in the top bar section. If anyone else wants to try it and provide feedback I’ll be actively improving it.

      KristjanESPERANTOK 1 Reply Last reply Reply Quote 2
      • M Offline
        mmmallday
        last edited by

        Working for me. Thanks!

        1 Reply Last reply Reply Quote 0
        • KristjanESPERANTOK Online
          KristjanESPERANTO Module Developer @mattkab
          last edited by

          @mattkab Please add it to the module list :-)

          1 Reply Last reply Reply Quote 1
          • 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
            OSZAR »