One method to integrate the IFTTT with our Raspberry Pi is to use the dweet.io service. We covered dweet.io, along with Python examples, in Chapter 2, Getting Started with Python and IoT.
In brief, here is how we will use dweet.io alongside IFTTT and our Python code:
- In our IFTTT Webhook, we'll use a dweet.io URL to publish a dweet (containing an instruction to turn the LED on, off, or make it blink).
- Our Raspberry Pi will run Python code to retrieve the dweet published by the IFTTT Webhook.
- Our code will then control the LED based on the command specified in the dweet.
This is the method we will use for our example. The advantage of this method is that we do not need to worry about configuring firewalls and port forwarding rules on your router. Plus, it means we can run the example in environments – for example, at work – where router configurations may not be practical or even possible...