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-Tado wrong units

    Scheduled Pinned Locked Moved Troubleshooting
    28 Posts 3 Posters 5.1k 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.
    • W Offline
      WouterEekhout
      last edited by

      @sdetweil Thank you for the clarification. Now it is clear why there is miscommunication. I use the units from the general config settings: https://docs.magicmirror.builders/getting-started/configuration.html#general .

      To clarify my config looks like this:

      var config = {
      	address: "localhost", 
      	port: 8080,
      	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
      
      	language: "en",
      	timeFormat: 24,
      	units: "metric",
      
      	modules: [
      		{
      			module: 'MMM-Tado',
      			position: 'top_right',
      			header: 'My Home',
      			config: {
      				username: 'x',
      				password: 'x',
      				updateInterval: 300000,
      			}
      		},
      	]
      
      };
      

      Notice that the units-config is outside modules-config. And not in the module-config. I think this makes more sense. Because of this self.config.units does contain the correct value. I will update the readme about the units-config, so it will be more clear.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @WouterEekhout
        last edited by sdetweil

        @WouterEekhout ok, but… i don’t think that is what the USER wanted… their system is in metric, but they wanted your module display to be Fahrenheit, so I would use some other varname, and check to see if they specified that, and use IT over the system value…

        or because u have it as a default, if u set it to some invalid value, then check if its what you allow,
        then if invalid, use system, otherwise allow users value…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • W Offline
          WouterEekhout
          last edited by

          @sdetweil I disagree, it is unclear if the current config is not working or if he wanted a custom units setting for the app. @Stoffbeuteluwe Can you clarify if you wanted to set a different unit for the app?

          StoffbeuteluweS 1 Reply Last reply Reply Quote 0
          • StoffbeuteluweS Offline
            Stoffbeuteluwe Project Sponsor @WouterEekhout
            last edited by

            @WouterEekhout I am from Germany and I need metric unit but Sam helped me to fix and now it’s working for me.
            It would be cool to have the choice in module config. Metric or imperial
            Thanks to you guys

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @Stoffbeuteluwe
              last edited by

              @Stoffbeuteluwe what is your main config.js units set to? up near address:

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              StoffbeuteluweS 1 Reply Last reply Reply Quote 0
              • StoffbeuteluweS Offline
                Stoffbeuteluwe Project Sponsor @sdetweil
                last edited by

                @sdetweil it is metric

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @Stoffbeuteluwe
                  last edited by

                  @Stoffbeuteluwe so, the original code should have worked…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  StoffbeuteluweS 1 Reply Last reply Reply Quote 0
                  • StoffbeuteluweS Offline
                    Stoffbeuteluwe Project Sponsor @sdetweil
                    last edited by

                    @sdetweil without your fix it does not work in my case

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @Stoffbeuteluwe
                      last edited by

                      @Stoffbeuteluwe hmm…

                      can u share the top of your config.js, before the modules:[ line

                      thanks

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      StoffbeuteluweS 1 Reply Last reply Reply Quote 0
                      • StoffbeuteluweS Offline
                        Stoffbeuteluwe Project Sponsor @sdetweil
                        last edited by

                        @sdetweil Hello, after module update same problem
                        and your fix don’t work anymore…can you help me again?

                        var config = {
                        	address: "0.0.0.0", // Address to listen on, can be:
                        	                      // - "0.0.0.0", "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 "0.0.0.0"
                        	port: 8080,
                        	ipWhitelist: [], // 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: "de",
                        	timeFormat: 24,
                        	units: "metric",
                        
                        	modules: [
                        
                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • 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