Receiving notifications when the lock is opened
Controlling the lock from the cloud is great, but you can only find out its current state by opening the dashboard on your computer or mobile phone. But what if you are on the road, and the lock is attached to a quite important door in your home? You would want to be alerted when the door is opened.
This is exactly what we are going to do now using IFTTT. We are going to set up the board so it sends notifications to your smartphone when the door lock is opened:
First, go to IFTTT, and add two channels if that's not been done yet: the Maker channel and the Pushover channel. Also install the Pushover app on your smartphone. To learn more about this, refer to the Chapter 7, Sending Notifications from the ESP8266.
Then, create a new recipe, and choose the Maker channel as the trigger:
We need to use the Maker channel here, as it will allow us to use custom projects like ours with IFTTT. As the trigger for the channel, put the
lock_opened
event:As the...