Read the statement by Michael Teeuw here.
Compliments module external file
-
@hanao00 it either has to be IN the compliments folder and you use JUST the name, OR its http://someserver…/path_tofile
so, in your case, just use the filename
also, the path is wrong
you coded{ module: 'compliments',
but then coded this for the path (no mmm and capital letters matter on PI )
modules/MMM-Compliments
the module folder name is compliments
this is where the file should be…modules/default/compliments
-
@sdetweil Thanks for your reply, MMM-Compliments was a folder that i make for customs compliments, but now the path for compliments is :
/home/pi/MagicMirror/modules/default/compliments/
A screen of my config for compliments, but doesn’t work
-
@hanao00 every letter matters
its
remoteFile
not
remotefile
on linux things are case sensitive
javascript is case sensitive on all platforms… -
@sdetweil Thank you I hadn’t paid attention, I corrected the case but it still uses the default compliments
-
if the file upload fails, the defaults are used…
open the developers window, ctrl-shift-i on the pi keyboard,
select the console tab, and scroll up, or enter some unique part of the module name in the filter field
to slim down messages to the modulemake sure the name is exact…
-
Oh perfect, thanks ! He needs the extension of the file
-
@hanao00 said in Compliments module external file:
He needs the extension of the file
yes, exact name
and for this module, the extension MUST be .json
-
@sdetweil Thank you
-
May I ask a follow on question? Is the source of the core compliments editable? Meaning, not the source code, but the source of the sayings that appear on the screen. I like the existing compliments but would like to customize what actually appears on the screen.
-
@cheapdad you should not edit THAT content
you can copy into your own file and edit from there, OR add it to the config.js
general rule… unless there is bug u are fixing short term, or a feature u are adding,
do NOT edit the module content (any file) in the defaults folder…and overall should never edit the installed module files at all…
config.js is designed to allow to override the settings defined by the modules