HackSpace_-_October_2019

(Rick Simeone) #1

Send data with If This Then That


SCHOOL OF MAKING


Control almost anything with CircuitPython


f This Then That (IFTTT) is a really simple
bit of glue that lets you link a condition
with an action, both of which are taken
from web services. All IFTTT applets are in
the format If ‘condition’ then ‘action’. This
simple form is surprisingly powerful because
it’s linked to a huge number of internet services and
web-connected devices. The sheer range of services
that can link together, and the fact that everything
can be configured by clicking on things in a website,
make it a great platform for basic Internet of Things
devices and experiments.

I


Send data with


If This Then That


Ben Everard


@ben_everard

Ben loves cutting stuff,
any stuff. There’s no
longer a shelf to store
these tools on (it’s now
two shelves), and the
door’s in danger.

If you’re using commercial devices and services,
such as smart bulbs, weather forecasts, and smart
hubs, you can do everything without having to touch
a line of code, but you can also use IFTTT with your
own devices. There’s a service called Maker
Webhooks that lets you send data into the service
by firing it at a URL. We’ve created a simple wrapper
library that lets you send data to this using
CircuitPython. Let’s take a look at how to do this.
There are three parts to this project: the input,
which will be our CircuitPython device (you can use
any device that has WiFi), the IFTTT applet that

Right
Webhooks let you
trigger IFTTT applets
from any device with
an internet connection
Free download pdf