Skip to Content
Technical Articles
Author's profile photo Ferry Djaja

Build Family Events Notification with WhatsApp and Smart Bulb

In this blog, we learn how to create a family events reminder app and get a notification by WhatsApp message and Yeelight smart bulb. No single coding is required!

The notification will be triggered in 15 minutes before the due date and time. User shall be getting the WhatsApp message and the smart bulb will be turned on. User need to reply WhatsApp message saying “acknowledge” to turn off the light.

 

Required Components

Yeelight Setup

Download Yeelight app for iOS or Android.

Install the light and add it in your app. Make sure you can control the light from the app.

IFTTT Setup

Create an account in IFTTT and setup two applets:

Navigate to Webhooks setting and take note the Maker Key below. We will use this information in the subsequent steps later on.

Twilio Setup

Create an account in Twilio and configure the WhatsApp sandbox.

Once you have done, take note the Account SID and Authorization Token We will use it when we configure SAP Open Connectors.

There is one more step we need to complete when we configure WAOffLight Zap step later on.

SAP Cloud Platform Open Connectors

Create a connector to Twilio and set the account SID and authorization token.

On API Docs, configure and test the Post message to send the WhatsApp message.

Check the output from Curl command. We will need the following information to setup Zapier.

"Authorization: User xxxxxxxxxx, Organization yyyyyyyyyy, Element zzzzzzzzzz"

Google Forms

Create a form like this.

Test the form and check the response in Google Sheets.

Zapier Setup

Create three Zaps: Calendar, MyPhone and WAOffLight.

Calendar Zap

To create an event in Google Calendar from Google Forms entry.

Create:

  • Trigger New or Updated Response in Spreadsheet
  • Action Create Detailed Event.

Trigger: New or Updated Response in Spreadsheet

Watch for new entry from Google Forms.

Action: Create Detailed Event.

Create an event in Google Calendar.

MyPhone Zap

To monitor events in Google Calendar and trigger payloads (sending WhatsApp message & turn on Yeelight smart bulb).

Create:

  • Trigger: Event Start
  • Action: Post (to send WhatsApp message)
  • Action: Get (to turn on the Yeelight)

Trigger: Event Start

Check any events for 15 minutes before the due date & time.

Action: Post (To send WhatsApp message)

Send WhatsApp message.

Action: Get (To turn on Yeelight smart bulb)

Get the Maker Key from step IFTTT Setup and put it in the URL field (Step 3 – Set up Webhooks by Zapier GET).

WAOffLight Zap

To monitor incoming WhatsApp message and to turn off the light if the message reply is “acknowledge”.

Create:

  • Trigger: Catch Hook
  • Filter : Only Continue If…
  • Action: Get (to turn off the Yeelight smart bulb)

Trigger: Catch Hook

Wait for new post request from Twilio WhatsApp sandbox  to Zapier webhook url.

On Step 3 – Connect Webhooks by Zapier take note the Zapier webhook URL:

https://hooks.zapier.com/hooks/catch/xxxxxx/yyyyyy/

Open Twilio console and navigate to Sandbox for WhatsApp, enter this URL information in “When a message comes in” and save it. Any incoming message from WhatsApp will be sent to Zapier webhook.

We only interested on the Body message content.

Filter: Only Continue If…
Only process if the reply is “acknowledge” from the message Body.

Action: Get

Send an event “light_off” to IFTTT.

That’s all.

It is very easy to setup and I think is useful to have this platform for your family members. I hope you enjoy to setup and integrate multiple components.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Bogdan Petrescu
      Bogdan Petrescu

      This is very cool Ferry, nice blog!

      Author's profile photo Ferry Djaja
      Ferry Djaja
      Blog Post Author

      Thanks Bogdan!

       

      Best,

      Ferry