Rules not running on time

dfwehman

New Member
I have rules to check home and barn sensors each evening that will email me if zones are not ready. I use custom settings to specify the time to run in my IF statement. Barn rule runs at 9PM, house 5 minutes later. This has worked fine for two years. Then the execution time shifted toward11PM, then later and later. I changed the time in the custom settings, no effect. I powered down the M1G and XEP, no effect. I wrote a rule to announce the time at 9PM, works fine. I don't change my configuration but once a year if I add something, and the rules never changed.

How frequently are rules run? If there are multiple rules that have the same time in the IF statement will they each execute? For example, is the time check at the minute or second precision?

Any help appreciated before I rip the rest of my hair out.
 
The M1 rules engine runs continuously. Each rule in the memory is evaluated, and if the conditions are met, the rule is executed. When all the rules have been evaluated, the rules engine starts evaluating them again, from the beginning.

My first thought is that the M1's system clock has drifted from the correct time. Have you checked/replaced the Cr2032 battery on the M1 board? A good battery is necessary for correct time keeping.

Another possibility is that the NTP time server that is configured on the M1XEP (if you have one) no longer exists or has changed its address. This would allow the M1 clock to slowly drift from the correct time due to the slight inaccuracy of a crystal controlled clock.

Neither of these quite fit the fact that your 9pm voice announcement seems to execute on time. But I would check the battery and NTP first just to eliminate them as possible causes.
 
The M1 rules engine runs continuously. Each rule in the memory is evaluated, and if the conditions are met, the rule is executed. When all the rules have been evaluated, the rules engine starts evaluating them again, from the beginning.

My first thought is that the M1's system clock has drifted from the correct time. Have you checked/replaced the Cr2032 battery on the M1 board? A good battery is necessary for correct time keeping.

Another possibility is that the NTP time server that is configured on the M1XEP (if you have one) no longer exists or has changed its address. This would allow the M1 clock to slowly drift from the correct time due to the slight inaccuracy of a crystal controlled clock.

Neither of these quite fit the fact that your 9pm voice announcement seems to execute on time. But I would check the battery and NTP first just to eliminate them as possible causes.
Thanks for your reply, it helps to understand how the rules engine works.

Saga gets deeper. Upon reviewing the rules (retreived from the system), the descriptions of the rules were out of sync with the actual rule content. I assume the description and rules are in separate columns in a database, pointers may have corrupted? In any case a) that wouldn't cause my issue, and b) I have corrected them all in ElkRP and pushed them back to the system.

It seems that my rules are now executing on time, but the emails they are sending are not going out. Checked the Elk log, no issues there. I reset the gmail password in my XEP, and using the trace and test button, the email service is working and completes successfully. However, when the rule executes, I see no email activity in the XEP log, and no activity on my gmail account. Hair loss continues!
 
I'm not sure if this is the case, but Google may be blocking your Elk from sending emails.

 
As BSR suggests, if you create a new event that sends an email, does that work?

I am not suggesting that you are there yet, but I recently had an issue that made no sense. My counters would not work - events would not change counter values no matter what I did. After contacting ELK, they suggested that something was corrupted and told me how to "reset" the panel to factory default and reload my configuration from RP. After doing so, the counters work fine again.
 
It appears the problem may be with Verizon. I saw a message on the Elk support forum that's what I'm seeing. Sending to [email protected] to get a text appears to have unreliable delivery. When I send it to my email it works fine. Now, how to troubleshoot Verizon...
 
I'm almost certain Verizon is blocking that. This was the reason I went with the Pushover plugin, but I'm using HomeSeer for that.

Pushover is a bit more involved as you have to pay for this, then setup the client on your phones, then create an email that will go to the phones as a 'pushed' message. It does have a 30 day free trial. The only thing I've noticed is sometimes the notifications happen after a bit of a delay from the event.


Others here may have a different solution.
 
I had my rule send to vtext, vzwpix,and my email. Only the email is reliable. Tried to create a forward filter for my email, but the validation step fails. Ugh.
 
I had my rule send to vtext, vzwpix,and my email. Only the email is reliable. Tried to create a forward filter for my email, but the validation step fails. Ugh.
I send lots of emails to vzwpix, both text and images, but not from the XEP.
Suspect your problem is there.

For 20+ years was using my local email server (sendmail then qmail), but in the last few years more and more receivers kept getting picky about who was sending. Relayed email through my ISP for a couple of years until they cut that off.

3/2024 switched to smtp2go.com to relay mail. Was already using EmailRelay (sourceforge) , so configed qmail to forward everything there, and configed emailrelay to send everything to smtp2go, and smtp2go does the delivery.
Worked great for regular mail, except my email server was rejecting incoming status messages as spam because they were so short, like the one liner you would have coming from the XEP. So configed the status messages to go directly to emailrelay.
Convoluted, but its been working great.

Spammers and scammers are why we can't have things simple any more.
 
Back
Top