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.

"not switched off" doesn't seem to work in program

Featured Replies

Posted

I have a bathroom light that I turn on when the program "bathroom motion flag" is true and the light is off. I also have logic I had hoped would keep it from going on if it's just been turned off but that part doesn't work.

 

my logic is:

 

if status "bathroom motion flag" is true

and status "bathroom light" is off

and control "bathroom light" is not switched off

and control "bathroom light is not switched fast off

then set "bathroom light" to 80%

 

as I leave the room whether I press "off" or "fast off", the light does go off but then goes back on within seconds.

 

the "flag" is set by homeseer, which accesses the DSC alarm panel that knows about the bathroom motion sensor. I deliberately delay setting the flag to false to minimize comm traffic so it will always be true for a period of time after motion has stopped but as I understand it that shouldn't matter with respect to turning the light off at the switch.

 

but then again it isn't working as I understand it should be working.

 

any help would be appreciated.

I wonder if there is not a slight logic problem in your program. Using "AND" construct, all conditions would have to simultaneously be true for the program to be true. I suspect it is hard to have a simultaneous "off" and "fast off". Try:

 

if status "bathroom motion flag" is true 
and status "bathroom light" is off 
and
(
control "bathroom light" is not switched off 
or control "bathroom light is not switched fast off 
)
then set "bathroom light" to 80% 

  • Author

Thanks for the reply.

 

I know the logic works to turn the light on (since it's the only program I have to turn the light on)

 

If I didn't know better (and I guess yesterday I didn't) I'd say that ISY was not recognizing that I've switched the light off (or fast off) but I'm realizing it's that the condition gets re-evaluated immediately after I clicked off (or fast off) because the light status changes from on to off; it then sees all conditions as true again and turns the light on again. In other words it has, within milliseconds, completely "forgotten" about the off or fast off event. It's brilliantly logical but not as intuitive as I might have liked.

 

I've created a second program for "switched off" OR "switched fast off" that disables my first program, resets my bathroom motion flag, waits 2 seconds and re-enables the first program.

 

Now everything works fine.

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.