Jump to content

Catbox alert email


timdenike

Recommended Posts

Hey all,

 

Hoping I could get some thoughts on a funny problem..

 

I've got a CatGenie automated catbox. It's connected to a Synchrolinc to sense when it's running. Currently the following program sends me an email whenever it runs.

 

CatGenie Trigger:

if Control 'CatGenie Sensor' is switched On

Then Run Program 'CatGenie Run'

CatGenie Run:

Then:

Disable Program 'CatGenie Trigger'

Set 'CatGenie Exhaust Fan' On

Send Notification to ....

Wait 40 minutes

Set 'CatGenie Exhaust Fan' Off

Enable Program 'CatGenie Exhaust'

 

This works swell, although the email isn't terribly helpful, aside from knowing my CatGenie is working when I'm away.

 

What I'd LOVE is an email only if the CatGenie hasn't run in 9 hours. (Or better yet, 4 hours, with a gap overnight when the CatGenie doesn't run.)

 

Is this getting too advanced? I figured I'd try to solve this externally, but thought I'd try here first.

Link to comment

Hello timdenike,

 

The answer is the use of Wait. As you may know, Wait and Repeat are interruptible. This means that while a program is waiting in the Wait statement, if the condition turns to false, the the program exits and the rest of the statements after Wait are NOT executed.

 

So, if you put a Wait (4 hours) at the beginning of the Then statement for your programs, the ONLY way the rest of the statements after Wait are executed is if and only if the condition has not changed for that duration.

 

With kind regards,

Michel

Link to comment

Aha! That's very helpful. I added the following:

 

CatGenie Alert:

If $Int_1 is 0 # default value

and From 8:00am to 11:59pm (same day) # Time when CatGenie and me sleep.

Then:

Wait 4 hours # will likely tune this higher

Send email # alert me that something's wrong.

 

Added set Int_1 to 1, then a subsequent set Int_1 back to 0 in my CatGenie Run program to abort the previous program. I'll see tomorrow how it goes.

 

Many thanks - this is awesome. It's great to know everything's running smoothly when I'm away - if I get this email, I can have a friend stop by to avert a disaster. :-)

 

Tim

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...