Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

Vinod on React error

$
0
0

It turns out the "Run action only the first time the condition is met" react has a built in reset mechanism. Here's how the reacts with "Run action only the first time the condition is met" actually works:

Let's say you have configured a react to "Run action only the first time the condition is met" that uses the ThingTweet app to tweet something when channel 99999's field1 value is above 100. The react will be fired the first time the value exceeds 100. Any continuous subsequent values posted to the field1 of channel 99999 that are above a 100 do not trigger the react. The first value that is below 100 will reset the react condition such that a subsequent value above 100 will trigger the react.

If channel 99999's field1 was 

0, 1, 2, 8, 9, 100, 101, 102, 103

Then the react would be triggered once.

If channel 99999's field1 was 

0, 1, 2, 8, 9, 100, 101, 102, 99, 103

Then the react would be triggered twice.

The idea behind this is say you wanted to be notified when your smoke alarm went off. However, you do not want to be alerted continuously until you have reset the smoke alarm. When you did reset the smoke alarm, it started posting normal values to ThingSpeak. ThingSpeak would reset the react to now fire when it again got an alarm, without you having to manually change settings on ThingSpeak.

I hope the example was helpful.

 

Perhaps if you can describe your application I can suggest a good way to do what you want to do?


Viewing all articles
Browse latest Browse all 1833

Trending Articles