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

Scheduled Pinned Locked Moved Transport
47 Posts 7 Posters 17.7k Views 7 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.
  • K Offline
    KI6UVE @karsten13
    last edited by Dec 8, 2022, 1:11 PM

    @karsten13
    Yes, ft and mph

    Thanks!!

    K 1 Reply Last reply Dec 8, 2022, 6:26 PM Reply Quote 0
    • K Offline
      karsten13 @KI6UVE
      last edited by Dec 8, 2022, 6:26 PM

      @KI6UVE

      new version is released with new config option units, see https://gitlab.com/khassel/MMM-Flights/-/blob/master/MMM-Flights.js#L41

      update instructions for the module: https://gitlab.com/khassel/MMM-Flights#update-to-new-versions

      K 1 Reply Last reply Dec 9, 2022, 4:13 AM Reply Quote 0
      • K Offline
        KI6UVE @karsten13
        last edited by Dec 9, 2022, 4:13 AM

        @karsten13

        Awesome!! vielen Dank

        1 Reply Last reply Reply Quote 0
        • S sdetweil referenced this topic on Feb 9, 2023, 1:20 AM
        • L Offline
          lif
          last edited by Feb 18, 2024, 11:22 AM

          I have MMM-Flights working well except mapFixedArea: true, seems to be ignored.

          The map changes width depending upon the ac in the area.

          a20cd758-3d80-48ea-a85a-27ed2fb9fe83-image.png

          663449c8-671d-42c4-8c18-74c65bc38a68-image.png

          Also the map shows even with no traffic and showMap: “ifTraffic”,

          b582dc48-864d-429a-a27b-331cdf05973f-image.png

          Any ideas or thoughts?

          S K 2 Replies Last reply Feb 18, 2024, 11:47 AM Reply Quote 0
          • S Offline
            sdetweil @lif
            last edited by Feb 18, 2024, 11:47 AM

            @lif can u show the config for this module

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            L 1 Reply Last reply Feb 18, 2024, 5:41 PM Reply Quote 0
            • K Offline
              karsten13 @lif
              last edited by Feb 18, 2024, 12:40 PM

              @lif said in MMM-Flights:

              The map changes width depending upon the ac in the area.

              yes, the map changes width because of the length of the flight data in the table below, the area inside the map does not change. You can test this with setting mapFontColor: "red", so you see the area points.

              But I have to rethink this behavior or provide an option for a fixed width.

              Also the map shows even with no traffic and showMap: “ifTraffic”,

              will look into this, I did a rewrite of the module so maybe this was lost …

              L 1 Reply Last reply Feb 18, 2024, 5:43 PM Reply Quote 0
              • L Offline
                lif @sdetweil
                last edited by sdetweil Feb 18, 2024, 6:48 PM Feb 18, 2024, 5:41 PM

                @sdetweil said in MMM-Flights:

                @lif can u show the config for this module
                module code

                /**
                 * @file MMM-Flights.js
                 *
                 * @author Karsten Hassel
                 * @license MIT
                 *
                 * @see  https://gitlab.com/khassel/MMM-Flights
                 */
                
                Module.register("MMM-Flights", {
                  defaults: {
                    provider: "flightradar24",
                    instanceId: "FR", // needs to be set to different values if you run more than 1 instance of this module
                    // // example for ADSBexchange:
                    // provider: "ADSBexchange",
                    // providerApiKey: "your-api-key",
                    // providerUrl: "https://adsbx-flight-sim-traffic.p.rapidapi.com/api/aircraft/json",
                    // // example for opensky:
                    // provider: "opensky",
                    // providerApiKey: "user:password", //optional, without limited requests
                    // providerUrl: "https://opensky-network.org/api/states/all",
                    unknown: "?", // string used if no data available
                    title: "Flights Above Us",
                    logoTitle: "fas fa-plane",
                    logoUp: "fas fa-plane-departure",
                    logoDown: "fas fa-plane-arrival",
                    logoTo: "fas fa-arrow-right",
                    // area defined by a bounding box of WGS84 coordinates (la=latitude, lo=longitude):
                    laMin: 49.85,
                    laMax: 50.25,
                    loMin: 7.8,
                    loMax: 9.3,
                    showGrounded: false, // show grounded airplanes
                    showMap: "ifTraffic", // "always", "never", "ifTraffic"
                    noFlightsMessage: "Currently no flights in chosen area ...", // message shown if no data available
                    mapUrl: "https://{a-d}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png", // you can bring your own map
                //    mapAttributions:      '',
                    mapHeight: "300px",
                    mapFixedArea: true, // if set, the defined area is shown, if not the area is calculated from the plane locations
                    mapPosition: "bottom", // "top" or "bottom"
                    // some params to define styles in map:
                    mapFont: "40% sans-serif",
                    mapPadding: [1, 5, 0, 7],
                    mapFontColor: "white",
                    mapBackgroundColor: "black",
                    mapCurrentFlightColor: "#9c294f",
                    mapBackgroundOpacity: 0.9,
                    mapPlanePngSrc: "modules/MMM-Flights/data/plane.png",
                    mapPlanePngScale: 0.07,
                    mapPlaneTextOffset: 4,
                    useMockData: false, // if set, test data is used
                    updateInterval: 2 * 60 * 1000, // every 2 minutes
                    units: "imperial", // metric uses m and km/h, imperial uses ft and mph
                  },
                

                Config.js

                  {
                      module: "MMM-Flights",
                      position: "center",
                      config: {
                        laMin: 45.80,
                        laMax: 46.0081,
                        loMin: 0.4674,
                        loMax: 1.207,
                      },
                    },
                

                Hope this helps

                Regards

                S 1 Reply Last reply Feb 18, 2024, 6:48 PM Reply Quote 0
                • L Offline
                  lif @karsten13
                  last edited by Feb 18, 2024, 5:43 PM

                  @karsten13 said in MMM-Flights:

                  @lif said in MMM-Flights:

                  The map changes width depending upon the ac in the area.

                  yes, the map changes width because of the length of the flight data in the table below, the area inside the map does not change. You can test this with setting mapFontColor: "red", so you see the area points.

                  Ah, OK, I’ll change the font size down a bit.

                  But I have to rethink this behavior or provide an option for a fixed width.

                  Also the map shows even with no traffic and showMap: “ifTraffic”,

                  will look into this, I did a rewrite of the module so maybe this was lost …

                  Yes, it did work before I applied an update this morning

                  Thanks for your help.

                  K 1 Reply Last reply Feb 18, 2024, 6:53 PM Reply Quote 0
                  • S Offline
                    sdetweil @lif
                    last edited by sdetweil Feb 18, 2024, 6:50 PM Feb 18, 2024, 6:48 PM

                    @lif please NEVER edit the source file. unless you KNOW what you are getting yourself into.

                    all config should go in config.js
                    everything in the defaults section can be overridden in config.js

                    also on forum posts use the code block wrapper for all code and config.

                    paste text into message editor
                    select pasted text
                    hit button </>

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    L 1 Reply Last reply Feb 18, 2024, 8:55 PM Reply Quote 0
                    • K Offline
                      karsten13 @lif
                      last edited by Feb 18, 2024, 6:53 PM

                      @lif said in MMM-Flights:

                      Yes, it did work before I applied an update this morning

                      should be fixed now with latest version …

                      L 1 Reply Last reply Feb 18, 2024, 9:11 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 3 / 5
                      3 / 5
                      • First post
                        23/47
                        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