IFTTT (if-this-then-that) example: event handling for temperature sensitive skylights

Environmental Sensor Controls Blinds, Shades, Window/Skylight Openers


Overview of Sensor Event Handler environmental sensor monitors temperature, light level, humidity, VOC air quality, sound level

This is the fourth article in this series about using our ES-WIFI-5V e-Air environmental sensor monitoring system for our motorized skylights, and window/skylight openers.

If you missed the previous article about the downloading and installation of the Android or IOS app, please review that article first.

The BroadLink® system is both affordable and user-friendly, with the unique ability to "learn" individual RF motor control signals, including those used to open and close our skylights or our skylight/window actuators.

In this article we will be discussing the BroadLink® software event manager that resides on the environmental sensor. The sensor generates the IFTTT (if-this-then-that) control signals for temperature or light triggering of our blinds, via WiFi control of the transmission hub.

This system can be used in just the same way to control our motorized window/skylight openers, or our SmartPlug to control AC power, or any IR controlled device such as an air conditioner.

There are 2 key hardware components required for this application:

  • The HA-RFIRW-5V RF/IR blaster control hub that activates the blind motors for open and close actions
  • The ES-WIFI-5V environmental sensor that provides WiFi control signals to trigger the above hub transmissions

The BroadLink® IFTTT (if-this-then-that) Control App for Android and IOS

home screen for controller to activate skylights via WiFi hub when temperature changes The picture to the right is a screen capture of the BroadLink® Android phone app (IOS is also available).

This is the main home screen for the system, where we have created control screens and installed various devices, including the device icon for the environmental sensor (e-Sensor).

environmental sensor event manager activates skylights via RF-IR blaster WiFi hub when temperature changesThe HA-RFIRW-5V RF-IR blaster control hub (at left) has a number of different control screens on the app home screen (at right), and we'll use the 4th icon that says 'Skylights' as the target device(s) we want to control.

We had created this remote control function previously, but if you have not already created a remote control screen for the device you want to control with the sensor, please refer to the companion article series that explains how to set this up:

Smart hub RF-IR blaster for blind motors: Introduction

Please keep in mind the environmental sensor could be used to control anything that the smart hub or smart plug can control, such as our blind and shade motors, window opener motors, drapery systems, lights, air conditioners, etc.

If you are adding the ES-WIFI-5V environmental sensor to an already-configured smart hub system, please plug it into an outlet and connect to your router using the SmartConfig™ method (enter your router SSID and password credentials).

It will retain those settings in non-volatile flash memory, even if you have a power failure. It will automatically re-start when power is restored (same for all the units in this system).

Creating IFTTT Temperature Event Triggers and Subsequent Skylight Actions

Press the e-Sensor icon to get the first screen on the left, below. This is the environment status monitoring screen, displaying the current state of the various environmental measurements (temperature, VOC air quality, sound level, light level, humidity).

Press the gear icon in the top right of the status reporting screen to get a drop-down menu with 2 choices:

  • Interaction
  • Settings

If you press the Interaction menu item, you'll get the second screen below. This is where we start the process of creating an IFTTT (if-this-then-that) temperature event handler.

Press the large + symbol to add an event trigger to see the third screen below:

environmental sensor sends skylight motor activation command when temperature changes  creating a skylight event action in the task list  start of IFTTT skylight event action sequence

As seen in the last picture above, there are three steps involved in setting up a temperature sensor event action:

  • Sensor and Condition
  • Timer (optional)
  • Action

After you press the Sensor and Condition option, the first screen below will appear. You can choose any of the environmental parameters to act as a trigger; we'll select temperature for the purposes of this example.

Press the Temp sensor selector that is seen in the first screen below to generate the next "temperature trigger selector" screen that appears, as seen in the second picture below. Keep in mind this may be the first of two events we are setting up for the skylights, one for "temperature too high" (open skylight) and one for "temperature too low" (close skylight).

This could just as easily be configured as a function of light level to operate shades if direct sunlight is shining into the room.

To scroll through the various temperature settings, you can swipe the screen up and down. We'll press 78°F as the skylight trigger upper temperature, displaying the 3rd screen below. This screen defines whether this is an upper or lower limit, so we will set it as an upper limit (room is getting too warm, skylight should open).

selecting a temperature input as a trigger  choosing the trigger temperature condition for the skylight activation  setting the IFTTT trigger temperature event as upper limit

After selecting the upper/lower limit, you will be returned to the first screen below which is the same as the IFTTT event creation screen where you started this process, but it now shows the skylight trigger condition Temp go up 78°F.

The next step is to select the action to perform when the trigger temperature is reached. Pressing the action icon shown on the first screen below sets the resulting action shown in the second picture below.

We'll press the Skylights icon as the action choice, which will cause the skylights control screen to appear, as in the 3rd screen capture below. Press the Open button to set the actual skylight action.

Please Note: If you didn't see the previous article series about using our HA-RFIRW-5V RF-IR blaster control hub for home theater, you may want to review that series as this IFTTT temperature sensor is an add-on to that system. The previous series explains how to "learn" remote control signals for your motorized skylight/window openers, blinds, shades, and other devices.

At this point you will be returned to the IFTTT event configuration screen (1st picture below), with the action also defined. At this point, it's a good idea to tap the Save text on the screen (events can be deleted later, if desired).

After saving the setup, press the "Back" button to take you to the saved list of sensors; pressing the one we are working on will bring up the action screen again, as seen in the first picture below. As you may have noticed, the event creation process is quite a simple procedure once you have done it a few times.

The timer function will be skipped for now, but there is a lot of added functionality that can be introduced with timers, such as delays, duration, daily repeatability, etc.

start of IFTTT skylight event action sequence  choosing the skylight action event for the temperature sensor trigger  action event for temperature sensor is skylight opening

You can complete the event programming by repeating the entire event configuration to handle the temperature lower limit skylight event. The only difference will be with the temperature condition selector (skylight close event) and the action selector (skylights close).

The IFTTT program for the environmental sensor can manage up to 16 different IFTTT events, with 6 conditions and 8 actions for each event.

You may also prefer to push a notification instead of actually activating the skylights right away; the options are many, and you can decide what works best in your particular situation.

This concludes the article series about automating temperature sensitive skylights; if you got this far, we'd like to thank you for your interest.

Where To Go From Here

Part 1-Temperature sensitive skylights: Introduction

Part 2-Temperature sensitive skylights: Activating the sensor

Part 3-Environmental sensor program installation: Download and install software

Part 4-Environmental sensor skylight event handling (you are here)

If you didn't see the previous article series about using our HA-RFIRW-5V controller hub for home theater, you may be interested to review that series as this IFTTT temperature controlled blind is an add-on to that system.

Also, see the follow-on series about our other devices:

If you are interested, you can purchase these products in our DIY online store.