[TUTORIAL] Using Tasker / KLWP together with Homey

Creating shortcut buttons for Homey through Tasker by Android

This tutorial will explain how to create shortcut buttons in Android using Tasker for Android. These buttons can be placed on your Homescreen and trigger any flow you want. In the future this functionality will probably be part of the Homey Android app but for now you can use this tutorial.

Prerequisites

  • A working Homey
  • An Android smartphone with Tasker installed
  • A Tasker plugin called RESTask installed which enables an extra plugin in Tasker
  • The external URL to your Homey (it looks something like this https://ID.homey.athom.com/ and can be found by going to my.athom.com and login to your Homey from outside your own network)
  • Your bearer token (can be found by going to my.athom.com and inspect the URL linked to the Homey icon. The url contains a parameter called bearer_token which is the token you need to have)
  • BetterLogic app installed and a variable created that you want to update

Create “Set variable x” task

Add a new task in Tasker called something like “Set variable x”. Create a new action within the task and select the RESTask plugin (it’s under the plugins category). Click on the configuration button and use the following settings for configuring the RESTask action where you replace the tags with your own external URL and bearer token.

Settings Tab of new RESTask action

Header Tab of new RESTask action (needed from BetterLogic v0.9.0 and higher)

  • Add new header with name “Authorization” and value “Bearer <<token>>” (without the quotes and replace <<token>> with your token and leave a space between the word Bearer and your actual token)

Create a shortcut on a Homescreen which sets the variable

Go to one of your Homescreens and start the “Add a shortcut” wizard (most likely by long pressing on your Homescreen and selecting the right option). In the list for adding a shortcut select Task Shortcut with the Tasker logo. In the next list select the task you have just created. Note: you might have to add a task icon to the task before being able to set it as a shortcut by selecting the icon at the bottom right and setting an icon.

Once done you now have a button on your Homescreen which will set the BetterLogic variable to it’s desired value. Based on the change of this variable to a specific value you can trigger any flow within Homey!

1 Like