# \[HOW TO\] Using Tasker to send battery level from phone to homey

**URL:** <https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085>\
**Category:** Tutorials\
**Created:** [January 23, 2024, 4:31pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085 "2024-01-23T16:31:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_van\_Ulft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/paul_van_ulft/32/56539_2.png) [@Paul\_van\_Ulft](https://community.homey.app/u/Paul_van_Ulft)\
**Post date:** [January 23, 2024, 4:31pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/1 "2024-01-23T16:31:49Z")

</div>

Tasker is a payed app which you can install on your Android phone to send information to homey using a webhook. In this example I explaine how to send a webhook so homey knows the battery level of your phone.

First install tasker.  
Open tasker on your phone.

Tasker works with profiles (In this case with an event) and tasks to complete with the profile.

So we first create a profile:

 ![Screenshot_20240123_160455_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/5/55df636789244fc904a4b3bb933a44641497c6ea.jpeg)

It will be an event:

 ![Screenshot_20240123_160643_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/9/f9b15c0cd979f57aba5b1106d5de5ee5135052e2.jpeg)

Choose Power:

 ![Screenshot_20240123_160751_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/5/355c9f88c109be50424c4a1696d717c996d5431f.jpeg)

The event is Power Changed:

 ![Screenshot_20240123_161117_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/b/8b05a00590eca89ca56c192ec580dab582d0cc99.jpeg)

Go Back:

 ![Screenshot_20240123_164118_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/c/8cc840af59ece3b45094638608b87e728b0a8802.jpeg)

Click on New Task:

 ![Screenshot_20240123_161233_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/0/4095d760ef3719cd3ce4a676f142c177d7cdb629.jpeg)

You can give the task a name but itś not necessary. You can just press

 ![Screenshot_20240123_165101_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/a/6a4217cf9e9c9a2f81671718dcb6151fe61ac871.jpeg)

Click on a new action:

 ![Screenshot_20240123_161400_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/2/32554550ccc08266556d0a7292fb8303ac24fe96.jpeg)

The task is a NET task.

 ![Screenshot_20240123_161444_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/8/2887e34ef1acb3e7485df6d0afcfa122bf0f5a30.jpeg)

Choose HTTP REQUEST

 ![Screenshot_20240123_161528_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/0/5095d0b94231fe926f1cea00854e6cb70b936feb.jpeg)

Make sure the method is set to GET

 ![Screenshot_20240123_170428_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/5/a5cb3ff1085f8e9ee4a21b9db50952833ae97884.jpeg)

Now we must create the URL. First find out the id of your homey  
go to the homey app. Find settings and in general you can find yout homey-ID

 ![Screenshot_20240123_171159_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/9/894fe83d12d402f0b1570a88d587977842de6235.jpeg)

The URL to put in tasker is

`https://webhook.homey.app/(youthomey-id)/batterij-level?tag=%BATT`

%BATT is the variable that tasker uses for the batterylevel of your phone.

Press back in tasker.

 ![Screenshot_20240123_170428_Tasker](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/6/26a90202062dd18f7974286a3bb889aa9da36f48.jpeg)

Now your phone will send the batterylevel to homey everytime it changes. But it will send it as text.

Now In homey make a number variable where you can put the data form Tasker in. For instance batterij telefoon Paul

The flow to get the data → convert it to a nember and put it in the variable id one with logic.

 ![Screenshot 2024-01-23 17.25.38](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/8/d8ede432a11d67e4d4bb6032cf4cbdd9ad7b5d14.png)

Happy programming.

PS the issues below are solved in this tutorial

TIP: Use tasker State -\>Power to make a flow based on this action to find out if your phine is hooked up.  
Or Event → Phone ringing → Sonos says whoś calling and pauses Netflix  
etc etc

---

<div class="post-metadata">

**Author:** ![Kevin\_Ponsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_ponsen/32/92414_2.png) [@Kevin\_Ponsen](https://community.homey.app/u/Kevin_Ponsen)\
**Post date:** [January 23, 2024, 5:42pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/2 "2024-01-23T17:42:58Z")

</div>

🇳🇱 Nederlands :  
Bedankt voor de tutorial met afbeeldingen  
maar ik heb een vraag  
ik heb alles gedaan zoals beschreven en uitgelegd maar batterij is 44% maar homey geeft nogsteeds aan 0% ?  
wat kan er fout zijn ?

🇬🇧 English :  
thank you very much for this tutorial with images  
but i have a question  
i have done every thing from this tutorial but battery level is 44% but homey still tells me its 0 ?  
what can i have done wrong ?

 ![1](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/5/a5f38176d85cf98341b8b3072fb162dac2b85c02.jpeg)  
 ![2](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/c/fc4fad1326169702ae6bcd5512031729af5ad79a.jpeg)  
 ![3](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/5/c52f013e4395ac317eef82a099379c377a75c979.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 23, 2024, 5:54pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/3 "2024-01-23T17:54:18Z")

</div>

Try attaching some timeline or log cards to all 3 flow cards.  
That way you can see whether there’s a webhook received, or not.

---

<div class="post-metadata">

**Author:** ![Kevin\_Ponsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_ponsen/32/92414_2.png) [@Kevin\_Ponsen](https://community.homey.app/u/Kevin_Ponsen)\
**Post date:** [January 23, 2024, 5:55pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/4 "2024-01-23T17:55:49Z")

</div>

🇳🇱 Nederlands:  
daar was ik nu mee bezig maar krijg nu op mijn chromebook deze melding

🇬🇧 English:  
is was adding timeline logcard but then got this message

 ![4](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/5/c59f99550dc2bf76034072a8582e7ae32027af1a.jpeg)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 23, 2024, 6:10pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/5 "2024-01-23T18:10:37Z")

</div>

Have you set up http method GET?

 ![Screenshot_20240123-190934_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/3/037078663e9dd9f1206554357f77744c25b76eb5.jpeg)

.

OWH!  
There appears to be a whitespace in your webhook!❌

 ![Screenshot_20240123-190606_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/c/4c3c0e0c1efb065606e6fb75005d994e39390c32.jpeg)

.  
Ah, I see the cause already. The example URL also has a whitespace at that position 🙈

> [@Paul\_van\_Ulft](#):
>
> https ://webhook.homey.app/(youthomey-id)/batterij-level?tag=%BATT

@Paul_van_Ulft would you mind removing the whitespace from the sample URL?

---

<div class="post-metadata">

**Author:** ![Kevin\_Ponsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_ponsen/32/92414_2.png) [@Kevin\_Ponsen](https://community.homey.app/u/Kevin_Ponsen)\
**Post date:** [January 23, 2024, 6:12pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/6 "2024-01-23T18:12:42Z")

</div>

🇳🇱 Nederlands:  
je heb gelijk super bedankt het was de spatie  
op mijn chromebook zie je die spatie bijna niet zo smal dit werk nu bedankt 😃  
🇬🇧 English:  
Your right thanks in advance it was a white space  
on chromebook you cant almost not see the white space it works thanks

---

<div class="post-metadata">

**Author:** ![Kevin\_Ponsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_ponsen/32/92414_2.png) [@Kevin\_Ponsen](https://community.homey.app/u/Kevin_Ponsen)\
**Post date:** [January 23, 2024, 9:01pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/7 "2024-01-23T21:01:05Z")

</div>

🇳🇱 Nederlands:  
alles werkt weer nu zonder life360 super bedankt !!! @Paul_van_Ulft en @Peter_Kawa  
voor de tutorial en fix

🇬🇧 English:  
Everything is working now without life360 thanks in advance !!! @Paul_van_Ulft and @Peter_Kawa  
for the tutorial and fix  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/0/20bcd4965732376c45c578ccf1ee54fc728e81ab.png)

---

<div class="post-metadata">

**Author:** ![Paul\_van\_Ulft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/paul_van_ulft/32/56539_2.png) [@Paul\_van\_Ulft](https://community.homey.app/u/Paul_van_Ulft)\
**Post date:** [January 23, 2024, 10:01pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/8 "2024-01-23T22:01:18Z")

</div>

Removed space from link 👍

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [January 24, 2024, 12:45pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/10 "2024-01-24T12:45:47Z")

</div>

> [@Paul\_van\_Ulft](#):
>
> Iphone

The app _ **Tasker** _ is not available for iPhone, just a info.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 24, 2024, 4:51pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/11 "2024-01-24T16:51:36Z")

</div>

Posts translated.  
Yeah it’s my bad, I started babbling in Dutch appearantly 🫣 🫢

---

<div class="post-metadata">

**Author:** ![Kevin\_Ponsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_ponsen/32/92414_2.png) [@Kevin\_Ponsen](https://community.homey.app/u/Kevin_Ponsen)\
**Post date:** [January 26, 2024, 3:30pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/12 "2024-01-26T15:30:07Z")

</div>

🇳🇱 Nederlands : Sorry heb het aangepast

🇬🇧 English: Sorry i have edited it

---

<div class="post-metadata">

**Author:** ![Peter\_Johnsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_johnsson/32/563_2.png) [@Peter\_Johnsson](https://community.homey.app/u/Peter_Johnsson)\
**Post date:** [January 31, 2024, 1:01pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/13 "2024-01-31T13:01:51Z")

</div>

Thanks for a very good tutorial! Is is possible to go the other way? i.e. from Homey to tasker?

Regards from Sweden  
//Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 31, 2024, 9:19pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/14 "2024-01-31T21:19:53Z")

</div>

Hej Peter,

With Macrodroid it’s quite simple, it can read notifications. I guess Tasker could read notifications as well.

Example  
I send a push notif to myself with ‘homey-naar-android’ (homey-to-android)

 ![Screenshot_20240131-215212_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/4/44d0310a3a06f7000a18ff1d900b1f6fb89b2b2e.jpeg)

This macro listens, and acts if the phrase AND the app name Homey matches on new notifications:

 ![Screenshot_20240131-222134_Google](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/b/1b676d662d7ae573dc5ce79a3b51879057d32538.jpeg)  
 ![Screenshot_20240131-222208_Google](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/5/25cd203556ec7fd64eaf60466827bb04d67350f3.jpeg)

---

<div class="post-metadata">

**Author:** ![Peter\_Johnsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_johnsson/32/563_2.png) [@Peter\_Johnsson](https://community.homey.app/u/Peter_Johnsson)\
**Post date:** [February 2, 2024, 4:11pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/15 "2024-02-02T16:11:30Z")

</div>

Many thanks, Peter. I will give it a try.  
//Peter

---

<div class="post-metadata">

**Author:** ![smv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smv/32/79673_2.png) [@smv](https://community.homey.app/u/smv)\
**Post date:** [February 25, 2024, 12:34pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/16 "2024-02-25T12:34:56Z")

</div>

nevermind

---

<div class="post-metadata">

**Author:** ![Bartj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bartj/32/56465_2.png) [@Bartj](https://community.homey.app/u/Bartj)\
**Post date:** [February 27, 2024, 7:23pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/17 "2024-02-27T19:23:54Z")

</div>

Does anyone got that working with macrodroid?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 27, 2024, 7:42pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/18 "2024-02-27T19:42:43Z")

</div>

Where do you get stuck?

---

<div class="post-metadata">

**Author:** ![Bartj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bartj/32/56465_2.png) [@Bartj](https://community.homey.app/u/Bartj)\
**Post date:** [February 27, 2024, 9:27pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/19 "2024-02-27T21:27:49Z")

</div>

I don’t receive the info in my homey. So i think it’s the webhook itself. I use the same method like shown above.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 27, 2024, 11:12pm UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/20 "2024-02-27T23:12:51Z")

</div>

The last posts were about a push message from Homey _ **to your phone** _, which gets read by Macrodroid.  
You seem to be busy to send a webhook from your phone to Homey, as mentioned earlier in this topic.  
OK, when you open this URL below in a browser, it should return two letters: **`"ok"`**  
`https://webhook.homey.app/(your_homey-id)/my_event?tag=my_tag`

 ![Screenshot from 2024-02-28 00-17-56](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/8/c8f2672dcd2d00318b4725eaab5772db67943717.png)

When it does, the webhook is okay and received by Homey, the problem is somewhere in your flow.  
BTW You know where to find your homey ID? It’s in the web app URL, right after …/homeys/

---

<div class="post-metadata">

**Author:** ![Bartj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bartj/32/56465_2.png) [@Bartj](https://community.homey.app/u/Bartj)\
**Post date:** [February 28, 2024, 7:55am UTC](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085/21 "2024-02-28T07:55:24Z")

</div>

The link shown OK  
Yes i know where to find the homey ID

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/0/d0d2c1125594aa0d2d6ef572a0dfecf85f1b48a1.png)  
this is the flow where i store it in my variable, but still showing 0  
the first part batterij-level is just the name from the url you made in macrodroid, right?

[https://webhook.homey.app/\*\*\*\*homey](https://webhook.homey.app/ **** homey) ID\*\*\*\*/batterij-level?tag=%BATT

[Next page](https://community.homey.app/t/how-to-using-tasker-to-send-battery-level-from-phone-to-homey/102085.md?page=2)
