• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

remotecompliments disappeared - please help

Scheduled Pinned Locked Moved Troubleshooting
47 Posts 2 Posters 8.5k Views 2 Watching
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.
  • S Offline
    sdetweil @forjer
    last edited by sdetweil Dec 29, 2020, 12:56 PM Dec 29, 2020, 12:54 PM

    @forjer the default compliments module can be used multiple times without problem. you either pass the compliments as config parms or in a remotefile as config parm

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    F 1 Reply Last reply Dec 29, 2020, 11:40 PM Reply Quote 0
    • F Offline
      forjer @sdetweil
      last edited by forjer Dec 29, 2020, 11:40 PM Dec 29, 2020, 11:40 PM

      @sdetweil So are you saying I can run two instances of compliments at the same time, shown in two different locations on the same display? And is this done by copying the compliments.js to make a “compliments2.js”?

      S 1 Reply Last reply Dec 30, 2020, 2:03 AM Reply Quote 0
      • S Offline
        sdetweil @forjer
        last edited by Dec 30, 2020, 2:03 AM

        @forjer yes, two instances, no need to copy the module

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • F Offline
          forjer
          last edited by forjer Dec 30, 2020, 2:28 AM Dec 30, 2020, 2:13 AM

          @sdetweil I’m sorry, I’m a little slow. And this is making my brain hurt. I really appreciate your patience with me.

          How would this look in config.js? And how does it know which compliments go in what position of the MM?

          What I’m after is a normal compliments module running in lower_third, and a second compliments module sliced into 10 time slots with a different set of compliments running in upper_third. I’ve just finished modifying the default compliments.js to get my 10 time slots and that seems to work, so I’m getting closer.

          S F 2 Replies Last reply Dec 30, 2020, 3:16 AM Reply Quote 0
          • S Offline
            sdetweil @forjer
            last edited by Dec 30, 2020, 3:16 AM

            @forjer modifying?

            no need to modify ( never modify module source code)

            code two modules wherever u want.
            put the compliments text in the config block in config.js

            I am on my phone so everything but the actual compliments

            {
                 module:"compliments",
                 position:"lower_third",
                 config:{
                       compliments:{
                             same as in defaults section of code
                             whatever  compliments for module 1
                       }
                       OR
                        remotefile:"http://....... somefile on some server"
                 }
            },
            {
                 module:"compliments",
                 position:"upper_third",
                 config:{
                       compliments:{
                             same as in defaults section of code   
                             whatever  compliments for module 2
                        }
                 }
            }
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • F Offline
              forjer @forjer
              last edited by Dec 30, 2020, 3:23 AM

              @sdetweil Progress. So I saved a copy of my modified compliments.js into a compliments2 folder as compliments2.js and renamed module.register to compliments2. I then reverted my compliments.js back to original. I then added a compliments2 section into my config.js. And now I have two separate compliments running! I tried that a few hours ago but I must have done something wrong so it didn’t work.

              In the way you coded it, would I be able to have the ability to run Module 1 with the default time slots (complimentArray) while Module 2 runs a different time slot schedule?

              Now I think I’d like to get a remotefile set up but I’m guessing I’ll run into some issue with remotefile for my compliments2.

              F 1 Reply Last reply Dec 30, 2020, 3:57 AM Reply Quote 0
              • F Offline
                forjer @forjer
                last edited by Dec 30, 2020, 3:57 AM

                @sdetweil Also, is there a way to get my compliments2 to allow time splits at say 11:30 instead of just integer hours? Something like the following?

                afternoonStartTime: 11:30,
                afternoonEndTime: 13,
                

                It would appear the complimentArray would need to be adjusted by changing “hour” to something else?

                } else if (hour >= this.config.afternoonStartTime && hour < this.config.afternoonEndTime && this.config.compliments.hasOwnProperty("afternoon")) {
                	compliments = this.config.compliments.afternoon.slice(0);
                
                
                S 3 Replies Last reply Dec 30, 2020, 4:03 AM Reply Quote 0
                • S Offline
                  sdetweil @forjer
                  last edited by Dec 30, 2020, 4:03 AM

                  @forjer read the doc

                  u can have different remotefiles too

                  https://docs.magicmirror.builders/modules/compliments.html

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @forjer
                    last edited by sdetweil Dec 30, 2020, 3:20 PM Dec 30, 2020, 3:15 PM

                    @forjer if u need 10 time slots, then the compliments module would need changing as u might already have done. u should change your own copy, and then use that

                    from the modules folder
                    cp defaults/compliments mycompliments
                    have to change the module register at the top to be the same as the folder name u create on the copy

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @forjer
                      last edited by Dec 30, 2020, 3:21 PM

                      @forjer looks like the default time slots are hour based. so another reason to make your own

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      F 1 Reply Last reply Dec 31, 2020, 12:29 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 4 / 5
                      4 / 5
                      • First post
                        36/47
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy