MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Compliments module external file

    Troubleshooting
    3
    18
    603
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      HanaO00 last edited by

      Hello, I wanted to use a file for the compliments module, but it doesn’t take it

      Here is the part in config.json

      {
      module: 'compliments',
      position: 'middle_center',
         config: { 
           remoteFile: '/home/pi/MagicMirror/modules/MMM-Compliments/compliments.json'
         }
      },
      

      Someone have an idea ?
      Thanks

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @HanaO00 last edited by

        @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
        

        Sam

        Create a working config
        How to add modules

        H 1 Reply Last reply Reply Quote 0
        • H
          HanaO00 @sdetweil last edited by

          @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

          Screenshot-2021-04-19_22-43-53.png

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @HanaO00 last edited by

            @hanao00 every letter matters

            its

            remoteFile
            

            not

            remotefile
            

            on linux things are case sensitive
            javascript is case sensitive on all platforms…

            Sam

            Create a working config
            How to add modules

            H 1 Reply Last reply Reply Quote 0
            • H
              HanaO00 @sdetweil last edited by

              @sdetweil Thank you I hadn’t paid attention, I corrected the case but it still uses the default compliments

              S 1 Reply Last reply Reply Quote 0
              • S
                sdetweil @HanaO00 last edited by

                @hanao00

                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 module

                make sure the name is exact…

                Sam

                Create a working config
                How to add modules

                1 Reply Last reply Reply Quote 0
                • H
                  HanaO00 last edited by

                  Oh perfect, thanks ! He needs the extension of the file

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    sdetweil @HanaO00 last edited by sdetweil

                    @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

                    Sam

                    Create a working config
                    How to add modules

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      HanaO00 @sdetweil last edited by

                      @sdetweil Thank you

                      1 Reply Last reply Reply Quote 0
                      • C
                        CheapDad last edited by

                        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.

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy