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.

    (2.1.1) Options of Clock broadcast event

    Scheduled Pinned Locked Moved Upcoming Features
    5 Posts 3 Posters 3.3k 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.
    • slametpsS Offline
      slametps
      last edited by

      I use 3 time-based modules (Scheduler, AlarmClock, PrayerTime). Each module implement internal timer to check current time if there is a trigger an event. IMO, it will more efficient if the module use a broadcast event from Clock module (every minute and/or every hour, each configured through config.js) to trigger particular event in the user module. The Clock broadcast event will contain date (MM/DD/YYYY) and time (hh : mm : ss) minimally.
      @MichMich : What do you think?

      regards,

      Slamet PS

      strawberry 3.141S 1 Reply Last reply Reply Quote 0
      • strawberry 3.141S Offline
        strawberry 3.141 Project Sponsor Module Developer @slametps
        last edited by

        @slametps This would mean that every user has to use the clock module. It is not like the alert module which doesn’t have an ui. The event would trigger every module also the hidden ones. As some modules would need broadcasts every second the performance would be worse.

        Please create a github issue if you need help, so I can keep track

        slametpsS 1 Reply Last reply Reply Quote 0
        • slametpsS Offline
          slametps @strawberry 3.141
          last edited by slametps

          @strawberry-3.141 : so, implement broadcast event in Clock is not efficient rather than module internal timer? I mean, it is an on/off option. User can activate clock broadcast event if required.

          regards,

          Slamet PS

          brobergB 1 Reply Last reply Reply Quote 0
          • brobergB Offline
            broberg Project Sponsor @slametps
            last edited by

            If you need re-occuring events isnt the calendar a better option? I do believe the calendar already has the option to send notifcations on calendar events.

            slametpsS 1 Reply Last reply Reply Quote 0
            • slametpsS Offline
              slametps @broberg
              last edited by

              @broberg : the requirement is not like that. The original idea is module internal timer with 1 second interval for example, can be replaced with event from the clock. The module no longer required to implement the timer itself.

              regards,

              Slamet PS

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • 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
                OSZAR »