WebCore Stays vs Remains difference?

I made using a piston with Remains Below but I noticed there was no Time var as I would expect.
I have changed to Stays as it has a time var giving the expected retest window.
How does Remains differ?

Take a look here.

Thanks. I did read this help file earlier but I still didn't clue in to what "present" use would look like.
Is it comparing a current trigger with the previous trigger to see it it remains the same or not?
That almost sounds like the past definition.

I just wanted to clarify the use case difference between:
If device stays above 100 for 10 minutes then (has a time window variable) and
If device remains above 100 (no time so what is it referencing for a decision?)

  • past (see below)
  • present (these are tracking triggers like changes*, drops*, remains*, rises*, enters*, exits*)
  • future (see above - stays*)

@nh.schottfam

remains above (and rises) are using the device readings (when they occur) as the time portion ie the reported event times

so remains_above is (this device reading and the last device reading are > compval) (where there is a subscription on the device:attribute being checked)

 return oldValue!=null && oldValue>compval && curval>compval

where

  • oldValue is the last reading of of the device
  • curval is the current reading of the device
  • compval is your comparison value for remains above.

It does sound like you want stays as your comparison.

1 Like

Thanks. Sort of what I guessed might be the case.
Another snippet of wisdom to my WC notes file!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.