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-FAA-Delay

    Scheduled Pinned Locked Moved Transport
    20 Posts 5 Posters 13.5k Views 4 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.
    • N Offline
      nigel-daniels
      last edited by

      0_1471474410836_airport-delays.png

      This module displays information published by the FAA on delays and weather conditions at some US airports. The full airport list can be seen here.

      This is my first module so please let me know if you find any errors in the code/documentation. It currently covers US airports only, so if you know of other feeds for different regions then let me know and I’ll see if they can be integrated.

      I hope you like this and find it useful!

      N 1 Reply Last reply Reply Quote 1
      • N Offline
        nigel-daniels
        last edited by

        https://github.com/nigel-daniels/MMM-FAA-Delay

        1 Reply Last reply Reply Quote 0
        • F Offline
          fwood04
          last edited by

          Seems to be only monitoring 1 airport, how would I go about either showing multiple airports or rotate/transition between multiple airports every couple seconds similar to the newsfeed?

          N 2 Replies Last reply Reply Quote 0
          • N Offline
            nigel-daniels @fwood04
            last edited by

            @fwood04 If you want to set up multiple airports you can set a series of modules something like:

            {
            module: 'MMM-FAA-Delay',
            position: 'top_left',
            classes: 'dimmed medium',
            header: 'Airport Delays',
            config: {
            airport: 'SFO',
            interval: 300000 // 5 min updates
            }
            },
            {
            module: ‘MMM-FAA-Delay’,
            position: ‘top_left’,
            classes: ‘dimmed medium’,
            config: {
            airport: ‘LAX’,
            interval: 300000 // 5 min updates
            }
            },

            I hope that helps.

            1 Reply Last reply Reply Quote 0
            • N Offline
              nigel-daniels @fwood04
              last edited by

              @fwood04 I’ve found some time and reworked the code so that you can provide an array of airport codes and display multiple airports correctly.
              You will need to re-clone the module and use the new format of configuration.

              I hope that helps.

              1 Reply Last reply Reply Quote 1
              • N Offline
                nigel-daniels @nigel-daniels
                last edited by

                @nigel-daniels Update to fix a bug where the reported data on an airport can get assigned the wrong airport code. This is to support the updated configuration that allows for multiple airports, for example:

                {
                module: 'MMM-FAA-Delay',
                position: 'top_left',
                header: 'Airport Delays',
                config: {
                interval: 300000, // 5 min updates
                airports: ['SFO', 'SJC']
                }
                },

                F 1 Reply Last reply Reply Quote 1
                • F Offline
                  fwood04 @nigel-daniels
                  last edited by

                  @nigel-daniels Sorry for the long delay, but thanks!

                  N 1 Reply Last reply Reply Quote 0
                  • twosquirrelsT Offline
                    twosquirrels
                    last edited by twosquirrels

                    This module is great, but how do I get rid of the weather? I already have a weather module, so this wastes valuable space. Thanks.

                    EDIT: I answered my own questions. I just commented out this line in MMM-FAA-Delay.js:

                      //wrapper.appendChild(weatherRow);
                    
                    N 2 Replies Last reply Reply Quote 0
                    • N Offline
                      nigel-daniels @twosquirrels
                      last edited by

                      @twosquirrels Glad you sorted it out. I figured the weather is useful if you are monitoring airports some distance away but if you live close to the one you track then I can see it’s redundant information.

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        nigel-daniels
                        last edited by

                        The FAA have update their API and as a result broke this module. There is an updated version now in the git repository. This update has two features:

                        • It handles the new API correctly.
                        • It now has a flag to block the display of the airport weather.

                        On your magic mirror go into the MMM-FAA-Delay directory in the modules and run the following commands:

                        git pull
                        npm install
                        

                        This should update the MMM-FAA-Delay code then update it’s dependancies.

                        1 Reply Last reply Reply Quote 0
                        • N Offline
                          nigel-daniels @twosquirrels
                          last edited by

                          @twosquirrels you may be seeing that the MMM-FAA-Delay module is broken, the FAA changed their code and did not let anyone know or put a proxy/web forward in place :( I have updated the code and added a flag displayWeather to the config so that when you update you don’t have to go in and hack the new code again.

                          twosquirrelsT 2 Replies Last reply Reply Quote 0
                          • N Offline
                            nigel-daniels @fwood04
                            last edited by

                            @fwood04 hi, you may be seeing errors for this module, the FAA changed stuff and broke the module, I’ve just fixed it so you should be good to update.

                            1 Reply Last reply Reply Quote 0
                            • twosquirrelsT Offline
                              twosquirrels @nigel-daniels
                              last edited by

                              @nigel-daniels

                              I did notice it was broken for the last couple days but didn’t check these forums until now. Thanks for the update! I’ll be updating today.

                              1 Reply Last reply Reply Quote 0
                              • twosquirrelsT Offline
                                twosquirrels @nigel-daniels
                                last edited by

                                @nigel-daniels

                                It was driving me nuts, but the config is showWeather, not displayWeather :smiling_face_with_open_mouth_closed_eyes:

                                N 1 Reply Last reply Reply Quote 0
                                • N Offline
                                  nigel-daniels @twosquirrels
                                  last edited by

                                  @twosquirrels I’m so sorry. Fortunately I got it right in the git-hub docs!!

                                  1 Reply Last reply Reply Quote 0
                                  • twosquirrelsT Offline
                                    twosquirrels
                                    last edited by

                                    I have weather disabled with showWeather turned off, but I still have this wasted line after each airport. airport.css didn’t seem to have any option to control this. Is there any way?

                                    0_1532527916029_CloudApp Annotation 2018-07-25 at 10.09.56 AM.png.png

                                    N 2 Replies Last reply Reply Quote 0
                                    • N Offline
                                      nigel-daniels @twosquirrels
                                      last edited by nigel-daniels

                                      @twosquirrels sorry for the delay in getting to this, I just got back from some travels. It looks like the FAA have made more changes than I realized. Next to the airports code (in the red boxes) should be a short status indicator, e.g. ‘Ok’, ‘Delays’, ‘Closed’, etc. Then in the line below (which is showing) should be a brief line of detail to give a bit more detail on the status, especially if there is a delay.

                                      1 Reply Last reply Reply Quote 0
                                      • N Offline
                                        nigel-daniels @twosquirrels
                                        last edited by

                                        @twosquirrels ok I have made the changes, so try an update. The blanks should now display the headline status. Sadly the FAA’s documentation is somewhat opaque and does not seem to totally match what I actually get from the API so there may be one or two cases where the word ‘undefined’ crops up rather than a time for an actual delay. If you see that just drop me a line and let me know what the status and text was and I’ll try and figure out what’s going on.

                                        J 1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          jbbwa @nigel-daniels
                                          last edited by

                                          @nigel-daniels Nice work on the initial module and then reworking to keep up with the FAA API changes. I’m seeing “[object Object]” on my mirror at the beginning of the second line for each airport (the weather line, where I would guess it should be showing general conditions, e.g fair, raining, etc right before the temperature.

                                          Are you seeing the same results? Another API change?

                                          Mykle1M 1 Reply Last reply Reply Quote 0
                                          • Mykle1M Offline
                                            Mykle1 Project Sponsor Module Developer @jbbwa
                                            last edited by Mykle1

                                            @jbbwa

                                            The data as it comes from the API:
                                            0_1541810630595_Screenshot from 2018-11-09 19-43-34.png

                                            Temporarily, you can use showWeather: false, in your config until the author responds. However, this will remove all the weather data from the display.

                                            0_1541810927166_Screenshot from 2018-11-09 19-48-25.png

                                            Create a working config
                                            How to add modules

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 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