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

Scheduled Pinned Locked Moved Troubleshooting
68 Posts 15 Posters 41.7k Views 13 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.
  • H Offline
    Hriereb @cowboysdude
    last edited by Hriereb May 28, 2018, 11:57 AM May 28, 2018, 11:56 AM

    @cowboysdude
    How to change the default language?
    I’ve seen a translation folder with some .json files so I created an it.json file to enable the italian translation. After that I added some lined to the MMM-NOAA.js file but it doesn’t work. Where’s my mistake? Thanks.

    /* Magic Mirror
     * Module: MMM-NOAA
     * By cowboysdude and tbbear 
            modified by barnosch
     */
    var c = 0;
    var l = 1;
    var loco = "";
    "use strict";
    
    Module.register("MMM-NOAA", {
    
        // Module config defaults.
        defaults: {
            updateInterval: 70 * 60 * 1000, // every 10 minutes
            animationSpeed: 0,
            initialLoadDelay: 8000,
            rotateInterval: 20 * 1000,
            maxWidth: "100%",
            apiKey: "",
            airKey: "",
    	loco1: "xxx",
    	loco2: "xxx",
    	loco3: "xxx",
    	pws: "XXX",
    	pws1: "xxx",
    	pws2: "xxx",
    	pws3: "xxx",
    
    	   langFile: {
                "en": "en-US",
                "de": "de-DE",
                "sv": "sv-SE",
                "es": "es-ES",
                "fr": "fr-FR",
                "zh_cn": "zh-CN",
                "da": "da",
                "nl": "nl-NL",
                "nb": "nb-NO",
                "it": "it-IT"
            },
    
    
            langTrans: {
                "en": "EN",
                "de": "DL",
                "sv": "SW",
                "es": "SP",
                "fr": "FR",
                "zh_cn": "CN",
                "da": "DK",
                "nl": "NL",
                "nb": "NO",
                "it": "IT",
            },
    
    	levelTrans: {
            "1":"green",
    		"2":"yellow",
    		"3":"orange",
    		"4":"red",
    	}				
    
        },
    
        getTranslations: function() {
            return {
                en: "translations/en.json",
                da: "translations/da.json",
                sv: "translations/sv.json",
                de: "translations/de.json",
                es: "translations/es.json",
                fr: "translations/fr.json",
                zh_cn: "translations/zh_cn.json",
                nl: "translations/nl.json",
                nb: "translations/nb.json",
                it: "translations/it.json",
             };
        },
    
    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw http://michaelteeuw.nl
     * MIT Licensed.
     *
     * For more information how you can configurate this file
     * See https://github.com/MichMich/MagicMirror#configuration
     *
     */
    
    var config = {
    	address: "localhost", // Address to listen on, can be:
    	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
    	                      // - another specific IPv4/6 to listen on a specific interface
    	                      // - "", "0.0.0.0", "::" to listen on any interface
    	                      // Default, when address config is left out, is "localhost"
    	port: 8080,
    	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
    	                                                       // or add a specific IPv4 of 192.168.1.5 :
    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
    	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
    
    	language: "it",
    	timeFormat: 24,
    	units: "metric",
    
    	modules: [
    		{
    			module: "alert",
    		},
                    {
                            module: 'MMM-NOAA',
                            position : "top_right",
                            language: "it",
                                    config: {
                                    apiKey: "xxxxxx",    // https://www.wunderground.com/weather/api  select the middle plan... 
    	                        airKey: "xxxxxxx"    // IF you want Air Quality Index
                                    }
                    },
    
    H M 2 Replies Last reply May 28, 2018, 6:45 PM Reply Quote 0
    • C Offline
      cowboysdude Module Developer @tadeus1975
      last edited by May 28, 2018, 3:43 PM

      @tadeus1975 Please read the readme file ;)

      There is no longer any PWS just enter your apiKey and airKey…that’s all.

      1 Reply Last reply Reply Quote 0
      • I Offline
        idoodler Module Developer @tadeus1975
        last edited by May 28, 2018, 6:32 PM

        @tadeus1975 Please check out the Readme. You need to add this object to to /home/pi/MagicMirror/config/config.js

        1 Reply Last reply Reply Quote 1
        • I Offline
          idoodler Module Developer @tadeus1975
          last edited by May 28, 2018, 6:36 PM

          @tadeus1975 I assume you have never added any module, you can post your config if this is the case and I may be able to send you the correct config.js

          1 Reply Last reply Reply Quote 1
          • H Offline
            Hriereb
            last edited by May 28, 2018, 6:37 PM

            Any suggestion about changing the default language and using the Italian?

            I 1 Reply Last reply May 28, 2018, 6:39 PM Reply Quote 0
            • I Offline
              idoodler Module Developer @Hriereb
              last edited by May 28, 2018, 6:39 PM

              @hriereb As far I see Italian is not supported. You can contribute by adding the italian translation for MMM-NOAA.

              1 Reply Last reply Reply Quote 1
              • H Offline
                Hriereb @Hriereb
                last edited by May 28, 2018, 6:45 PM

                JS@hriereb said in MMM-NOAA:

                @cowboysdude
                How to change the default language?
                I’ve seen a translation folder with some .json files so I created an it.json file to enable the italian translation. After that I added some lined to the MMM-NOAA.js file but it doesn’t work. Where’s my mistake? Thanks.

                /* Magic Mirror
                 * Module: MMM-NOAA
                 * By cowboysdude and tbbear 
                        modified by barnosch
                 */
                var c = 0;
                var l = 1;
                var loco = "";
                "use strict";
                
                Module.register("MMM-NOAA", {
                
                    // Module config defaults.
                    defaults: {
                        updateInterval: 70 * 60 * 1000, // every 10 minutes
                        animationSpeed: 0,
                        initialLoadDelay: 8000,
                        rotateInterval: 20 * 1000,
                        maxWidth: "100%",
                        apiKey: "",
                        airKey: "",
                	loco1: "xxx",
                	loco2: "xxx",
                	loco3: "xxx",
                	pws: "XXX",
                	pws1: "xxx",
                	pws2: "xxx",
                	pws3: "xxx",
                
                	   langFile: {
                            "en": "en-US",
                            "de": "de-DE",
                            "sv": "sv-SE",
                            "es": "es-ES",
                            "fr": "fr-FR",
                            "zh_cn": "zh-CN",
                            "da": "da",
                            "nl": "nl-NL",
                            "nb": "nb-NO",
                            "it": "it-IT"
                        },
                
                
                        langTrans: {
                            "en": "EN",
                            "de": "DL",
                            "sv": "SW",
                            "es": "SP",
                            "fr": "FR",
                            "zh_cn": "CN",
                            "da": "DK",
                            "nl": "NL",
                            "nb": "NO",
                            "it": "IT",
                        },
                
                	levelTrans: {
                        "1":"green",
                		"2":"yellow",
                		"3":"orange",
                		"4":"red",
                	}				
                
                    },
                
                    getTranslations: function() {
                        return {
                            en: "translations/en.json",
                            da: "translations/da.json",
                            sv: "translations/sv.json",
                            de: "translations/de.json",
                            es: "translations/es.json",
                            fr: "translations/fr.json",
                            zh_cn: "translations/zh_cn.json",
                            nl: "translations/nl.json",
                            nb: "translations/nb.json",
                            it: "translations/it.json",
                         };
                    },
                
                /* Magic Mirror Config Sample
                 *
                 * By Michael Teeuw http://michaelteeuw.nl
                 * MIT Licensed.
                 *
                 * For more information how you can configurate this file
                 * See https://github.com/MichMich/MagicMirror#configuration
                 *
                 */
                
                var config = {
                	address: "localhost", // Address to listen on, can be:
                	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                	                      // - another specific IPv4/6 to listen on a specific interface
                	                      // - "", "0.0.0.0", "::" to listen on any interface
                	                      // Default, when address config is left out, is "localhost"
                	port: 8080,
                	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
                	                                                       // or add a specific IPv4 of 192.168.1.5 :
                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                
                	language: "it",
                	timeFormat: 24,
                	units: "metric",
                
                	modules: [
                		{
                			module: "alert",
                		},
                                {
                                        module: 'MMM-NOAA',
                                        position : "top_right",
                                        language: "it",
                                                config: {
                                                apiKey: "xxxxxx",    // https://www.wunderground.com/weather/api  select the middle plan... 
                	                        airKey: "xxxxxxx"    // IF you want Air Quality Index
                                                }
                                },
                

                As I posted before I made an it.json file and put it in the translation folder. I’ve tried to update the MMM-NOAA.js
                but it doesn’t seem to work. Can you help me finding my mistake?

                I 1 Reply Last reply May 28, 2018, 6:54 PM Reply Quote 0
                • I Offline
                  idoodler Module Developer @Hriereb
                  last edited by May 28, 2018, 6:54 PM

                  @hriereb May you please also post your it.json

                  H 1 Reply Last reply May 28, 2018, 7:04 PM Reply Quote 0
                  • H Offline
                    Hriereb @idoodler
                    last edited by May 28, 2018, 7:04 PM

                    @idoodler

                    {
                    “Atmospheric Conditions” : “Condizioni Atmosferiche”,
                    “Sunrise/Sunset”:“Alba/Tramonto”,
                    “AQI/UV/Wind”:“AQI/UV/Vento”,
                    “4 Day Forecast”:"Previsioni su quattro giorni ",
                    “Monday”: “Lunedì”,
                    “Tuesday”: “Martedì”,
                    “Wednesday”: "Mercoledì ",
                    “Thursday”: “Giovedì”,
                    “Friday”: “Venerdì”,
                    “Saturday”: “Sabato”,
                    “Sunday”: “Domenica”,
                    “Hours of Light”:“Ore di luce”,
                    “Last Updated”: “Ultimo aggiornamento”,
                    “Today”:“Oggi”,
                    “Mon”:“Lun”,
                    “Tue”:“Mar”,
                    “Wed”:“Mer”,
                    “Thu”:“Giov”,
                    “Fri”:“Ven”,
                    “Sat”:“Sab”,
                    “Sun”:“Dom”,
                    “Forecast”:“Previsioni”,
                    “Weather warning”:“Allerta meteo”,
                    “Night”: “Notte”
                    }

                    I 1 Reply Last reply May 28, 2018, 7:06 PM Reply Quote 0
                    • I Offline
                      idoodler Module Developer @Hriereb
                      last edited by May 28, 2018, 7:06 PM

                      @hriereb This is an invalide JSON, please replace “ with ".

                      H 1 Reply Last reply May 28, 2018, 7:10 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 2 / 7
                      2 / 7
                      • First post
                        11/68
                        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