Survive a reboot

Discuss the Timers and Pesters plugin.
lalisingh
Posts: 166
Joined: Tue Mar 27, 2007 10:07 pm
Contact:

Survive a reboot

Post by lalisingh »

Forgive me if this has been answered.

How fo you have a timer state survive a reboot.
[url]https://www.VillageWorker.com[/url]
Extreme data analytics, Sensing, Control integration work.
Indigo • Barix • Kentix • Mobotix • Mikrotik • Apple
User avatar
matt (support)
Site Admin
Posts: 21501
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Survive a reboot

Post by matt (support) »

I don't believe there is a good/simple solution to this. Currently upon server startup all device Timers are reset to the inactive state. I'll talk to Jay and we'll consider adding a device level property, like "Preserve timer status across restarts", that let's the user specify at the device level what behavior they want.
Image
lalisingh
Posts: 166
Joined: Tue Mar 27, 2007 10:07 pm
Contact:

Re: Survive a reboot

Post by lalisingh »

Thanks Matt,

Managing occupancy triggers is my crtical use case for timers. Having the timers survive a power flicker is important.

Workaaround is using variables ofcourse.
[url]https://www.VillageWorker.com[/url]
Extreme data analytics, Sensing, Control integration work.
Indigo • Barix • Kentix • Mobotix • Mikrotik • Apple
User avatar
FlyingDiver
Posts: 7355
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Survive a reboot

Post by FlyingDiver »

lalisingh wrote:Thanks Matt,

Managing occupancy triggers is my crtical use case for timers. Having the timers survive a power flicker is important.

Workaaround is using variables ofcourse.
A better workaround is to put the Indigo server on a UPS.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
kw123
Posts: 8463
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Survive a reboot

Post by kw123 »

In pibeacon plugin nothing gets set to off in the first 90 seconds after start of plugin.

That should cover any restart reboot timing issues.

Karl


Sent from my iPhone using Tapatalk
Vaillant
Posts: 105
Joined: Sun Nov 06, 2011 7:56 am
Location: Belgium

Re: Survive a reboot

Post by Vaillant »

Has this ever been resolved?

On restart Timers are reset to the inactive state.
This triggers a few actions for me.
Problem is that the external plugins are not loaded yet so I get errors.

I prevent the errors using Event Timer Expired in my triggers.
However I do somehow want to trigger my actions when the external plugins are loaded and set to inactive.

So: Timer Test Active > Restart > Trigger Timer Test > Execute Action External Plugin

Adrian
User avatar
jay (support)
Site Admin
Posts: 18479
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Survive a reboot

Post by jay (support) »

We haven't done any work on this. TBH, the priority is quite low compared to many other things.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
whmoorejr
Posts: 768
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Survive a reboot

Post by whmoorejr »

One thing I love about indigo.... there is a way to do everything any anything.

First, i'll +1 on the UPS comment. That will close the gap on any power flickers. Aside from that...

It sounds like the trick is knowing the state of each device prior to a power outage. You may be able to get close.

Step one:
A couple variables for each timer device that are updated with the timer state and timestamp of the statechange.

Step two:
"Indigo Server Startup" trigger. When fired, it does three things:
1) Set a variable, "Server_Startup" to "true"

(all your other triggers you will need to add the condition, "Server_Startup" = "false" )

2) Use the data from the variables in step one to put all the timer devices into the correct state. The documentation on this plugin is good enough, you should be able to get them going with a script. Use datetime python math to get new timer start times, set device states, etc.

now all the devices should be back in sync with where they should be.

3) delay action on the same trigger to change the variable, "Server_Startup" to "false"

Something like that (depending on your case use), might get you in the ball park.
Bill
My Plugin: My People
User avatar
kw123
Posts: 8463
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Survive a reboot

Post by kw123 »

The sql plugin stores that info for each dev/state and variable.

And the plugin utilities supports an action that triggers after indigo start and and an action that triggers at indigo shutdown

Karl.
Sent from my iPhone using Tapatalk
Post Reply

Return to “Timers and Pesters”