[HOW TO] Dynamically charge your dashboard tablet using "Tasker" app

You can control a Homey plug from your Android tablet based on tablet battery SoC to dynamically charge your tablet. You can use the Android “Tasker” app.

The tasker app has tabs for triggers (Profile) and actions (Tasks). You can create a trigger/profile to react on a device event. Then you create a task with an action. This task is assigned to the trigger, so it’s executed if the trigger occours.
You can deactivate profiles if you want to stop using them wirhout deleting.


STEP 1: Add a profile

Create a profile and select the “Event” type.

Select “Charging”/“Battery” category, then select “Battery changed” event.

STEP 2: Create a task

Now Tasker asks you to select a task. Create a new one and give it a name.


Add an action to your task.

Select “Network” category and “HTTP request” action.

Insert the Homey Webhook URL. Add your Wekhook event (event=xxx) that can be used as Homey trigger. Then add the tag (tag=xxx) to pass the current battery state.
Select the “BATT” variable from the list using the icon at the right.

STEP 3: Add Homey Webhook

Add an AdvancedFlow.
Add the Webhook trigger and insert your event name used in Tasker.

The tag holds the battery state passed as tag in your Webhook URL.
Now you can convert the tag into a number tag and check the value to turn on or off your plug.

3 Likes

Hey, Tasker macht bei mir folgende Fehlermeldung

13.40.45/E add wait task
13.40.45/E Fehler: 1
13.40.45/E

Error
Cannot GET /webhock

It’s webhook, not webhock :wink:

1 Like

:see_no_evil_monkey: :person_facepalming: Its running now

Thanks :blush:

1 Like

Hallo zusammen, ein frohes Neues wünsche ich :grin:

Ich habe versucht nach dem Tutorial eine Steckdose zum Tablet laden zu schalten.

Ich habe jedoch Fragen. Ich brauche bei den Advanced Flows doch auch Variablen, oder? Ich scheitere daran, was ich als Wert eintragen muss. Das steht irgendwie nirgends beschrieben. Ich bekomme immer diesen Fehler und verzweifle langsam daran…

Hi everyone, Happy New Year! :grin:

I tried to follow the tutorial to control a power outlet for charging my tablet.

However, I have some questions. Do I need variables for the Advanced Flows? I’m stuck on what values ​​to enter. It’s not explained anywhere. I keep getting this error message and I’m starting to get really frustrated…

You have to use the tag from the trigger card. I updated the image in the 1st post.

grafik

My Problem is I don’t know what to fill in here:

Every letter I type in doesn’t work, left blank is also not workable.

You don’t need another variable. Click into the tag field, then select the tag from “This flow”. In this area, all tags from previous flow cards are available.

think I need to start from the very beginning; I think we’re talking at cross purposes :see_no_evil_monkey:

I didn’t have the webhook event option, so I created a text variable and used the event name from Tasker (Tab_s5e_w_battery). It requires a text value, so I entered “Battery”.

I also didn’t have the text tag option, so I created a text variable called “TAG”. It also requires a text value. And no matter what I enter, I keep getting this error message.

I suspect it can’t find the webhook because I’ve defined it as a variable. But I can’t select or find this webhook anywhere. I think that’s where the problem lies. Do I perhaps need to enter the IP address of the Homey device in the text variable TAG? Or the entire webhook address?

EDIT:

IP address doesn’t work.

I don’t know, where I grab the webhook

Not so complicated :grinning_face_with_smiling_eyes:
You only need the webhook name as plain text - no variable needed.

Of course you can also create a variable. Then the variable value must be the matching webhook name, not the variable name itself.

If you want to test the flow, the start it from the trigger card. You will be asked for a value (for the tag), because in test mode the flow doesn’t habe a webkook value. Enter a battery level. This way you can use a value higher/lower your conditions to check if the plus is switching.