Read the statement by Michael Teeuw here.
Modular configuration generation
-
I would propose the following as a transitional addition to the configuration system.
-
Add a simple GUI based configuration utility or web frontend to the system (there are some modules that attempt to do this already so it would be minimal work to adapt it to the following second detail.
-
For the simple GUI enforce a configuration contract with modules that follows a defined schema using [tags] to define types of information blocks. For a module to be able to show up in the GUI developers will need to briefly update their github repository to add a contract.yaml etc file that defines the default settings for the module.
This merges into the main program a feature that other modules have attempted to create while transitioning the system to a true contract based configuration system that allows for much easier user settings changes. The onus is on the module developers to present the correct base configuration file from which the dynamic configuration file for magicmirror can then be crafted from.
-
-
See my MMM-Config.
https://github.com/sdetweil/MMM-ConfigIt supports the base MagicMirror and all modules.
It does not require a specific set of options, but auto discovers the module definitions
It supports the module defaults, can provide select lists, booleans, numbers, floats, structures, arrays. And field level helpAlso supports live view of the module readme, in both install and configure scenarios
A module developer can create a json file to describe their module config if the auto generated format isn’t sufficient.
See the wiki on creating the custom module form definition
https://github.com/sdetweil/MMM-Config/wiki
I have helped a few module authors in this process. and I have created a few customized forms, which MMM-Config ships to cover the modules not being maintained but usedThe objective of MMM-Config is to
-
support the modules(1200+) as is( some are not maintained, but heavily used),
-
allow extended customization, (as you suggest), see the wiki, I provide a tool to generate the form for a module so that it can be tweaked instead of developed from scratch
-
provide a common ui structure, for the base and modules,
-
support modules that support multiple instances ( calendar and weather are good examples) ,
and do this as one view, everything all at once.
The ui can be customized thru css
The current version also provides support for module installation, using the data from the 3rd party module list
-
-
@sdetweil This is great. I have been working on something similar but I didn’t need to. I wish I could find cool things like this already exist for Magic Mirror easier.
-
@msimon360 use the search in the 3rd party list…
links in the header of this forum -
@msimon360 i’d love your feedback on a new feature
I don’t provide support to upgrade individual modules.
thinking about thisshould it only list those modules IN USE? or ALL modules ‘cloned’ into the modules folder (note ‘installed’ is a vague term here)
as a developer of this module , I have 100’s of modules ‘cloned’, but only a few (in use) at any time
I don’t want to burden the user with unnecessary things to work on. but don’t want to make them do things over and over from being too selective(Oh added another module to the active config, but its downlevel… oops)… (and I don’t WANT to provide a config option, cause NOBODY (me included) reads the doc)…
maybe its just a checkbox on the page in use/all
-
@daedalus7 one other focus area for MMM-Config,
most of our ‘developers’ have never written a line of code before…
they just want something displayed on the MM screen…so, I have done everything I can to make this a NO effort added value for them too.
i don’t read the code to figure out how variables are used, and looking thru the modules, this only applies in less than 10 of now 1418 modules
the mod to make a select list vs a text entry field is to add an
enum:[choice1, choice2, choice3…]
to the form definitionand sometimes what you CAN do is javascript, doesn’t fit to the form UI at all, so one can convert back/forth with a converter routine to make it better… see the compliments module for example
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