by support » Sun Aug 25, 2013 6:12 pm
Hi Todd,
Thanks for your feedback. You can get into a continuous notifications loop when
one of the status sensors trips from an open -> closed -> open -> closed, continuously.
This typically happens when using the following status sensing strategies:
STATUS_STRATEGY_3VCLOSED_5VOPENED
STATUS_STRATEGY_5VCLOSED_3VOPENED
These rely on an analogRead() operation instead of the newer and more
accurate digitalRead() operation. Analog reads can sometimes "fluke" so they
are not the best. If you must absolutely use one of those older strategies, you might
want to tune and tweak the STATUS_OPEN_TRESHOLD value as this is what will be
used by the analogRead() to report an open or closed status. Its value should be
between 0 and 1023. Play with that value until you reach your sweet spot.
But again, if you can, you'd be better off switching to one of the newer
status sensing strategies:
STATUS_STRATEGY_NORMALLY_CLOSED
STATUS_STRATEGY_NORMALLY_OPENED
Those rely on digitalRead() and will accurately report either 0 or 1, spot on,
with no ambiguity.
Best regards,