No announcement yet.

Modulo & cron function

  • Filter
  • Time
  • Show
Clear All
new posts

  • Modulo & cron function

    I'd like to see some easy trigger that do modulo triggers.
    • A modulo timer that triggers when the timer rolls over, i.e., if timer mod 4 then xxx, which would trigger every 4 seconds.
    • A modulo test that can be applied to how long a device has been in a given state, i.e., if light has been on for mod 60 then xxx, which would trigger every 60 seconds.
    • A modulo counter that can be applied to a counter, i.e., if counter mod 25 then xxx, which would trigger every time the counter was incremented 25 times.
    • Lastly if cron mycron12 then xxx, triggers whenever a cron event triggers.

    I realize that cron is much like schedules but it allows for much finer control that I think schedules do at least for repeating events that care based on several time/date combinations. The cron format should exactly follow the unix standard to make it easily documented and implemented.

    I think that modulo is the most important but getting cron would be icing on the cake.

    Now watch, someone going is tell me that this can be done now and I just didn't find the tests.
    HomeSeer Version: HS3 Standard Edition
    Linux version: Linux auto 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    System Uptime: 9 Days 1 Hour 6 Minutes 33 Seconds | IP Address: | Number of Devices: 421 | Number of Events: 668 | Available Threads: 399 | HSTouch Enabled: True | Event Threads: 13027

    Enabled Plug-Ins: AirplaySpeak | BLBackup | EasyTrigger | 1.3.7006.42100: LiftMaster MyQ | mcsMQTT | PHLocation2 | Pushover 3P | Z-Wave