In firmware R070 we added support for home automation rules and we’ve improved things massively in R072, so we thought it was time to provide some instructions on how to create rules. A rule can be compared to a short instruction or piece of code that tells the sensors and devices you have connected to your Almond+ what should happen when a certain condition is met. So how do you create a rule? Following the step by step instructions below, you’ll be able to start doing your own rules and it’s really simple on the Almond+ as we’ve created a UI that’s mostly point and click.
Before you can create a rule, make sure you have a few sensors, as some can act as “triggers” and others as “actions”. A trigger would be something like a key fob, a door/window sensor or a motion sensor, as these types of devices and sensors can’t perform an action, they just accept input. An action on the other hand would be something like a smart plug, a light bulb, a door lock or a thermostat, as these devices will make something happen, such as turn on a light, unlock a door or change the temperature. You need at least an action device to create a rule, as the Almond+ supports time based triggers, so this can be used in lieu of another sensor if you just want to try to set up a very simple rule.
To start with, you have to access the local web UI of your Almond+. This is done by typing the IP address of your Almond+ into your web browser. You can find the IP address of your Almond+, as well as the username and password in the LCD UI under Settings, Web Admin, as per the below screenshot.
Once you’ve logged in to the local web UI, click on the Rules tab at the top of the screen and you should see the following screen.
If the screen appears garbled for some reason, please try refreshing the web page or clearing your browser cache. This only applies if you’ve installed an earlier firmware that has included rules.
Now click on the magic wand to create your first rule.
Depending on how many sensors you have connected to your Almond+, you should see something similar to the screenshot below. If you don’t have any sensors, this screen will be greyed out and you can’t select anything. Note that you need sensors that can perform both “triggers” and “actions” to complete a rule.
The first thing you have to make sure before you create your first rule is that the time is correct, especially for time based rules, or they won’t work. As per the below screenshot, you’ll be able to tell what time zone and time/date your Almond+ is configured to. If this isn’t correct then you can click on the little cogwheel and the Almond+ will try to auto detect the correct time for you.
Now you’re ready to create your first rule. Let’s start with something simple.
IF and THEN
Let’s start with a quick explanation of the two main parts of the rules UI, namely IF and THEN. IF is the trigger, as explained above and THEN is the action. For our very first rule, we’re going to make a door/window sensor (IF/trigger) turn on a plug-in smart switch (THEN/action), in this case a Peanut plug. Assuming both devices are already paired with your Almond+ and you’re in the rules UI, the following steps will show you how to create the rule.
Click on Open under the door/window sensors (here labelled as ContactSwitch #1), next click on Confirm Selection. This will create the first half of the rule, i.e. IF the door/window is opened, then do something.
The view in the rules UI will change and the IF section will fold together and the the THEN section is where we want to continue to create the rule now. Simply Click on On on the Peanut plug and it’ll be added to the top of the THEN section, as per below screenshot. You’ve now created the second half of the rule, i.e. THEN turn on the Peanut plug.
Now click on Done to confirm that you’re finished adding things to the rule. As you’ll see, the IF part is in blue whereas the THEN part is in brown.
Finally, add a descriptive name for the rule, such as, If the front door opens, turn on the light. Finally click on Save Rule. Note that you can enter the name and save the rule both at the top and the bottom of the page.
If the rules was created properly, you should be seeing the following.
Congratulations, you’ve just created your first home automation rule on the Almond+.
We’ll be following up with more complex rules and explain how to use the various time based options, delays and so on over the next few days and weeks, so stay tuned to the blog if you want help to create more advanced rules.
I still consider myself new to the Almond community: I’ve had my Almond+ for 6 months. I’m just now getting into using it as part of my home automation, so finding info on setting up devices had been difficult. Thankful I finally found this blog and these articles related to setting up “Rules”, and “Scenes”. Please keep these coming and showing a variety of devices, scenarios using Rules and Scenes.
You did a nice work by posting this. I appreciate it and enjoy reading your posts. I am keenly I am keenly looking ahead for more these kinds of blogs these kinds of blogs. Thanks for the information you have provided in your blog as it proved to be very helpful for me in start writing my own blogs.