Feed Setup

If you do not already have an Adafruit IO account set up, head over to io.adafruit.com to link your Adafruit.com account to Adafruit IO.

The first step is to create a new Adafruit IO feed to hold the data from the PyPortal's temperature sensor. Navigate to the feeds page on Adafruit IO. Then click Actions -> Create New Feed, and name this feed temperature

Adafruit IO Action Setup

This optional step requires an active Adafruit IO Plus (IO+) account.

While you can remotely monitor your PyPortal thermometer using an Adafruit IO Dashboard, if you want to be alerted of a specific high temperature reading when you're away from your keyboard. You can set up Adafruit IO Actions to monitor a feed for predefined conditions.

Adafruit IO Email Triggers are a feature of Adafruit IO Plus, and require an active Adafruit IO Plus subscription.

To check if you have an Adafruit IO Plus subscription: Navigate to your Adafruit IO Profile page and check your Current Plan.

Navigate to the Adafruit IO action page. From the Actions dropdown, click Create a New Action.

To set up the action, you'll need to define a condition and an action to perform when the condition occurs.

Set the feed to temperature

Define the trigger to fire only when the feed value is greater than 85.

Set the trigger action to email me

Next, you'll set up a second trigger to email you if the temperature feed dips below freezing (in degrees Fahrenheit).

Set the feed to temperature

Define the action to fire only when the feed value is less than or equal to 32.

Set the action action to email me

Note that 85 is a value on the feed and does not include the unit - it can be 85 degrees Celsius, Fahrenheit or even Kelvin. The code in this project supports converting the raw value before sending it to Adafruit IO. 

Build an Adafruit IO Dashboard

Next, you'll create a dashboard to display the values from the feed you created.

From your dashboard, select the Gauge block.

Select the temperature feed

In the Block Settings step, set the Block Title toTemperature, set the Gauge Min/Max Values to the upper and lower temperature thresholds you want to measure.

You can label the gauge by setting the Gauge Label - this example assumes temperature is to be measured in Degrees C.

Uncomfortably hot or cold? You can optionally set the gauge change color to warn you if the temperature goes above (or below) a certain value.

While displaying the current values of the temperature is useful, Adafruit IO stores data so you can monitor how it changes a long period of time.

To do this, we'll use the Line Chart block and set it up to display the light value over a period of time.

Create a new block, and link the temperature feed to the line chart block. You can configure it to show the thermostat's history from one hour to thirty days.

Your final dashboard should look like the following:

Obtain Adafruit IO Key

You are also going to need your Adafruit IO username and secret API key.

Navigate to your profile and click the View AIO Key button to retrieve them. Write them down in a safe place, you'll need them for the next step.

This guide was first published on Mar 22, 2019. It was last updated on Mar 22, 2019.

This page (Adafruit IO Setup) was last updated on Mar 18, 2019.

Text editor powered by tinymce.