Jump to content

Programming question


drprm1

Recommended Posts

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

Link to comment

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.

Link to comment

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')
 
 

Link to comment

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

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...