MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Lahim
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 15
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: remoteFile in compliments module

      Ok, I found where was the problem and where is the problem now.
      Because I am using Pi0 with Midori, with oryginal file the compliments were not show on the mirror but I was able to see them thru LAN.
      So I found the solution to change:

      if (this.config.remoteFile != null) {
                      this.complimentFile((response) => {
                              this.config.compliments = JSON.parse(response);
                      });
              }
      

      to:

               if (this.config.remoteFile != null) {
                      this.complimentFile(
                              function(response){
                                      this.config.compliments = JSON.parse(response);
                      });
              }
      

      and yes, that make my compliments shown on mirror but in same time the text is only from compliments.js file.
      So now, to see the compliments I have to copy own text to .js file :(

      That is the problem.

      posted in Troubleshooting
      L
      Lahim
    • RE: remoteFile in compliments module

      I tried to change

      remoteFile: null,
      

      for remoteFile: ‘compliments.json’ previously but, as you know, did not help.
      Now I came back to the oryginal file, saved your compliments as json file in Notepad++ as you wrote, and…
      IT IS WORKING!!!

      Thank you so much!!!
      F…ck, so many time I spent tring different solutions and finaly it works.
      One more time thank you for attention and help!
      The module - great job!!

      posted in Troubleshooting
      L
      Lahim
    • RE: remoteFile in compliments module

      Thank you for trying and helping but I copied your setup but still the same thing.

      Does compliments.json file has to be somehow written as json file? Or I can create new text file in nano and save it as compliments.json file? Does it need any special rights?
      Can you attach your .json file here so I can download and place it in the /compliments/ folder?

      Here is list of my files in compliments folder
      0_1513976348645_prt.jpg

      posted in Troubleshooting
      L
      Lahim
    • RE: remoteFile in compliments module

      I have “ in oryginal file so I just copied it. I also tried with ' but without luck.

      The compliments.json file looks like:

      {
          "anytime" : [
              "Dziala!"
          ],
          "morning" : [
              "Good morning, sunshine!",
              "Who needs coffee when you have your smile?",
              "Go get 'em, Tiger!"
          ],
          "afternoon" : [
              "dfadfafa",
              "dffffffff",
              "fsssss!"
          ],
          "evening" : [
              "2",
              "1",
              "3333"
          ]
      }
      

      In compliments.js

      Module.register("compliments", {
      
              // Module config defaults.
              defaults: {
                      compliments: {
                              anytime: [
                                      "Hey there sexy!"
                              ],
                              morning: [
                                      "Good morning, handsome!",
                                      "Enjoy your day!",
                                      "How was your sleep?"
                              ],
                              afternoon: [
                                      "Hello, beauty!",
                                      "You look sexy!",
                                      "Looking good today!"
                              ],
                              evening: [
                                      "Wow, you look hot!",
                                      "You look nice!",
                                      "Hi, sexy!"
                              ]
                      },
                      updateInterval: 30000,
                      remoteFile: null,
                      fadeSpeed: 4000
              },
      
      
      

      I see the “anytime” are without "
      so I also tried this in …json file but does not work.

      posted in Troubleshooting
      L
      Lahim
    • RE: remoteFile in compliments module

      Guys where can be mistake:
      config.js looks like:

      {
      module: “compliments”,
      position: “lower_third”,
      config: {
      remoteFile: “compliments.json”
      }
      },

      Remote file placed in ~/MagicMirror/modules/default/compliments
      but it still does not work.
      I made all following above written steps and nothing - still oryginal compliments are one the mirror.
      I have no idea what is wrong.

      posted in Troubleshooting
      L
      Lahim
    • 1
    • 2
    • 2 / 2