• 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.

MMM-compliment showing evening compliment anytime

Scheduled Pinned Locked Moved Solved Troubleshooting
24 Posts 2 Posters 4.9k 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
    selyjohns @sdetweil
    last edited by Dec 3, 2021, 2:55 PM

    @sdetweil Ok, but i’ve added this configuration because i had the problem with default configuration.
    I can delete it. Normally we don’t need this, right ?

    S 1 Reply Last reply Dec 3, 2021, 2:57 PM Reply Quote 0
    • S Offline
      sdetweil @selyjohns
      last edited by Dec 3, 2021, 2:57 PM

      @selyjohns if u don’t need a different time set, then you would use the default…

      all I was saying is that you have a gap in the time, and the code design demands no gap.

      the code has
      morning
      afternoon
      everything else

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Dec 3, 2021, 3:04 PM Reply Quote 0
      • S Offline
        selyjohns @sdetweil
        last edited by Dec 3, 2021, 3:04 PM

        @sdetweil Ok thank you.
        Trying with no specific configuration -> MM say “goodnight” or “good evening” but it’s only 4 PM
        Trying with specifig configuration with no gap, same result :(

                        {
                                module: 'compliments',
                                position: 'lower_third',
                                config: {
                                        morningStartTime:3,
                                        morningEndTime:12,
                                        afternoonStartTime:12,
                                        afternoonEndTime:18,
                                        remoteFile: 'compliments.json'
                                        }
                        },
        
        S 1 Reply Last reply Dec 3, 2021, 3:09 PM Reply Quote 0
        • S Offline
          sdetweil @selyjohns
          last edited by Dec 3, 2021, 3:09 PM

          @selyjohns what does the remotefile look like?

          I just want the things to the left of :

          default is this

          		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!"],
          			"....-01-01": ["Happy new year!"]
          		},
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Dec 3, 2021, 3:25 PM Reply Quote 0
          • S Offline
            selyjohns @sdetweil
            last edited by Dec 3, 2021, 3:25 PM

            @sdetweil
            Here’s :)

             {
            	"anytime": [
            			"Comment ça va ?",
            			"Bonjour"
            			   ],
            	"morning": [
            			"Un petit café ?",
            			"Bien dormi ?",
            			"Bonne journée !"
            			],
            	"evening": [
            			"Bonne soirée !",
            			"Bonne nuit...",
            			"Agréable soirée"
            			],
            	"day_sunny": [
            			"Le temps est ensoleillé aujourd'hui !",
            			"C'est une belle journée"
            			],
            	"day_cloudy": [
            			"C'est nuageux aujourd'hui..."
            			],
            	"snow": [
            			"Bataille de boules de neige !!!"
            			],
            	"rain": [
            			"N'oublie pas ton parapluie...",
            			"Et si on restait au sec aujourd'hui ?"
            			]
            }
            

            With " as indicated on the readme when using remote file.
            But, i had the problem before using remote file, i’ve do this hoping this would resolve the problem, but it’s dont.

            Is it possible to “remove/reinstall” default module like compliments ?

            S 1 Reply Last reply Dec 3, 2021, 3:28 PM Reply Quote 0
            • S Offline
              sdetweil @selyjohns
              last edited by Dec 3, 2021, 3:28 PM

              @selyjohns said in MMM-compliment showing evening compliment anytime:

              Is it possible to “remove/reinstall” default module like compliments ?

              no, but u can get the original code back (which you shouldn’t have changed)

              do

              cd ~/MagicMirror
              

              check for changed files

              git status
              

              if the compliments module has anything is listed as modified

              git checkout modules/default/compliments/compliments.js   (or whatever filename 
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Dec 3, 2021, 3:32 PM Reply Quote 0
              • S Offline
                sdetweil @sdetweil
                last edited by Dec 3, 2021, 3:32 PM

                @sdetweil ok, looking at the code again, duh

                it takes the time period AND the anytime, mashes them together and then randomly picks one of the list

                so, if u don’t want ‘anytime’ , then remove it… or understand it will happen ‘anytime’

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                S 1 Reply Last reply Dec 3, 2021, 3:48 PM Reply Quote 0
                • S Offline
                  selyjohns @sdetweil
                  last edited by selyjohns Dec 3, 2021, 3:54 PM Dec 3, 2021, 3:48 PM

                  @sdetweil Thank you for your time :)
                  The problem doesn’t concern “anytime” values, but “evening”.
                  Anytime is anytime and it’s normal that compliment in this section can be displayed at anytime…:)

                  Compliments define in “evening” are displayed all the day, not only on the evening. This is my problem. The MM showing evening compliment at anytime…

                  With my exemple, the MM display “Bonne soirée” or “Bonne nuit…”, also the morning, or afternon. Like this compliment was positionned in “anytime”

                  S 1 Reply Last reply Dec 3, 2021, 4:10 PM Reply Quote 0
                  • S Offline
                    sdetweil @selyjohns
                    last edited by Dec 3, 2021, 4:10 PM

                    @selyjohns I copied your compliments to my config, and do not see that

                    the code gets the current system time hour (in 24 hour format)

                    and only uses the evening list if neither morning nor afternoon ranges include the current hour (all OTHER time)

                    then adds anytime if specified to that list

                    then adds weather related if specified

                    then picks one

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    S 1 Reply Last reply Dec 3, 2021, 5:42 PM Reply Quote 0
                    • S Offline
                      selyjohns @sdetweil
                      last edited by selyjohns Dec 3, 2021, 5:42 PM Dec 3, 2021, 5:42 PM

                      @sdetweil
                      Ok, thank you for your test.
                      So maybe a problem on my system time. However it seem to be correct. Another solution to verify that ? (Other than timedatectl ?)

                      Is it possible to have verbose log to see the how the module decide to display compliment ?

                      S 1 Reply Last reply Dec 3, 2021, 6:36 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        11/24
                        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