Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programming question

Featured Replies

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

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.

  • Author

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

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

Edited by MWareman

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.