Reader small image

You're reading from  Practical Python Programming for IoT

Product typeBook
Published inNov 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838982461
Edition1st Edition
Languages
Right arrow

Triggering an IFTTT Applet in Python

We're about to explore a simple application based around the DHT 11/DHT 22 circuits and code we first saw in Chapter 9, Measuring Temperature, Humidity, and Light Levels. You can find this code in the chapter13/ifttt_dht_trigger_email.py file.

This code will monitor the temperature using a DHT 11 or DHT 22 sensor, and if a pre-configured high or low threshold is breached, the code will invoke your IFTTT Webhook URL, which will then send you an email, similar to the one shown in the following screenshot. This corresponds to the email subject and body text you configured in the previous section, in step 13:

Figure 13.15 – Example IFTTT email 

Before we can run our sample application code, there are a few configuration steps we need to perform. Let's take a look:

  1. Open the chapter13/ifttt_dht_trigger_email.py file for editing.
  2. Locate the following segment of code indicated by lines (1) and (2). Confirm that...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Practical Python Programming for IoT
Published in: Nov 2020Publisher: PacktISBN-13: 9781838982461