Homey Flows tutorial: creating home automation scenarios (part 1)

Routines, scenes and automation with Homey

Whether you own a home automation box Homey Pro or the brand new gateway Homey Bridge, you must have heard the term Homey Flows. This is the name given by Athom to what are more commonly called routines in our voice assistants or scenarios on home automation software.

Thanks to them, we will be able to make all our devices work together, whether or not they use the same protocol, and create simple automations or complex to handle just about anything you can imagine. So much so that, you will see, you will probably not use your routines much anymore. Alexa or Google Home thereafter ...

Homey Flows: what is it?

The Homey Flows are both routines, scenes and automations. In short, these are flows that coordinate a whole lot of things, hence their name.

Indeed, a Flow will allow us to create routines punctuating our daily life, script events of everyday life, or ofautomate connected objects.

For example, we will be able to start a morning routine with a waking up and gradual switching on of the light to wake up gently (we will call them routines as with our assistants), lower the shutters when the sun goes down or turn on the light when we arrive home (we will talk about scenes or scenarios instead), program a connected switch ZigBee so that it turns on a Wi-Fi bulb (here, it is about automation).

Homey Bridge test: all your home automation in a single application?


Organize your Homey flows

Sometimes you will have a hard time defining which category your flow belongs to, but remember that there are basically three families and that they are more or less permeable. The name differently allows you to navigate better and, for us, to better explain the logic behind Homey Flows. Obviously, this nomenclature is specific to us and you are free to do as you see fit ...

1 tip: create folders to organize your Flows Homey. Indeed, although each one has a different name, you may quickly have dozens of them and have a hard time finding your way around. We therefore advise you to organize by room and / or type.

In our example, we have chosen to organize the Flows into three main categories:

  • Routines: we put in it all the flows which have a determined recurrence such as the waking up, going to bed routines, etc ...
  • Scenes: these flows are triggered according to random events, specific circumstances.
  • Automations: here, we place all the Flows which coordinate the devices between them and will lead to systematic actions. For example, we will find the functions of a switch (button 1 turns on bulb 1, button 2 increases the brightness, etc.). A category that we have subdivided into rooms (office, bedroom, living room, etc.) to easily find the flows coordinating the devices in each room. Basically, it's all the hardware part which, once programmed, is changed infrequently, unlike our routines ...
2 tip: determine a taxonomy for your flows in order to identify at a glance their function. Unlike voice assistant routines, you don't necessarily have to call them by name, so you might as well make them talk to you.

We have chosen to name our flows as follows: Part_Apparatus_Mode. For example, the smoke detector in the BUR office is called Smoke, and the absence alert automation is called Away. So we have BUR_Smoke_Away. Likewise, the wake-up routine is called CHB_Bedside_WakeUp, another ENT_Show8_Welcome, etc.

You are free to name them as you see fit, in the language you want, the main thing being that they speak to you. 😉

Homey: how do Flows work?

As you have now understood, Flows are nothing but home automation scenarios at Homey. Much more powerful than the routines of voice assistants, they make it possible to very simply create complex automations in our connected homes using well-known operators: When / And / So.

Better yet, we'll also be able to use " Or " et " Otherwise " which will allow us to condition the actions according to the occurrence of events ... All In a few clicks and even with " drag & drop »(Drag and drop in French).

  • WHEN: allows you to select the trigger event. It can be the change of state of a device, a defined event, a specific date, a time of day, etc. There is only one per Flow. If you want more than one, it will not be necessary to pass a flow calling another flow, we will come back to it in a future one. Homey tutorial...
  • AND OR : you can add one or more conditions and use “AND” and “OR” operators. This is what our voice assistants lack and which allows us to go much further… We will indeed be able to determine actions to be carried out if several conditions are met with “AND” but also alternatives with “OR”.
  • THEN / ELSE: it is the action or actions to be performed. You can obviously choose several, but also determine an action if the conditions are not met, and even call flows in your flows.

Create simple flows on Homey

If you are a user ofAlexa or Google Home, you won't be confused by creating simple flows because it is neither more nor less than routines.

Better, of course, since we're going to be able to use many triggers and have all of our devices work together, even if they don't communicate with the same protocol. Thus, you will be able to turn on the light when Homey has detected your arrival, using a ZigBee switch can turn on a Wi-Fi bulb, etc ...

To start with, we'll create a simple flow, then we'll make it more complex with the use of the OR and ELSE operators.

We will not deal here with logics and variables, which are specific to Homey Pro and will be the subject of a future tutorial.

1 - When: the trigger

The first thing to do is choose your trigger.

It can be of several kinds:

  • Presence: you can use Homey's presence features and / or geolocation (someone leaves, someone is at home, another goes to bed, there is no one at home ...),
  • Events: dates & times, alarms, alarm clocks, solar events (sunset, sunrise, sun at its zenith…), receipt of notifications, etc.
  • Devices: most applications will offer you various triggers related to the capabilities of your devices such as a change in temperature for a Netatmo thermostat, opening for a Xiaomi door detector, brightness or motion detection for a Aqara Motion Sensor, activating a connected Philips Hue bulb, pressing the button on a switch Aqara H1 EU...
  • applications: many applications offer triggers ...
  • Flow: you can trigger a flow when another flow triggers. This makes it possible to do much more complex things ...
  • System (Homey Pro): if Homey has restarted or if an application crashes, you can run a check, automate the restart of the app, etc ...
  • Logic (Homey Pro): you can define custom variables, create events ...
  • Security (Homey Pro): thanks to presence sensors, you can detect activity or inactivity in the house.
Here we will use a Aqara opening sensor to trigger several actions, under certain conditions ...

2 - And / Or: the conditions

The conditions are essential to enjoy a smart home automation. They will allow, for example, to execute a flow only if certain conditions are met.

For example, when you open your door, your door opening sensor can automatically turn on the light. If it is very useful when it is dark, it is on the contrary totally useless in broad daylight. We must therefore add a condition such that " it's night " or a time condition. We will take the first one.

This is good, but the problem is that this light will also come on when there is already someone in the house and the light is already on. This is not useful, so we will add an additional condition . " no one is home" page (in French).

Yes but, if someone is at home and the hallway is dark by the time I arrive, then I want the light to come on… That's good, it's possible using theoperator "or" !

To do this, place a card in "And ..." and, with your finger or your mouse, slide it down. You will see a "- or -" appear.

It doesn't get any more complicated than that with Homey!

Note: "or" takes into account one or the other of the groups of conditions, this is why we use twice " it's night »Because we want the condition to always be fulfilled.

Obviously, these are just examples and you can use all kinds of actions or devices. In our specific case, moreover, we also use a brightness detector with Lux levels. However, this type of use calls for logics and variables that we will discuss next time.

3 - Then / Otherwise: actions

As you could see in the previous examples, we have lit a Philips Hue LED strip. It's the only "So" action that we have chosen in this flow, but it is of course possible to choose many others. Some will be linked to your devices, others to Homey apps. If the cloud version is still a bit poor in this area, this is not at all the case with Homey Pro which offers a lot.

Let's add an action like, for example, a personalized greeting from our favorite voice assistant using the app Amazon Alexa for Homey. We choose to make him say: " Welcome Alexien, I am delighted to see you again ».

The problem is that not everyone at home is called Alexien, so it would be interesting for our voice assistant to change what she said when someone is already at home… This is where the "Else" operator becomes essential!

Thanks to this option, you will be able to condition the flow according to the "or" that we have seen previously. As with the latter, the option is accessible by simply moving a card down.

Right here, Alexa will inform the people already present at the house of our arrival by saying " Alexien has just arrived, hurry to welcome him " on our Echo Studio. This is only an example to explain how this operator works, you are free to imagine much more useful scenarios. 😉

Note that you can only use one "else" in your flow. To condition even more things, you need to use flows in your flows. It's that simple !
So much for this first discovery of Homey Flows. We stayed on simple things, with a few small complications, so that you understand how the feed on Homey. In a future tutorial, we will discuss the operators and tags (available to everyone), before we look at the logics and variables (reserved for Homey Pro). Do not hesitate to share your flows in the comments or come talk to us on our Facebook community.
Homey Pro test: the Athom Plug and Play home automation box!
Fascinated by Alexa since the day I received it in beta test, I gradually became passionate about the subject, before deciding to go further by creating a site with Jean-Christophe. An activity that allows me to quench my thirst for new technologies and share my discoveries about the nicest of communities: Les Alexiens.