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

Scheduled Pinned Locked Moved Utilities
3 Posts 3 Posters 674 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.
  • M Offline
    mattkab
    last edited by mattkab Dec 28, 2022, 5:45 PM Dec 28, 2022, 5:42 PM

    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 (xxxxxxxxxxxx@gmail.com)" //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, contact@myweatherapp.com) , 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.

    K 1 Reply Last reply Nov 4, 2024, 1:00 PM Reply Quote 2
    • M Offline
      mmmallday
      last edited by Nov 4, 2024, 11:55 AM

      Working for me. Thanks!

      1 Reply Last reply Reply Quote 0
      • K Offline
        KristjanESPERANTO Module Developer @mattkab
        last edited by Nov 4, 2024, 1:00 PM

        @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