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

Scheduled Pinned Locked Moved Utilities
31 Posts 7 Posters 9.5k Views 9 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.
  • J Offline
    JohnGalt
    last edited by Jul 22, 2023, 6:45 AM

    @Gjones93 - Would there be any reason for this module to stop working? We are currently under an excessive heat warning, but nothing displays… I also tried locating another place under a warning, but it is not triggered by that warning either. Interestingly, when I run 'pm2 logs I don’t see any reference to this module at all. Following is my config:

    { module: "MMM-WeatherAlerts",
          disabled: false,
          position: "top_left", // top_right
          header: "Weather Alerts",
          config: {
          // lat: "36.131148", //Las Vegas = 36.131148
          // lon: "-115.241867", // Las Vegas = -115.241867
          // lat: "62.037360", //Alaska - for testing
          // lon: "-163.272301", // Alaska - for testing
         lat: "36.753342", // Alfalfa County, Oklahoma - for testing
         lon: "-98.355930", // Alfalfa County, Oklahoma - for testing
         weatherAlertProvider: "openweathermapalerts",
         weatherEndpoint: "/onecall",
         type: "alerts",
         apiKey: "xxxx",
         animationSpeed: 10000, // Default = 1000 (1 second)
         alertTimeFormat: "absolute",
         alertDateFormat: "llll",
         alertDescriptionScrollDelay: 100, // Default = 85, Lower = faster alert description will move
         colored: true }, },
    
    1 Reply Last reply Reply Quote 0
    • J Offline
      JohnGalt
      last edited by Oct 18, 2024, 8:01 PM

      @Gjones93 + @sdetweil – Is there any reason why openweathermap.org would not be returning alerts with the rest of the weather data? I have seen this behavior for some weeks/months now, and wonder whether it might be connected to the new API ver 3.0.

      I currently am running both MMM-WeatherAlerts and MMM-OpenWeatherMapForecast. Both used to deliver alerts and neither currently do. I am currently under a wind warning, but no warning displays on either module. I have also found a location in Utah that is currently under a winter storm warning [22 inches of snow falling!], and set the lon/lat there in one MM instance, still with no alert output.

      I see no errors in pm2 logs, and do see various other modules showing successful fetching of weather and news - so it looks like this is not a lack of network connection.

      Since multiple modules are failing to fetch alerts, it feels like the problem is at the source - openweathermap - or the operation of its API.

      Config code for the dev instance follows. Any thoughts?

      {module: "MMM-WeatherAlerts",
            disabled: false,
            position: "top_left", // top_right
           // header: "Weather Alerts",
          config: {
           appendLocationNameToHeader: false,
           calendarClass: "calendar",
           tableClass: "small", // small
           // lat: "36.131148",  lon: "-115.241867", //Las Vegas = 36.131148
           lat: "38.549194", lon: "-111.709464", // Fish Lk, Ut - For testing
           // lat: "42.295568", lon: "-83.782281",// Ann Arbor, Mi - for testing
           // lat: "35.152661", lon: "-114.456767", // Lake Mead Rec Area - For testing
           // lat: "36.753342", lon: "-98.355930", // Alfalfa County, Oklahoma - for testing
           // lat: "40.924102", lon: "-115.122002", // Northern Nevada - for testing
           weatherAlertProvider: "openweathermapalerts",
           weatherEndpoint: "/onecall",
           type: "alerts",
           updateInterval: 10800000, // Fetch content every 3 hours
           apiKey: "xxxx", // 19 Sep 2024 Ver 3
           animationSpeed: 10000, // Default = 1000 (1 second)
           alertTimeFormat: "relative", // absolute
           alertDateFormat: "llll",
           alertDescriptionScrollDelay: 100, // Default = 85, Lower = faster alert description will move
           colored: false }, }, // true
      
      1 Reply Last reply Reply Quote 0
      • M Offline
        mmmallday
        last edited by Nov 4, 2024, 11:36 AM

        It’s not working anymore because of this https://github.com/openhab/openhab-addons/issues/16665

        Check the browser logs and you will see a 401

        J 2 Replies Last reply Nov 4, 2024, 4:40 PM Reply Quote 0
        • J Offline
          JohnGalt @mmmallday
          last edited by Nov 4, 2024, 4:40 PM

          @mmmallday – I already have a ver 3.0 API key, so if that is what you are referencing it’s covered.

          Query: When you say “It’s not there…”, what “it” are you referencing? If you mean the weather in general, it’s definitely there - pulled from openweathermap and displayed on two different modules. I see it on my Magic Mirror as we speak on the default weather module and on MMM-OpenWeatherMapForecast.

          I’m asking specifically about the alert information that gets delivered along with current conditions, forecasts, etc. This module [MMM-WeatherAlerts] should pull the weather data from openweathermap and display when [and only when] there is an active alert for the designated location. That is what is not happening… [FWIW, AFAIK other modules should also display alerts, e.g: MMM-OpenWeathermapForecast.]

          I just now confirmed that openweathermap is actually sending the data. My location had a warning but it just expired, so I used my API key and queried them for a location the National Weather Service says is under a tornado warning.

          Testing this is relatively straightforward. Go to the NWS alerts page to find a location with a current alert: https://alerts.weather.gov/search?region_type=land

          Once you have a candidate location get the lat + lon from Google Maps, then use that and your API key to get the data in the browser, e.g.: https://api.openweathermap.org/data/3.0/onecall?lat=35.0194&lon=-97.3709&exclude=minutely&units=metric&lang=en&APPID=123456789123456789

          Following is a snippet of the data retrieved (it’s at the very bottom of the page):

          alerts	
          0	
          sender_name	"NWS Norman OK"
          event	"Flood Watch"
          start	1730730660
          end	1730764800
          description	"* WHAT...Flooding caused by excessive rainfall continues to be\npossible.\n\n* WHERE...Portions of Oklahoma, including the following counties,\nAtoka, Blaine, Bryan, Caddo, Canadian, Carter, Cleveland, Coal,\nComanche, Cotton, Garfield, Garvin, Grady, Grant, Hughes, Jackson,\nJefferson, Johnston, Kay, Kingfisher, Kiowa, Lincoln, Logan, Love,\nMarshall, McClain, Murray, Noble, Oklahoma, Payne, Pontotoc,\nPottawatomie, Seminole, Stephens and Tillman and northern Texas,\nincluding the following counties, Archer, Baylor, Clay, Foard,\nHardeman, Knox, Wichita and Wilbarger.\n\n* WHEN...Until 6 PM CST this evening.\n\n* IMPACTS...Excessive runoff may result in flooding of rivers,\ncreeks, streams, and other low-lying and flood-prone locations.\nFlooding may occur in poor drainage and urban areas.\n\n* ADDITIONAL DETAILS...\n- Additional rounds of heavy rain will be possible through\nMonday, ending from west to east Monday afternoon. Many areas\nin the watch have seen 2 to 4 inches of rainfall, with some\nlocations 5 to 8 inches. The additional rain could lead to\nrapid flooding, especially in low lying and poorly drained\nareas.\n- http://www.weather.gov/safety/flood"
          tags	
          0	"Flood"
          

          So my question remains - why is it that the National Weather Service is creating alerts, onerweathermap is collecting and delivering the alerts, but the alerts aren’t being processed by our modules?

          1 Reply Last reply Reply Quote 0
          • J Offline
            JohnGalt @mmmallday
            last edited by Nov 4, 2024, 5:32 PM

            @mmmallday – Update: I now have this running. I made two changes and it now displays alerts.

            It is not clear why these changes made any difference, because when i revert the changes the module still works. I would expect that if either or both made a difference, the module behavior would have changed back…

            The first change was to remove a line I had added in the config to specify the endpoint, which is now removed

            weatherEndpoint: "/onecall",
            

            The other change was to reduce the number of decimal points in the lat and lon from the six (6) produced by Google Maps to four(4), which I recall having used in the past.

            As I said, it’s not clear what I did, but it’s working now so I will leave this module alone and go on to something else. Before I mark this as solved, I will wait a bit to see if anyone had further input as to the actual resolution.

            Thanks for your time and attention.

            M 1 Reply Last reply Nov 10, 2024, 11:58 AM Reply Quote 0
            • M Offline
              mmmallday @JohnGalt
              last edited by mmmallday Nov 10, 2024, 11:59 AM Nov 10, 2024, 11:58 AM

              @JohnGalt said in MMM-WeatherAlerts:

              @mmmallday – Update: I now have this running. I made two changes and it now displays alerts.

              It is not clear why these changes made any difference, because when i revert the changes the module still works. I would expect that if either or both made a difference, the module behavior would have changed back…

              The first change was to remove a line I had added in the config to specify the endpoint, which is now removed

              weatherEndpoint: "/onecall",
              

              The other change was to reduce the number of decimal points in the lat and lon from the six (6) produced by Google Maps to four(4), which I recall having used in the past.

              As I said, it’s not clear what I did, but it’s working now so I will leave this module alone and go on to something else. Before I mark this as solved, I will wait a bit to see if anyone had further input as to the actual resolution.

              Thanks for your time and attention.

              Cool. I moved to https://github.com/mmtsweng/MMM-NOAAAlerts No API keys needed

              J O 2 Replies Last reply Nov 12, 2024, 12:05 AM Reply Quote 0
              • J Offline
                JohnGalt @mmmallday
                last edited by Nov 12, 2024, 12:05 AM

                @mmmallday – Thanks. Good to know there are options.

                1 Reply Last reply Reply Quote 0
                • O Offline
                  OldSunGuy @mmmallday
                  last edited by Nov 12, 2024, 5:25 PM

                  @mmmallday Great find!

                  I did not see MMM-NOAAAlerts on either the 3rd Party Modules (official) or the Magicial Mirror² 3rd Party Modules (official) page.

                  I have setup this module and it worked for me. I used 4 decimal places on the lat and long.

                  mattkabM 1 Reply Last reply Dec 16, 2024, 4:17 PM Reply Quote 1
                  • mattkabM Offline
                    mattkab @OldSunGuy
                    last edited by Dec 16, 2024, 4:17 PM

                    @OldSunGuy

                    Oh, I’m glad you guys found and were able to use MMM-NOAAAlerts!

                    Sorry I didn’t advertise it well enough. Ping me direct if you have any issues.

                    M 1 Reply Last reply Dec 22, 2024, 12:01 PM Reply Quote 1
                    • M Offline
                      mmmallday @mattkab
                      last edited by Dec 22, 2024, 12:01 PM

                      @mattkab said in MMM-WeatherAlerts:

                      @OldSunGuy

                      Oh, I’m glad you guys found and were able to use MMM-NOAAAlerts!

                      Sorry I didn’t advertise it well enough. Ping me direct if you have any issues.

                      Is it going to be added to the list? FYI I’m gonna have a PR out to fix scrolling within the month if you wanna look.

                      mattkabM 1 Reply Last reply Dec 23, 2024, 4:16 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 3 / 4
                      • 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