Read the statement by Michael Teeuw here.
MMM-SystemMonitor
-
@Richard238 in the MagicMirror folder
-
[2025-02-02 21:35:32.330] [INFO] Checking modules structure configuration ... [2025-02-02 21:35:32.511] [ERROR] Cannot read properties of undefined (reading 'units')
Module says:
units: config.units,
And also tried with
units: metric,
Which failed with:
[ERROR] metric is not defined
config.js towards the beginning says:
units: 'metric',
-
@Richard238 to the right of :
Numbers and true/false do not need quotes
Any thing that has a letter needs quotes -
I don’t understand, sorry?
-
@Richard238 in config.js all properties are
name : value
The value, to the right of the colon (:)
If a number or tr/false
Does not need quotesIf it contains a letter or symbol
It needs quotesunits : metric
To the right is metric
It has letters, so needs quotes -
That’s fixed it.
Module in config.js
units: 'config.units'
config.js before modules
was
units: 'metric',
Changed it to
units: "metric",
Quite how Free Memory can be 128% I’ve no idea, that’s for another day.
For now, it’s working. Thank you! -
@Richard238 cool. Single or double quotes don’t matter as long as they are matched
Be careful on quotes and copying from the forum
If the quotes are curved, they are word processing style and Javascript doesn’t understand them
" or ’If they are vertical, they are good
" or '
-
@sdetweil said in MMM-SystemMonitor:
Single or double quotes don’t matter as long as they are matched
JS lesson #1 :-)
-
I’m new to MM and just been putting together my board over the last week.
I’ve used your module and think it’s great.
One thing I did find is that your default way of grabbing diskspace had the device hard coded.
I made this change to node_helper.js:
async.apply(exec, "df -h /|grep dev|awk '{print $4}'"),
That looked for the root partition and was able to then return the correct value for me.
-
@mebster5 submit that as a pr