• 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.4k 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 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
    • F Offline
      forjer @sdetweil
      last edited by Dec 31, 2020, 12:29 AM

      @sdetweil Thanks for all of you time and help. You are a wealth of knowledge.
      I’ve only been digging into this thing for a few weeks and I’ve seen so many of your posts helping others. Kudos!

      I like this kind of stuff, I just wish I had better core knowledge so I didn’t spend so much time looking stuff up and tinkering, but I guess that’s one way to learn.

      I have gotten my custom “compliments2” module to work, but still only with integers for time. There’s got to be a simple way to change that. I’ll keep looking.

      S 2 Replies Last reply Dec 31, 2020, 12:52 AM Reply Quote 0
      • S Offline
        sdetweil @forjer
        last edited by Dec 31, 2020, 12:52 AM

        @forjer said in remotecompliments disappeared - please help:

        but still only with integers for time.

        what do u mean?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        F 1 Reply Last reply Dec 31, 2020, 3:06 AM Reply Quote 0
        • S Offline
          sdetweil @forjer
          last edited by Dec 31, 2020, 1:01 AM

          @forjer my son calls me all the time w questions. I don’t know much, but I know how to search, and can usually find an answer pretty quick.

          I do it here too, all the time, writing code, working on install issues. trying to help w modules I don’t know.

          I didn’t know we could run multiple compliments modules concurrently, but I figured it out looking at the code.

          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 forjer Dec 31, 2020, 3:07 AM Dec 31, 2020, 3:06 AM

            @sdetweil said in remotecompliments disappeared - please help:

            @forjer said in remotecompliments disappeared - please help:

            but still only with integers for time.

            what do u mean?

            I mean that by default, compliments only allows defining “morningStartTime” as 5, but I would like to be able to do is define it as 5:35.

            S 1 Reply Last reply Dec 31, 2020, 4:24 AM Reply Quote 0
            • S Offline
              sdetweil @forjer
              last edited by sdetweil Dec 31, 2020, 4:25 AM Dec 31, 2020, 4:24 AM

              @forjer so, allow the start/end time to be hh:mm

              then check and split if contains ‘:’
              make mins default to 00 if not

              // make starttime always have minutes if specified use them, if not use 00
              config.startTime=config.startTime.inclides(':')? config.startTime, config.startTime+':00'
              and then split (split(':') and convert parts to numbers (parseInt())
              var temp = config.startTime.split(':') 
              temp[0] = hours
              temp[1] = minutes
              
              this.afternoonStartHour = parseInt(temp[0])
              this.afternoonStartMinute = parseInt(temp[1])
              

              repeat for all your time windows

              then change the code to compare

              might be able to use moment() before()/after() if u build a moment() value from the time slots.
              I think moment has an isBetween()
              https://momentjscom.readthedocs.io/en/latest/moment/05-query/06-is-between/

              google is your friend

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              F 1 Reply Last reply Dec 31, 2020, 8:23 PM Reply Quote 0
              • F Offline
                forjer @sdetweil
                last edited by Dec 31, 2020, 8:23 PM

                @sdetweil I will have to mess with that when I have more time.

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 3
                • 4
                • 5
                • 5 / 5
                5 / 5
                • First post
                  45/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