IoT projects are often used to monitor situations and alert people of significant events. For example, an IoT home monitoring system may monitor for water entering a home following a heavy rain. The system would alert home owners of the problem so action could be taken immediately.
Such systems often rely on notification systems or text messages to alert people of the events. There are a variety of messaging services that can be used:
Although many of these services provide a “developer tier” to support free testing with their platform, they often require moderate study to intergrate them into an existing project.
The objectives of today’s Studio are:
As usual, you should work in a group. Your usual group of four is desirable, but not required. Today’s studio checkout will be performed by TAs. There is no GitHub repo to get/commit.
Today you’ll be using IFTTT.com for simple SMS/Notification support. According to IFTTT’s site:
“IFTTT is a free platform that helps you do more with all your apps and devices”
The name, “IFTTT”, stands for If This Then That. The primary paradigm is an event driven if event, then action. Users create “Applets” that monitor events and respond to them (if the event happens, do a specific action).
IFTTT applets can connect to a variety of services, including Particle.
Configure your Photon with 1 button (you can probably use existing wiring for the Garage or Lamp).
Create a small, simple script that will publish to a Particle event stream when the button is pressed (Particle.publish()
):
NULL
for data (the event occuring is the significant part)Just make sure that each time you press the button one event is sent to Particle. Use Particle’s Console to verify that your Photon is publishing data whenever the button is pressed.
Notifications on Apple and Android devices can be sent via their respective notification services rather than SMS. The IFTTT mobile app uses these notifications (which don’t have a quota and are often more responsive)
Create
+this
part of the rule to select the event of interest.Particle
and then click on the Particle
icon.New event published
, but note the other options that may be of use in your project)
Connect
button and provide your Particle credentials.Create Trigger
button.+that
button to select the action (to respond to the event).Notification
.Create action
Finish
button.Settings
button followed by the the View Activity
button.The applet will be run periodically, but it often takes up to an hour to run (especially the first time). You can force it to run sooner by clicking on Check now
.
Check now
button to test your Applet.
None for this!