In part 1 we used IFTTT to set up a simple webhook and connect it to our smart home. In this post I’m going to show you how to call IFTTT from your Loxone Config.
Disclaimer: I’m not a Loxone partner so I have no formal training. All the steps here I’ve worked out for myself and I may be making some mistakes. If you can see a better way of doing it or just want to point out some errors that I’ve made then please put them in the comments below.
Step 1: Open Loxone Config and save a backup
Step 2: We will be using Virtual Outputs. This is where our magic happens. A virtual output is a command that’s sent from Loxone to an external system.
Step 3: Create the new Virtual output
Step 4: Set the Address to http://maker.ifttt.com (Note the “http”, not “https”, the Miniserver Gen 1 latest update doesn’t support https). We’ll be using this Virtual Output for all our IFTTT commands; each webhook that we send is a new Virtual Output Command and is configured in the next step.
Step 5: Create a new Virtual Output Command
Step 6: Set the following parameters for the Command:
Name: The name of your action Command for ON: the rest of the URL for your webhook, eg /trigger/dim_kids_room/with/key/ABCDEFGHJKLMNOPQRSTUVWXYZ HTTP method for ON: POST
You can also create another webhook for the OFF command and enter that in the Command for OFF parameter (eg turning your lights back on again).
Step 7: We are going to create a switch to trigger our Virtual Output. I’m going to use a Retractive Switch because I just want to fire an ON command and don’t need to worry about OFF. If you do want your Virtual Output to have an OFF command as well then you probably want to choose an On/Off switch. Just be aware that if you trigger your scene from outside Loxone, like a 3rd party app or Alexa then that status won’t be passed to Loxone, so you might be turning something on that is already on.
Once you’ve created your switch you can set it up your trigger and drag in your Virtual Output. Here I am triggering my scene from a triple click on my Touch Air (RaQ).
You can also choose to put your new switch into the user interface so it can be triggered through the app.
Save your config in the Miniserver and test it out.
Be aware that there can be a delay from triggering your IFTTT command from Loxone. My smart bulbs can take from 3–8 seconds to respond. The paid IFTTT plan gives a faster execution time but it still won’t compare to native Loxone products which work over an internal network.
Using IFTTT opens up the whole Loxone ecosystem to some amazing 3rd party products, like these cool Nanoleaf tiles (UK, US).
I hope this article has helped you get over the isolated feeling of working with Loxone by showing you that your home automation system can have friends and integrate with one of the most popular tools out there.
I have a new Loxone system in my home. I installed it as an upgrade to my existing Frankenstein system made of several Alexa-connected devices of varying quality and price. I wanted a more professional system so I chose to go with Loxone. The quality was a major step to to what I’m used to and I have found it to be an amazing, reliable and powerful system, but it is just not good at working with my existing devices.
After working with my Loxone partner in setting up the system to my requirements, I was left with a house with 2 systems. My existing Alexa controlled smart home, with around 20 devices from different brands including fans, bulbs, smart plugs, LED strips, plus Alexa routines and scenes, and my Loxone system which controls my blinds, ceiling lights and heating.
Controlling Loxone with Alexa
My first task was to integrate Alexa so that I can turn the lights off or close the blinds through my existing system. I investigated 2 methods, 1home and Openhab.
1home was definitely the easier option and they have a free trial which worked great, but it was quite expensive and I’m a fan of open source so I went with Openhab. Openhab definitely has a learning curve, even for an experienced programmer like me, but with the help of the documentation I managed to write my items file to import my Loxone “Things” into Openhab 2.5, which I have running on a Raspberry Pi wired into my network. Now I can say “Alexa, close the living room blinds” and it will connect to Loxone and close the blinds. I can ask Alexa what temperature it is in a room, or to dim the ceiling lights and it all works thanks to Openhab cloud. I can share my items file in another blog post if someone is looking for that information (let me know in the comments). But this post is about controlling other services from within Loxone, not contolling Loxone from other services.
Setting SmartLife scenes from Loxone
The next step was to be able to use the Loxone Touch Air to set scenes on my non-Loxone devices. I couldn’t find any documentation on this at all, which prompted me to write this article.
Most of my devices are Tuya hardware so they are compatible with the SmartLife app. These include plugs (UK, US), LED strips (UK, US) and smart bulbs (UK, US). I have a number of scenes set up in the SmartLife app for things like morning scene, day scene, evening scene and night scene, which sets my lamps and smart bulbs throughout the house to various colours and brightness. I’ve also set up Alexa routines to trigger these scenes at different times of the day (including sunset).
These Chinese Tuya devices are all cheap and cheerful, and you get what you pay for, so if you can spare the money I’d recommend getting your own hub from someone like Philips (UK, US) or SmartThings (UK, US) and integrate their devices. Personally, I chose to use hub-free devices as I had Alexa already, but the free SmartLife app is a bit clunky and the Philips Hue / Zigbee products are better quality, better supported, more reliable but more expensive (although still half the price of Loxone).
Regardless of the make, Loxone doesn’t integrate with any of these cheaper devices easily (except maybe KNX). It makes sense I guess, they have an ecosystem that they can control, give support and secure. If they let other device manufacturers connect then they will have accountability for their support and security which they don’t want to do. Loxone products are much better and more reliable than most competitors, although they are sometimes 5 times the price. I do wish they would integrate with Alexa/Google Home natively though, it is such a useful feature for houses that already have smart voice control and I’m not sure they can ignore it forever.
Triggering IFTTT commands from Loxone
IFTTT (If This Then That) is a service that lets you configure a trigger over the internet and then run a command. There are loads of services that it can receive a trigger from, and loads of services that it can run commands on. For example you can set a timer trigger so that lights are turned off at midnight, send a notification on your phone if the motion sensor goes off, or order your favourite Domino’s pizza when you triple tap a Loxone light switch.
It all sounds quite fun, but beware that when sending a command from Loxone, there can be delay of up to 15 seconds while the message gets passed from web service to web service in the cloud and finally back to your device. Different devices probably have different response times, for example my smart plugs are quicker at firing commands than my LIFX LED strip (UK, US), and I imagine Philips Hue or SmartThings is quicker to respond, although I haven’t tested that.
From within IFTTT we are going to use something called a “Webhook”. This is basically a URL that when it is called it will run a command. This webhook is the thing that is going to be triggered by an action within Loxone using virtual outputs.
I’ll assume that you’ve created an account on IFTTT.
Step 1: Create a new applet
Step 2: Click “If This” and search for “webhook”
Step 3: Choose “Receive a web request”
Step 4: Name your event. The name doesn’t particularly matter, I chose “dim_kids_room” (It shouldn’t have spaces or any symbols other than underscore or dash)
Step 5: Now go to the “Then That” part
Step 6: Here is the part when you can set up your action. You can connect smart home services, like Philips Hue, SmartThings, SmartLife (Tuya devices), LIFX, Nanoleaf (UK, US), Nest, Samsung Smart Devices, tado, WeMo, WIZ, Z-Wave, Zigbee etc.
In this case I’ve chosen SmartLife
Step 7: Set up the thing you want to do. Most of the time you will have to set up the thing you want to do in the app beforehand. For example in my case I need to set up a few devices and create a scene in the SmartLife app, but it would be the same with Hue or SmartThings. You will be asked to connect your account with IFTTT, so you’ll need your password for the service. In my case, I want to Activate a Scene, so I choose that option
Step 8: After connecting my account I can choose my scene from the dropdown, I’ll choose “Dim kids room”
Step 9: Review and finish
NOTE: The free IFTTT plan allows you to create 3 applets for free. If you need more then you have to pay a monthly fee to use the service
Step 10: Go to your profile menu in the top right and choose “My services”
Step 11: Choose Webhooks, then choose “Documentation” in the top right