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-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    Number of Devices: 484 | Number of Events: 776

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

    Z-Net version: 1.0.23 for Inclusion Nodes
    SmartStick+: 6.04 (ZDK 6.81.3) on Server