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 14.0k 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

      @forjer yeh. so the setup has probably expired

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      F 1 Reply Last reply Reply Quote 0
      • F Offline
        forjer @sdetweil
        last edited by

        @sdetweil So are you saying I should delete the Token.json file from /home/pi/MagicMirror/modules/MMM-RemoteCompliments/Drive and run node setup which will re-run the Setup.js script?

        1 Reply Last reply Reply Quote 0
        • F Offline
          forjer @sdetweil
          last edited by

          @sdetweil I deleted the Token.json file and ran node Setup in the RemoveCompliments/Drive folder and was successful in re-completing the setup (following link, pasting code), but there was no change in function…RemoteCompliments is MIA…no header or anything.

          1 Reply Last reply Reply Quote 0
          • F Offline
            forjer
            last edited by

            FWIW, I’m also running the default Compliments in the lower_third position. I’ve swapped positions between Compliements and RemoteCompliments and the result of that is Compliments works in both positions, RemoteCompliments doesn’t work in either position.

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

              @forjer and the pm2 log?

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              F 2 Replies Last reply Reply Quote 0
              • F Offline
                forjer @sdetweil
                last edited by

                @sdetweil

                pi@raspberrypi:~ $ pm2 logs
                [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
                /home/pi/.pm2/pm2.log last 15 lines:
                PM2        | 2020-12-28T21:29:05: PM2 log: pid=22698 msg=process killed
                PM2        | 2020-12-28T21:29:05: PM2 log: App [MagicMirror:0] starting in -fork mode-
                PM2        | 2020-12-28T21:29:05: PM2 log: App [MagicMirror:0] online
                PM2        | 2020-12-28T21:29:50: PM2 log: Stopping app:MagicMirror id:0
                PM2        | 2020-12-28T21:29:51: PM2 log: pid=23236 msg=failed to kill - retrying in 100ms
                PM2        | 2020-12-28T21:29:51: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT]
                PM2        | 2020-12-28T21:29:51: PM2 log: pid=23236 msg=process killed
                PM2        | 2020-12-28T21:29:51: PM2 log: App [MagicMirror:0] starting in -fork mode-
                PM2        | 2020-12-28T21:29:51: PM2 log: App [MagicMirror:0] online
                PM2        | 2020-12-28T21:46:00: PM2 log: Stopping app:MagicMirror id:0
                PM2        | 2020-12-28T21:46:00: PM2 log: pid=23422 msg=failed to kill - retrying in 100ms
                PM2        | 2020-12-28T21:46:00: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT]
                PM2        | 2020-12-28T21:46:01: PM2 log: pid=23422 msg=process killed
                PM2        | 2020-12-28T21:46:01: PM2 log: App [MagicMirror:0] starting in -fork mode-
                PM2        | 2020-12-28T21:46:01: PM2 log: App [MagicMirror:0] online
                
                /home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
                /home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
                0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                0|MagicMir | 
                0|MagicMir | [2020-12-28 21:46:04.542] [LOG]    Starting MagicMirror: v2.13.0
                0|MagicMir | [2020-12-28 21:46:04.557] [LOG]    Loading config ...
                0|MagicMir | [2020-12-28 21:46:04.568] [LOG]    Loading module helpers ...
                0|MagicMir | [2020-12-28 21:46:04.571] [LOG]    No helper found for module: clock.
                0|MagicMir | [2020-12-28 21:46:07.600] [LOG]    Initializing new module helper ...
                0|MagicMir | [2020-12-28 21:46:07.601] [LOG]    Module helper loaded: MMM-RemoteCompliments
                0|MagicMir | [2020-12-28 21:46:07.602] [LOG]    All module helpers loaded.
                0|MagicMir | [2020-12-28 21:46:07.798] [LOG]    Starting server on port 8080 ... 
                0|MagicMir | [2020-12-28 21:46:07.819] [LOG]    Server started ...
                0|MagicMir | [2020-12-28 21:46:07.821] [LOG]    Connecting socket for: MMM-RemoteCompliments
                0|MagicMir | [2020-12-28 21:46:07.825] [LOG]    Starting node helper for: MMM-RemoteCompliments
                0|MagicMir | [2020-12-28 21:46:07.826] [LOG]    Sockets connected & modules started ...
                0|MagicMir | [2020-12-28 21:46:07.960] [LOG]    Launching application.
                
                
                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @forjer
                  last edited by

                  @forjer sorry, I’ve run out of everything to look for. the error is gone now…

                  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 @sdetweil
                    last edited by

                    @sdetweil In my developer log it mentions “RemoteCompliments: ‘MODULE_DOM_CREATED’ received: null” and “module.js:199 MMM-RemoteCompliments is suspended.” Is that a clue? It just doesn’t make sense. I tested it yesterday morning by putting in a really long compliment just to see how it looked on the screen. I then reverted it back to a short compliment. Later in the morning I did a sudo apt-get update and a sudo apt-get upgradejust before setting up remote desktop, VNC and pitunnel. Those are the only other things that I can think of where I changed some stuff.

                    developers window

                    Load script: modules/MMM-RemoteCompliments//MMM-RemoteCompliments.js
                    module.js:513 Module registered: MMM-RemoteCompliments
                    loader.js:148 Bootstrapping module: MMM-RemoteCompliments
                    loader.js:176 Load script: modules/MMM-RemoteCompliments//scripts/jquery-3.3.1.min.js
                    loader.js:153 Scripts loaded for: MMM-RemoteCompliments
                    loader.js:155 Styles loaded for: MMM-RemoteCompliments
                    loader.js:157 Translations loaded for: MMM-RemoteCompliments
                    loader.js:195 Load stylesheet: css/custom.css
                    :8080/modules/default/clock//clock.js:46 Starting module: clock
                    main.js:508 All modules started!
                    :8080/modules/MMM-RemoteCompliments//MMM-RemoteCompliments.js:222 MMM-RemoteCompliments: 'MODULE_DOM_CREATED' received:  null
                    module.js:199 MMM-RemoteCompliments is suspended.
                    

                    Are there any other (perhaps more stable) modules where I can display a custom message (compliment) depending on the time of day? I had about 10 compliments programmed to display at their specified time slots throughout the day. And I liked the ability to control / override them easily with my phone via Google Drive.

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

                      @forjer the code and comments

                      // Hide module on startup. 
                      			// If the module receives data, the module will reveal itself.
                      			self.hide(0);
                      			self.hidden = true;
                      

                      which is reasonable, but it just reinforces no data.

                      sorry no idea on another module that does this other than the default compliments module with remotefile

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      F 1 Reply Last reply Reply Quote 0
                      • F Offline
                        forjer @sdetweil
                        last edited by

                        @sdetweil Hmm…is there a simple way to hard code in a RemoteCompiment to force it to show? Just as a troubleshooting step to see it?

                        I guess I could consider the default compliments with remote file. Can I run a second default compliment module at the same time? Is it as simple as copying the folders and renaming them “compliments2” or something?

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

                          @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 Reply Quote 0
                          • F Offline
                            forjer @sdetweil
                            last edited by forjer

                            @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 Reply Quote 0
                            • S Offline
                              sdetweil @forjer
                              last edited by

                              @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

                                @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 Reply Quote 0
                                • S Offline
                                  sdetweil @forjer
                                  last edited by

                                  @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

                                    @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 Reply Quote 0
                                    • F Offline
                                      forjer @forjer
                                      last edited by

                                      @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 Reply Quote 0
                                      • S Offline
                                        sdetweil @forjer
                                        last edited by

                                        @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

                                          @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

                                            @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 Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              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