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.

Creating hysteresis in a program

Featured Replies

Posted

I've got a fireplace with a fan with thermostat, so that the fan automatically turns on when the fire heats up and off when the fire turns off. I've installed a In-LineLinc Relay With Sense inside the fan so I can tell when the fan turns on and off, and have a program that turns on other fans in the room to get the air moving. The problem is that when the thermostat turns off it "jitters" — that is, it turns off-on-off-on-off in a period of about ten seconds. I want my program to block for a short period after the first "off" so it ignores this jitter.

 

However, this is proving harder than I expected. Since the condition is evaluated even if the program is currently running (and apparently restarts), a simple 20 second wait doesn't work. I tried disabling the program at the start and re-enabling it at the end, but somehow the program still gets interrupted, so it doesn't get re-enabled.

 

Is there some trick to make this work?

 

eric

Suggest posting the Program. Right click Program name, select Copy to Clipboard and paste to forum post. The Program If will be reevaluated only while in a Wait or Repeat. A simple Wait 20 seconds to allow the Status to settle down before doing anything functional should have been enough (without Enable/Disable) unless the InLineLinc cycling On/Off is occurring over a period longer than 20 seconds.

eric_allman-

 

Try this:

 

If 
     Status  FireFanSense is On
  and 
    Status OtherFans is Off

Then
   Set Other Fans On

 

 

If 
  Status FireFanSense is Off

Then
  Wait 20 seconds
  Set OtherFans Off

 

Sense has to remain off for 20 seconds before reacting.

 

-Xathros

  • Author

Xathros, thanks for the tip. That worked fine (and is really obvious; I'm somewhat embarrassed). I was able to reduce this to one program by using the "on" part in the Then clause and the "off" part in the Else clause, but other than that it's the same thing. Thanks again.

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.