Read the statement by Michael Teeuw here.
MMM-Config Missing changing settings
-
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-Remote-Control, the API is missing from the config page. After saving, the API remains in the config.js file.
- 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.
Thanks
David
-
@daportelli fun times…
for the pihole problem,
can you email me the MMM-Config/defaults_???.jshave 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.jsso 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. -
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 losttwo - 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 sectionthree - 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 -
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 -
@sdetweil thanks for looking into it
-
@daportelli but , you could edit the modulename.js (MMM-pi-hole-stats.js)
and ADD the variable definitionapiToken: "",
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 fieldsand you can restore the MMM-pi-hole-stats.js
and it will be good from then on
same with the default weather module