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

    Scheduled Pinned Locked Moved Health
    61 Posts 14 Posters 67.3k Views 15 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.
    • R Offline
      ryck Module Developer
      last edited by

      Description

      I was looking for a nice and simple module to display the air quality index (AQI), but all the modules I found were not really updated, or not using an API, or you couldn’t have several instances of it, or were not international, etc, so… I created my own.

      This module gets the Air Quality Index (AQI) using the World Air Quality Index project API.

      Screenshots:

      MMM-AQI

      Download:

      [card:ryck/MMM-AQI]

      Mykle1M F N 3 Replies Last reply Reply Quote 7
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer @ryck
        last edited by

        @ryck

        Nice!

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • F Offline
          Freebond @ryck
          last edited by

          @ryck Great module.
          One question: in your config.section, you wrote that is possible to insert the city_ID instead of the city_name. Where can I find the ID list?

          1 Reply Last reply Reply Quote 0
          • E Offline
            E3V3A
            last edited by

            Yes, looks very nice. I love the minimalist presentation.
            Was browsing over China… OMG! The sensors were overloaded showing 999 and far above 200 otehrwise. crazy!

            "Everything I do (here) is for free – altruism is the way!"
            MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

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

              Hi great module !

              But i have another city !!! when i write my city name i have another result “barrie in ontario” ???
              where to find city ID ?
              thanks

              1 Reply Last reply Reply Quote 0
              • R Offline
                ryck Module Developer
                last edited by

                To find the city id you can search for it using the API itself: http://aqicn.org/json-api/doc/#api-Search-SearchByName
                The API is quite picky with the names, so in my experience is always better to use the id or just the keyword here

                E 1 Reply Last reply Reply Quote 0
                • E Offline
                  E3V3A @ryck
                  last edited by

                  @ryck AFAICT you can’t even search without an API key.

                  "Everything I do (here) is for free – altruism is the way!"
                  MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    ryck Module Developer @E3V3A
                    last edited by

                    @E3V3A Yep, but you can use the same token you are using for the module, ie:

                    https://api.waqi.info/search/?token=TOKEN&keyword=croydon

                    (you can just type that URL in your browser)

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

                      Sorry but geoloc “here” is so bad !
                      name of city don’t work
                      and don’t understand how find @id …

                      R 1 Reply Last reply Reply Quote 0
                      • R Offline
                        ryck Module Developer @Fonfon
                        last edited by ryck

                        @Fonfon I added more info in the README, but is basically enter the URL above in your browser (using your token and your city, of course) an then just look for your city in the response and write down the “uid” value, that’s the id you are looking for.

                        F 1 Reply Last reply Reply Quote 1
                        • F Offline
                          Fonfon @ryck
                          last edited by

                          @ryck ahh ok i understand…Thanks a lot ;)

                          1 Reply Last reply Reply Quote 0
                          • E Offline
                            E3V3A
                            last edited by

                            Would you be willing to have/make an option to make the items horizontal instead of vertical? So to save space, since they are only numbers?

                            "Everything I do (here) is for free – altruism is the way!"
                            MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

                            R 1 Reply Last reply Reply Quote 0
                            • R Offline
                              ryck Module Developer @E3V3A
                              last edited by

                              @E3V3A Yes, that’s a good idea, I’ll try to implement it as soon as I have some spare time!

                              1 Reply Last reply Reply Quote 1
                              • M Offline
                                maydaymiao
                                last edited by

                                Hi, nice module. One question, is it possible to filter some of the pollutants that I want to see? Right now, it just displays all of them.

                                1 Reply Last reply Reply Quote 2
                                • R Offline
                                  rvanuden
                                  last edited by

                                  i am a late comer, just starting to learn about the magicmirror

                                  i do have a question about this nice module

                                  is there a way to display tresholds?

                                  for most people numbers say nothing, or you work with colors or display tresholds, how else can you know which pollutant is good or bad?

                                  1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    Smotx
                                    last edited by

                                    Thx, very good, but why the ‘header’ is not visible ?

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

                                      @Smotx said in MMM-AQI:

                                      Thx, very good, but why the ‘header’ is not visible ?

                                      Post your config entry for this module in a code block

                                      Create a working config
                                      How to add modules

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        Smotx @Mykle1
                                        last edited by

                                        @Mykle1

                                        ```
                                        
                                        {
                                        			module: 'MMM-AQI',
                                        			position: 'top_left',
                                        			header: 'Polution',
                                        			config: {
                                        				token: "99860xxxxxxx",
                                        				city: "@8xxx",
                                        				iaqi: false,
                                        				updateInterval: 30 * 60 * 1000, // Every half hour.
                                        				initialLoadDelay: 0,
                                        				animationSpeed: 1000,
                                        				debug: false
                                        			}
                                        		},
                                        
                                        Mykle1M 1 Reply Last reply Reply Quote 0
                                        • Mykle1M Offline
                                          Mykle1 Project Sponsor Module Developer @Smotx
                                          last edited by Mykle1

                                          @Smotx

                                          Hmm, odd. Your config looks good. Header SHOULD be showing. I just installed and ran it and my header appears as expected. Not sure why yours isn’t. My config:

                                          {
                                                  module: 'MMM-AQI',
                                                  position: 'top center',
                                                  header: 'This header is working',
                                                  config: {
                                                    token: "exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3",
                                                    city: "here",
                                                    iaqi: true,
                                                    updateInterval: 30 * 60 * 1000, // Every half hour.
                                                    initialLoadDelay: 0,
                                                    animationSpeed: 1000,
                                                    debug: false
                                                  }
                                                },
                                          

                                          0_1555461896239_Screenshot from 2019-04-16 20-44-43.png

                                          Try using my config with your apiToken as a test.

                                          Create a working config
                                          How to add modules

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            Smotx @Mykle1
                                            last edited by

                                            @Mykle1

                                            The same, it’s stange, on others module, header are ok on screen…

                                            Mykle1M 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
                                            • 2
                                            • 3
                                            • 4
                                            • 1 / 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