SMS message alerts are only available for IO+/IO Plus (Paid) accounts. To upgrade your Adafruit IO Free account to Adafruit IO Plus, visit io.adafruit.com/plus! Email notifications are available for free accounts.
You can set up Actions in Adafruit IO to alert you when certain values are logged. This can be especially handy for this project to let you know if your air quality is becoming unhealthy.
To receive an SMS message Action alert, you'll need to add your phone number to your Adafruit account. Note that SMS message alerts are only available for IO+ accounts. Other alert types are available for free tier accounts, such as email and web hooks.
Enter a Name and optional description for the new Action, then click Create.
You'll be taken to the new Action page, with a Blockly toolbox and workspace.
All actions start with at least one Trigger block, placed into the top Triggers: section of the root block in the workspace.
- Use the data 'Starts' matching trigger, so you can avoid being repeatedly notified.
- Drag it onto the root block, and then select the feed that you're monitoring from the list.
- Select the greater than or equal dropdown and enter the value that you want to monitor for the threshold
Now the trigger is done, you'll want to get the data into a new variable, to make it easier to use later in the template.
- Create a new variable in the toolbox, named
my-data, then drag the Set Variable block onto the main diagram, dropping it into theActions:section of the root block.
- From the Feeds toolbox category, drag a Get Feed block over to the Set Variable block, and connect them horizontally, so that the Set Feed block replaces the empty placeholder text block as the value to be set.
Lastly use a Send SMS block from the Notifications toolbox category. Drop it beneath the Set Variable block, and customize the message that you'll receive when the action is triggered.
Try this for a message, which uses the map filter in Liquid templates, to access the updated_at timestamp property (in UTC). Mapped from the first feed used in the action (via the feeds placeholder). It also includes the variable my-data under the vars placeholder.
⚠️Ikea AQ Sensor Detected an Unhealthy Value:{{vars.my-data}}ppm at {{ feeds | first | map: "updated_at" }}
This returns you to the Action page, where you can see the Action you just set up.
There is also an Enable toggle switch (On or Off), and an information icon at the end of the row.
Page last edited March 08, 2024
Text editor powered by tinymce.