Today, I’m going to show you how to control OpenHAB using Android by using the Tasker app. Some of you may recognize that I’ve already written about this topic (OpenHAB using Tasker), but the method I used in that post had the drawbacks of being complex and requiring a 3rd-party app. I’m always trying to reduce the “app clutter” on my phone in the interest of saving both my battery and my privacy, so that app had to go!
The method detailed below will allow you to easily control your OpenHAB items. It will also allow you to retrieve your item states from OpenHAB at any time. Some really cool things are possible if you tightly integrate your home automation logic between OpenHAB and Tasker. I have a task that will automatically ask me if I want to turn off my house lights off when I get in my car, but only if my lights are actually on. The sky’s the limit!
- Tasker will need to be installed on your phone (obviously!) Here’s the link if you don’t have it already.
- You’ll need to download the OpenHAB project file I’ve created to your phone. Here’s the link
The first thing you need to do is import the OpenHAB project that I’ve provided. This will automatically import six tasks that I’ve created into your Tasker. I’ve created a video to demonstrate how to do this if you’re a total beginner to Tasker.
That should give you a screen full of tasks like you see below.
After you’ve adjusted the settings to fit your OpenHAB installation, run the task to save them! You can verify that they’ve been saved by going back to the main Tasker screen and checking the “Vars” tab.
That concludes the “setup” portion of installing these Tasks! Now you can begin implementing your own tasks!
Control OpenHAB using Android
The OpenHAB project you’ve imported has six total tasks: the Settings task, two Function tasks, and three Demo tasks. You should never directly edit the Function tasks. They’re designed to be called from other tasks. The Demo tasks demonstrate how you should write your own tasks, but I’ve also created a quick video which shows how to implement a new task from scratch! Watch the video below to watch me create a new task to turn my living room light off.
These helper tasks will help you to easily begin integrating your Android phone with your OpenHAB installation, but you may need to play around with Tasker more in order to learn how to perform complicated operations. So what’s next? If you’re new to Tasker, I would recommend that you really dive in! Android Central has a great “Tasker 101” post that will jump-start your knowledge.
Tasker unlocks the potential of your phone! The first step is to control OpenHAB using Android, but an advanced Tasker user can basically do anything.