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-Config Missing changing settings

    Scheduled Pinned Locked Moved Solved Troubleshooting
    6 Posts 2 Posters 297 Views 2 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.
    • D Offline
      daportelli
      last edited by

      Not sure if this is the correct place to not @sdetweil around a couple of issues I have found:
      -MMM-pilehole-stats, the API is missing from the config page. After saving, the API remains in the config.js file. MMM-pilehole-stats Config page.png

      -MMM-Remote-Control, the API is missing from the config page. After saving, the API remains in the config.js file. MMM-Remote-Control.png

      • Weather_Current, the config module does not read the API key or the lon/lat setting and then removes them from the file on save. Waether_Current_Before.png Waether_Current_After.png

      Thanks

      David

      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @daportelli
        last edited by sdetweil

        @daportelli but , you could edit the modulename.js (MMM-pi-hole-stats.js)
        and ADD the variable definition

        apiToken: "",
        
        

        and then restart MM and go to config and it will be there

        and then you go to MMM-Config folder and run
        ./create_form_for_module.sh MMM-pi-hole-stats
        and it will generate and save the schema with the updated fields

        and you can restore the MMM-pi-hole-stats.js

        and it will be good from then on

        same with the default weather module

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Away
          sdetweil @daportelli
          last edited by

          @daportelli fun times…

          for the pihole problem,
          can you email me the MMM-Config/defaults_???.js

          have to rename as .txt to email

          same userid as here at gmaill

          and the others… yes, this is the one area of frustration.
          these modules use parameters not listed in the defaults:{} section of their modulename.js

          so those fields don’t exist

          the author (or anyone) can use my tools(see the MMM-Config wiki) to create a custom form to fix these problems
          and provide it with their module files, and I will use it.
          or, someone could create it and make a PR to MMM-Config and I will ship it and use it.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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

            from a general perspective there are three odd use cases

            one - there is a variable in a module config in config.js but not in the module definitions
            — it will be saved and restored (your pihole apikey, but pi-hole-stats has apiKey defined)
            — the generated form for that module is lost

            two - there is no variable in config.js, or adding a new module config, and some properties are not listed in the module definition
            — they will not be presented as they were unknown
            — this is also the pi-hole-stats problem as there is a new variable called apiToken, but it is not in the defaults section

            three - there was a custom form for a module provided, and it covers all the variables used, and these will be in the form data returned, but the defaults section does not list them

            when i merged the form data w config.js values, sone are missing,
            – -so i add them to the config.js entry for that
            module instance.
            — these added entries are the default values for those properties, so no harm is none, but config.js is different

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              my Primary design point was to NOT REQUIRE the module to be changed

              I rechecked the overrides, and it only allows replacing the definition of a declared variable
              and cannot be used to declare one

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                daportelli @sdetweil
                last edited by

                @sdetweil thanks for looking into it

                S 1 Reply Last reply Reply Quote 0
                • S Away
                  sdetweil @daportelli
                  last edited by sdetweil

                  @daportelli but , you could edit the modulename.js (MMM-pi-hole-stats.js)
                  and ADD the variable definition

                  apiToken: "",
                  
                  

                  and then restart MM and go to config and it will be there

                  and then you go to MMM-Config folder and run
                  ./create_form_for_module.sh MMM-pi-hole-stats
                  and it will generate and save the schema with the updated fields

                  and you can restore the MMM-pi-hole-stats.js

                  and it will be good from then on

                  same with the default weather module

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S sdetweil has marked this topic as solved on
                  • 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