denis-stepanov/esp-ds-system

Add support for time-based events

Closed this issue · 1 comments

Having NTP-synchronized time allows easy triggering time-based events, such as turning on a lamp at a given time. However, making these times configurable at runtime is a notoriously complex piece of coding (like 10 times more code than the actual useful action). The task would be to add such support and make it generic enough to be reusable. It should include:

  1. web interface to enter desired events;
  2. saving these settings on flash disk;
  3. seamless runtime support for event execution.

Reusable design would require a user to pass a list of actions in the form:

  • action label;
  • action handler.

Bonus feature would be support for sunrise/sunset event (could be done as a separate ticket).

Feature merged on master today; documentation to follow. Sunrise/sunset events are supported too. Resolving.