Jump to content

Programming question


drprm1

Recommended Posts

Posted

I have a few 1-wire sensors run through an Autelis interface to export temperatures into ISY. So far i have only been using programs to push the data (temperatures)  to me at certain times of the day, which it does perfectly.  I would like for it to send me a notification when, for example, the temperature hits 100. I would think this simple program would do it but it wont...


If
        $iTemp_Backyard >= 100
 
Then
        Wait  3 seconds
        Resource 'Current Temp'
 
Else
   - No Actions - (To add one, press 'Action')
 
 

 

I put >= 100 because Autelis is set to check temp every x minutes and I dont want it to maybe skip over the 100..

 

Thanks for the help

Posted

Just to clarify in your program 100 equates to 100'F correct? Because in the Autelis Bridge 100 is actually only 10, 100;F would be 1000 no?

 

I use metric so 20'C comes in the Autelis Bridge as a value of 200.

Posted

Yes, the temperatures (as you know) come in as three digits and, in my case, are kept as state variables then turned into integer variables using a program like this


If
        $sTemp_Backyard_ is $sTemp_Backyard_
 
Then
        $iTemp_Backyard  = $sTemp_Backyard_
        $iTemp_Backyard /= 10
        Run Program 'Temp Backyard High Daily' (If)
        Run Program 'Temp Backyard Low Daily' (If)
        Run Program 'Temp Backyard High Weekly' (If)
        Run Program 'Temp Backyard Low Weekly' (If)
        Run Program 'Temp Backyard High Monthly' (If)
        Run Program 'Temp Backyard Low Monthly' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 
 

Posted (edited)

Integer variables won't trigger programs. In your first, try sTemp_Backyard instead of iTemp_Backyard and adjust the threshold accordingly.

Edited by MWareman
Posted

Be aware that that program will send you a new email every time the temp changes and it is above 99.  So if your x minutes is 15, you will get a notification every 15 minutes potentially.  You might consider using 2 programs.  The first program disables itself once it sends notification, and the second program re-enables the first program once the temp drops down again.  In this example I built in a hysteresis of 2 degrees.

 

Program 1

If

$stemp>=100

then

send notification of temp above 100

disable program 1

 

 

Program 2

If

$stemp <=98

then

enable program 1

Guest
This topic is now closed to further replies.

×
×
  • Create New...