We have moved at community.getvera.com

Author Topic: Fault Tolerant Schedules  (Read 2343 times)

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Fault Tolerant Schedules
« on: March 01, 2015, 06:35:27 am »
Folks,
   When you use ABSOULTE time schedules there is a chance that the schedule will NOT fire because Vera was off/reloading/rebooting at the time.
   
   One way to work around this is to have a second timer  Fail Safe timer. I would schedule it for a couple of minutes after the first one.  Then a Fail Safe condition would fix it, so the rest of your logic will work normally.

Input Schedule:
NormalTimer                    On at 6:00:00   Off at  20:00:00
FailSafeTimer                   On at 6:00:03   Off at  20:00:03

Condition:
FailSafeCondition            NormalTimer != FailSafeTimer

Action:
FailSafeCondition            Using Advanced Tab
                                              Device: This PLEG Device
                                              Action: ToggleTimer
                                              TimerName:   NormalTimer

ToggleTimer is what "Do it now" uses.
NOTE: That the delta time needs to be longer than than the "Vera Not Running" time. If you often have power outage of 5 minutes you might want to make the delta time 10 minutes.
NOTE: That the Status command will show you the last time you had a Failed Timer start (Last true time for FailSafeCondition).

I will think about building this into PLEG.

Offline Bobhaskils

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-1
Re: Fault Tolerant Schedules
« Reply #1 on: March 12, 2015, 09:37:19 am »
Thanks Richard. Understand a different approach to eliminate Vera missing timer operation is by setting a schedule with start time and an interval of time instead of end time. In this case when Vera restarts the Pleg checks the condition and operation executed. Please confirm.

Yet another issue is the Toggle Timer at the advanced tab - what does it do? How is it used with PLEG?
I'm looking for way to end a timer - will try to explain the need...
I have 2 Led lights that are operated through 3 relays by a single switch (the switch activate the first relay on and off in a sequence such that 2 other relays activate the 2 Led lights) . In order for the relays not to get heated I have put some conditions with timers to swap the relays after a certain time. In case the light is turned off (through a virtual switch) a condition operates the switch to activate the relays so that the light will go off. Sometimes this happens while the timer for a specific relay (say relay 3) is still active. Now if for some reason the light is re activated I would like the other relay (#2) (and timer) To start. I'm looking for a way to end the timer of relay 3 when the light is off.
Hope this is somehow clear. Could the Toggele relay be used in this case?
Thanks.

Offline resq93

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +0/-2
Re: Fault Tolerant Schedules
« Reply #2 on: November 08, 2017, 04:39:45 pm »
Folks,
   When you use ABSOULTE time schedules there is a chance that the schedule will NOT fire because Vera was off/reloading/rebooting at the time.
   
   One way to work around this is to have a second timer  Fail Safe timer. I would schedule it for a couple of minutes after the first one.  Then a Fail Safe condition would fix it, so the rest of your logic will work normally.

Input Schedule:
NormalTimer                    On at 6:00:00   Off at  20:00:00
FailSafeTimer                   On at 6:00:03   Off at  20:00:03

Condition:
FailSafeCondition            NormalTimer != FailSafeTimer

Action:
FailSafeCondition            Using Advanced Tab
                                              Device: This PLEG Device
                                              Action: ToggleTimer
                                              TimerName:   NormalTimer

ToggleTimer is what "Do it now" uses.
NOTE: That the delta time needs to be longer than than the "Vera Not Running" time. If you often have power outage of 5 minutes you might want to make the delta time 10 minutes.
NOTE: That the Status command will show you the last time you had a Failed Timer start (Last true time for FailSafeCondition).

I will think about building this into PLEG.

Richard, was this ever built into newer versions of PLEG - this issue is a (too) frequent occurrence for me and I'm sure for others as well.

Thanks,

M

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: Fault Tolerant Schedules
« Reply #3 on: November 08, 2017, 09:33:48 pm »
I need to write some test code and see if MCV provided the api change needed to fix this problem.
They told me they would add it (it should have only been a couple line change to their code.)
If they have I will make the PLEG changes needed to make absolute schedules work in the context of a restart.

Offline resq93

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +0/-2
Re: Fault Tolerant Schedules
« Reply #4 on: November 09, 2017, 01:09:50 pm »
That would be amazing. Thank you. (assuming this would work on schedules tied to sunset/sunrise as well?

Thanks,

M

Offline resq93

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +0/-2
Re: Fault Tolerant Schedules
« Reply #5 on: December 10, 2017, 11:39:06 am »
Folks,
   When you use ABSOULTE time schedules there is a chance that the schedule will NOT fire because Vera was off/reloading/rebooting at the time.
   
   One way to work around this is to have a second timer  Fail Safe timer. I would schedule it for a couple of minutes after the first one.  Then a Fail Safe condition would fix it, so the rest of your logic will work normally.

Input Schedule:
NormalTimer                    On at 6:00:00   Off at  20:00:00
FailSafeTimer                   On at 6:00:03   Off at  20:00:03

Condition:
FailSafeCondition            NormalTimer != FailSafeTimer

Action:
FailSafeCondition            Using Advanced Tab
                                              Device: This PLEG Device
                                              Action: ToggleTimer
                                              TimerName:   NormalTimer

ToggleTimer is what "Do it now" uses.
NOTE: That the delta time needs to be longer than than the "Vera Not Running" time. If you often have power outage of 5 minutes you might want to make the delta time 10 minutes.
NOTE: That the Status command will show you the last time you had a Failed Timer start (Last true time for FailSafeCondition).

I will think about building this into PLEG.

Richard, was this ever built into newer versions of PLEG - this issue is a (too) frequent occurrence for me and I'm sure for others as well.

Thanks,

M

Not sure what im doing wrong: I have the following

day              on 0500 off at 1700
x5am           on 0505 off at 1705

am_failsafe set to (day!=x5am)

set the action to include an alert so i can watch it.

It triggers every day at both 5a and 5:05 (and 17:00 and 17:05)

what am i doing wrong?
« Last Edit: December 11, 2017, 10:53:35 am by resq93 »

Offline tbully

  • Sr. Member
  • ****
  • Posts: 285
  • Karma: +1/-1
Re: Fault Tolerant Schedules
« Reply #6 on: January 24, 2018, 03:39:55 pm »
Recently had a reboot (I assume) event a few times and missed a schedule.

I've read a lot about moving to interval timers instead and may do that.

However, I then came across this thread where a "fix" may be in the works.  I thought I'd check in on the status before updating all of my schedules/logic.

Thanks!

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: Fault Tolerant Schedules
« Reply #7 on: January 25, 2018, 10:34:27 am »
MCV has not notified me that they made the change ... but they have made the change ... I will test and them make the appropriate PLEG changes.

Offline tbully

  • Sr. Member
  • ****
  • Posts: 285
  • Karma: +1/-1
Re: Fault Tolerant Schedules
« Reply #8 on: January 25, 2018, 10:36:13 am »
Thanks, RTS.   I'll stand-by for the time-being. 

Happy to change my logic later if this doesn't work out.

Appreciate the update.

Offline resq93

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +0/-2
Re: Fault Tolerant Schedules
« Reply #9 on: January 25, 2018, 11:45:58 am »
This would be an amazing addition. Thanks!

Offline resq93

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +0/-2
Re: Fault Tolerant Schedules
« Reply #10 on: February 07, 2018, 09:12:43 am »
MCV has not notified me that they made the change ... but they have made the change ... I will test and them make the appropriate PLEG changes.

Has this been updated?

Thank you

M

Offline tbrock47

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +1/-1
Re: Fault Tolerant Schedules
« Reply #11 on: February 22, 2018, 02:38:35 pm »
Following this topic.

Offline resq93

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +0/-2
Re: Fault Tolerant Schedules
« Reply #12 on: March 08, 2018, 10:40:15 am »
Richard,

Do you think this will be incorporated soon? Lost power in the storm and all schedules (many) needed to be toggled by hand for everything to work again.

Much appreciated along with all your other work on this platform.

m

Offline resq93

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +0/-2
Re: Fault Tolerant Schedules
« Reply #13 on: October 22, 2018, 01:19:03 pm »
MCV has not notified me that they made the change ... but they have made the change ... I will test and them make the appropriate PLEG changes.

Hi Richard - any progress on this? Would love to have this feature incorporated soon.

Ty
M