You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ran, the default compliments are shown and not the remoteFile that I've specified above. Here's output of running docker compose exec -t -i magic-mirror ls /opt/magic_mirror/modules on the host:
I corrected one of the working examples above, bad copy/paste. @sdetweil not sure what you're calling out specifically, sorry if that caused confusion above. The referenced gist works if referenced via URL, but if I instead bring that file local to the container, it doesn't load as expected and instead the default compliments are displayed. I don't think this is a json formatting issue as the same contents are present without modification in the gist as well as the json file presented from local file system.
Activity
sdetweil commentedon Oct 15, 2023
the remotefile contains only everything after the compliments:
in json format
json has all text in double quotes
there are some good online validators
and 'local' file needs to be thru a web server
MM's server is rooted at ~/MagicMirror
for example, all the files have to be in the mm folder tree
jschneekloth commentedon Oct 15, 2023
I corrected one of the working examples above, bad copy/paste. @sdetweil not sure what you're calling out specifically, sorry if that caused confusion above. The referenced gist works if referenced via URL, but if I instead bring that file local to the container, it doesn't load as expected and instead the default compliments are displayed. I don't think this is a json formatting issue as the same contents are present without modification in the gist as well as the json file presented from local file system.
khassel commentedon Oct 15, 2023
you can't use the whole filename from the underlying file system because the web server does load this within the
compliments.jsfile.So you have to use a relative path, in this case the
compliments.jsonis 2 directories above soremoteFile: "../../compliments.json"should work.
jschneekloth commentedon Oct 15, 2023
@khassel That did the trick, and makes sense, thanks!