The React app triggers MATLAB Analysis, ThingHTTP, or ThingTweet apps when your ThingSpeak channel meets a specified condition. For example, you can turn your thermostat on or off based on your location using a geo location condition in the React app.
ThingSpeak channels support numeric sensor data, text, strings, status updates, and geo location information. Use these condition types to specify conditions that trigger reactions based on your channel data.
This condition tests a text string in a ThingSpeak channel field. For example,
“If Channel 1, Field 1, is equal to blue, then set my light to blue.”
Check the data with these constraints when testing for strings:
This condition tests a ThingSpeak status in a channel. The status field is similar to the text in a tweet. You can search the status for a word, and send a ThingHTTP request when the test condition is met.
Check the data with these constraints when testing for ThingSpeak channel status:
If you have sensor data or numeric data in the fields of a ThingSpeak channel, use the numeric condition. For example, if your power use is over 300 watts, use a numeric condition to post this tweet using the ThingTweet app:
“I am using too much power”
Additionally, you can send a control command to another service or device that accepts HTTP requests using ThingHTTP.
Check the data with these constraints when testing for numbers in a ThingSpeak channel field:
This condition checks the location data in a ThingSpeak channel. For example, if you have mobile app reporting your latitude and longitude to a ThingSpeak channel, you can turn on your living room lights when your position is within a certain distance of your house.
Check the data with these constraints when testing for location information on a ThingSpeak channel:
This condition checks whether the ThingSpeak channel is receiving data at the specified interval. If no data updates occur within the specified time range, the action selected in your React app is triggered. For example, if a power outage interrupts your device and your channel is not updating, you can trigger an action. Specify the amount of time that your channel does not receive new data before triggering the action.
Select the frequency at which you can test for the specified condition.
If you specify,
%%trigger%% in your ThingHTTP request or ThingTweet message,
%%trigger%% will be replaced with the value that triggered your React. Your tweet could be, “It is way too hot in here at %%trigger%%C”. You can also add the Channel ID attached to the React by using
%%channel_id%% as a replacement.