• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ideas for replacement of datetime protocol
#17
This doesn't look bad. A few first thoughts though:

Rules for random weekdays (now 0 through 6) will become complicated when working with day names.
e.g

Code:
IF datetime.weekday == RANDOM(0,6) THEN...

Or doing things only during workingdays:

Code:
IF datetime.weekday > 1 THEN...

Triggering rules at given intervals too (eg. once every 10 minutes):

Code:
IF (datetime.minute % 10) == 0 THEN...

I have no doubt that your idea can be extended to cater for things like this.

I will scan the time based rules I actually am using now and see how those could be rewritten based on your idea. I  fear that such rules will become quite a bit longer than they already are are now.
 
Reply
  


Messages In This Thread
RE: Ideas for replacement of datetime protocol - by Niek - 07-03-2018, 02:16 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  program protocol missing in rewrite Niek 1 614 10-07-2017, 08:55 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)