Quite often I like to use my Android smartphone to directly start a Homey flow, operate a Homey device or to put data into Homey flows without using the Homey app. If you would like to do the same, then this tutorial is for you.
What will be addressed in this tutorial:
- Install Tasker on your Android smartphone
- Install Join on your Android smartphone
- Find device ID and generate Join API key
- Create Join URL
- Configure Tasker and Join to react to a received message
- Setup the webhook in a Homey flow
- Test communication from Homey to your smartphone
- Copy Homey Cloud ID
- Create Homey webhook URL
- Setup Tasker to communicate with Homey
- Setup a Homey flow to receive the webhook from Tasker and to react to it
- Test two-way communication between Homey and your Android smartphone
- Usage examples
The way Homey and your Android smartphone will communicate is via webhooks. We will start with your Android smartphone because there are a few apps youâll need to install.
Install apps
First, youâll need to download and install the app Tasker.
With Tasker you can automate everything on your smartphone. When you install the Tasker plugin Join, you can use external triggers like Homey flows, to run tasks in Tasker.
Find device ID and API key
Before the webhooks that Homey sends can reach your smartphone youâll need to get a Join API key and find out your device id to create a Join URL.
Go to this site to learn more about Join and click on the link âAPI key available hereâ to see your device ID and generate an API key for your smartphone.
https://joaoapps.com/join/api/
Create Join URL
Copy the device ID and API key and paste them into this URL:
The âTitleâ and âTextâ part of the URL can be customized to contain the message you want to send to your smartphone.
Be aware: anyone who knows this URL can send data to your Join app, so keep it safe!
Configure Tasker and Join
With Tasker and Join installed on your phone youâll need to configure a profile and a task with actions so Tasker will react properly when the message is received.
- Open Tasker on your smartphone
2. Create a new Profile with the â+ buttonâ
3. Choose âEventâ
4. Select Event Category âPluginâ and select ´Join´, click âReceived Pushâ
5. Click âconfigurationâ
6. Click âtextâ
7. Define a text filter. Type âHomeyInputâ and click OK
- Select âExactâ
- Go back, save, and go back even more
- Youâll be prompted to choose or create a task: create a new task and name it âHomey User Inputâ
- Create a new action with the â+ buttonâ
- Select Action Category âAlertâ and select âFlashâ
- In the field âTextâ type: %joinmessage (this is the variable which contains the message from the webhookâ)
- Go back
- Go back
- Save and exit Tasker
Tasker is now configured to receive a webhook from Homey and when this message is exactly âHomeyInputâ, then Tasker will flash the message in a toast notification on your smartphone.
Set up the Join URL in a Homey flow
- Create a new flow
- WHEN: This flow is started
- THEN: Sent an http Get Request. Choose the âLogic cardâ or a âBetter Logic Cardâ. Use the Join URL you made earlier and make sure âText=HomeyInputâ and âtitle=HomeyExampleâ
- Name your flow âUser Input 1â and save
Test communication from Homey to your smartphone
Everything is set up so it is time to test.
Start the Homey flow âUser Input 1â and look at your smartphone. If all goes well youâll see the toast notification briefly with the text from your Homey webhook: âHomeyInputâ. If you didnât see it, try again because the toast disappears rather quickly.
If it didnât work: check all the previous steps.
If it does work: congrats, we now have one-way communication between Homey and your smartphone. But we want two-way communication.
Copy Homey Cloud ID
For the other way we need the Homey Cloud ID.
- Open the Homey app on your smartphone
- Select Settings, General
- Tap on the cloud ID to copy it
Create Homey webhook URL
- Paste your CloudID into this URL:
https://YourCloudID.connect.athom.com/api/manager/logic/webhook/HomeyExample?tag=%joinmessage - Make sure you set the tag to â%joinmessageâ (this variable contains the message we send to Homey)
Setup Tasker to communicate with Homey
- Open Tasker on your Android smartphone
- Open the task âHomey User Inputâ
- Click the + button to append a new action
- Select Action Category and select âNetâ
- Select HTTP Request
- Select âGETâ method
- Paste the above URL with the Homey Cloud ID in it into the field âURLâ
- Go back
- Go back
- Save and exit tasker
Setup a Homey flow to receive the webhook from Tasker and to react to it
- Open the Homey app
- Create a new flow
- WHEN: Logic- Event is received
- Event: HomeyExample
- THEN: Google TTS (text: The input given is [TAG])
- Name the flow âUser input 2â
- Save the flow
Test two-way communication between Homey and your Android smartphone
Now start the Homey flow âUser Input 1â and listen to your Google speaker. If all went well your Google speaker was saying âHomeyInputâ.
âHomeyInputâ was the text in the webhook which was sent to your smartphone in the flow âUser Input 1â. The Tasker app reacted to this message by flashing âHomeyInputâ in the toast notification and by sending this same message back to Homey.
Homey reacted to receiving this message by letting Google TTS saying âThe input given was HomeyInputâ out loud.
Congrats, you now have established two-way communication between Homey and your smartphone.
See these little videoâs I made:
Great, but what can I do with this?
Well, since you are now able to send whatever data you want from Homey to your smartphone and the other way around, you can do pretty much everything.
-
You can start a flow with an Android widget on the home screen of your smartphone.
-
You can flip a variable in Homey by tapping an Android widget on the home screen of your smartphone and this way control whether the Homey flow should start or not.
-
You can let Homey ask for user input on your smartphone before a flow runs
I have a flow which rolls my window shutters down based on the expected weather conditions and temperature. Before it rolls them down Homey asks me if I want them down or not. If I donât answer in 10 minutes theyâre lowered anyway. -
You can let Homey run a flow based on an event on your smartphone
I have several Home Connect appliances, but the Home Connect app on Homey doesnât have all the options the Android app from Home Connect has. So, when the Android Home Connect app has a message from one of my appliances, Iâll intercept this message and let Homey announce this message on my Google speakers. -
You can start events on your smartphone based on data in Homey
Every night at midnight I get a notification on my smartphone with the gas and electricity usage of that day including prices. I append this data in a HTML file on my smartphone with the energy data from the last two weeks, so I can easily compare the data with one button. -
And much more. Also because there are a lot more plugins to Tasker which you can use.
Have fun!