Announcement

Collapse
No announcement yet.

How to set up virtual device(s) to cleanly accomplish this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set up virtual device(s) to cleanly accomplish this?

    I have a virtual device which toggles between "school day" and "not school day." If it is a weekday AND a school day, then my morning announcements play. If it's a weekend, or a "not school day" then no announcements play.

    this works fine, but I have to manually set school/no school. On long school breaks, it isn't that big a deal. However, when there is a snow day, or even just a 2-hr delay, I sometimes forgot to log in and turn school back on, meaning that we miss the morning announcements on the following day.

    What I would like, I think, is a timer or some other device whereby HS will be set for "no school" for a 24 hour period, then reset itself to "school." This would allow me to hit that button when I hear of a school delay or cancellation the following morning.

    (an even better system would be to have something that would set "no school" for the next WEEKDAY, such that I could toggle something on Friday night, and it would set the following Monday (say, a teacher prep day) as a no school day, but it would be reset to normal for Tuesday.)

    Any hints on how to accomplish this task without too much complication?

    thanks!

    matt


  • #2
    I don't know if this falls under the category of not too much complication, but I have a virtual device that toggles between "school" and "no school" and I set it to "school" every Sunday night and to "no school" on Friday afternoon. I then also have an event that fires at 1AM on the days that there is no school scheduled that sets the device to "no school", ie holidays, in service etc. I have to set up the dates for this event at the beginning of the school year when the calendar comes out.

    Comment


    • #3
      Probably lots of ways of doing this, you will have to determine what works best for you.

      My idea:

      Have the schedule that runs on Friday and Saturday, say at noon (or some other time that seems appropriate, maybe 8am?), that sets "No School".

      Have another schedule that runs Sunday-Thursday that also runs at noon. Have it run another event that sets "School", but only if a counter is zero. If that counter is zon-sero, run an event the decrements it. Now when you want to cancel school, just increment that counter. If you want to cancel school for an entire week, increment the counter five times.

      Comment


      • #4
        1 event.

        Event turns off 'School Bit"
        Then after a delay of 18 hours,
        turns it back on.

        Comment


        • #5
          One event -
          If device X value is "not school day" for at least 18 hours
          Then set device X value to "school day"

          (This is the simple solution, but it only handles most described use case, not all.)

          Comment

          Working...
          X