Tutorial: Use Tasker popup menus & HE integration (Android)

I've been using this for a while, and it works very well. Saves phone real estate, and all my (local/cloud) endpoint triggers are in the same place.

Let me show it to you. The first widget (Home) is for setting the volume/loudness/silence of my phone, and has nothing to do with HE. The second widget (control) all link to various end points in HE. Recorded on a computer with screen mirroring to android, hence mouse, not finger, but you get the idea.

ezgif-7-def6c2c8ee6d Each of the "Control" options calls a HE endpoint.

I didnt select the HE Control menu items 1 through 4, because it would turn off my computer, or open garage door, or arm my alarm....but each is selectable individually and sends a HTTP request through to HE.

There are 4 major steps to this integration
Step 1. Create endpoints (in HE)
Step 2. Installing Tasker and importing the data
Step 3. Turn on/off my volume profiles (in tasker) Either turn on or off the volume profiles.
Step 4. Link HE endpoints to tasker (in tasker)

Step 1. Create endpoints (in HE)

Create a rule with a trigger being the local/cloud end point. Up to you whether you want it to happen only at home, or both home and away (but cloud dependent)

At some point, you will need to copy the cloud/local endpoint and it's best to email it to yourself, so you can grab it on your phone - you dont want to type it in. It will look something like this:
(cloud endpoint) https://cloud.hubitat.com/api/really-long-number/apps/33/trigger?access_token=another-long-number

Then update the rule with your actions. This particular rule Arms my home alarm (when I'm running late and I can activate it walking for the train/bus). Probably best to start with something simple, like turning on a light.

Step 2. Installing Tasker and importing the data

a. Buy tasker, if you have not already. It's well worth it. Install tasker.

b. Open Tasker and swipe away any prompts/popups

c. Click this link on your phone. It will not overwrite your existing profiles, unless they have the same name. Nonetheless, perform a backup if you have existing Tasker profiles/tasks. After backup (if required), click the link above, and select Yes, and then enable the profiles immediately when the prompt pops up (yes).

You should have a page/tab down the bottom with a House on it (like in the picture above, but no Man to the left, you'll have something else).

Now, escape out of Tasker (dont press home button), and give Tasker the required permissions. There are around 3 or 4 if you are new to Tasker. You need to turn off battery optimisation, permission to change system settings, etc. You probably want to turn off the persisent notification (best to do it under Android notification settings, for Android ?8? and 9, but you can do it under Tasker as well.

(if you are new to Tasker, think of Profiles as HE Triggers, and Tasks as HE Actions)

Step 3. Turn on/off my volume profiles (in tasker)

If you want the volume profiles, leave them on, (it's helpful to learn Tasker with training wheels, where you dont have to change anything). Otherise, turn them off. To turn them off, navigate to the Profiles page (pictured below) and turn off the profiles except HE Control.

Do not turn off HE Control.

If you leave them on, this is what they do:
Profile Click is the guts behind the popup menu/widget
Profile Boot selects Profile Home (normal volume), upon phone boot
10pm sets the phone to silent via the Profile Silent, among other things (under tasks, next tab)
6:30am, sets the phone to Profile Home (under tasks, next tab)

Turn them off if you dont want them active, by sliding the slider. You'll have to disable any quiet times in the Android system if you want to utilise these rules.

You can change the times (under Profile tab), or anything that happens upon activating those profiles (under tasks, the next tab), such as turn on/off bluetooth, wifi, brightness etc). Clarification: volume may not work for some android brands/devices. And you will need to give the appropriate permissions. Tasker will have prompted you for permissions after import of backup).

e. Place the widget on the desktop. In order to place the widget, make sure you escape out of Tasker (dont hit the home button). Longclick on the phone desktop and add widget, scroll down until you find Tasker. There are 3 Tasker widgets, select the first one (Task), and drag it to the desktop. When the popup opens, select "Profile Select"

Now, press the new widget and it will popup with the menu, select Profile Home, see if it works (it should change to Home, and get a flash (toast) message "Home". Check your volumes changed. Now select silent, and check for the toast message and the icon change. If it doenst work, you'll have to give tasker the required permissions. Drag the widget to your desired home screen location.

If you want to change the icons for the widget on the desktop, you need to change it under Tasks | Profile Select. I find that the Material Icons work best for the Icons on the desktop. If you want to change the icons for the popup menu, you change it under Tasks | Profile Select | Menu Select| and each individual item. I find that Material icons (the lighter ones) work best for the icons on the popup (as the popup is a dark screen).

Here are what the profiles do:

  • Home: Normal profile for everyday use around the Home
  • Work: Reduced volume for at the workplace
  • Vibration: Vibration
  • Silence: Silent, except my family (I've taken this out)
  • Nothing: Nothing, nothing, nothing, (for presenting)
  • Loud: Loud (for when outside, dont want to miss a call etc)
  • Media: Louder bluetooth volume for easier listening.

Step 4. Link HE endpoints to tasker (in tasker)

a. On your phone, copy the endpoint link from Step 1. On phone, Click Tasks | HE Task 1 | and click on 1. HTTP Request. Paste the copied link into the URL box where it says "copy HE endpoint here". Escape one screen, and click 2. Flash. Type what it is the link actually does. This will flash up down the bottom of the screen after you hit this on the popup menu. This is simply a toast message.

b. Escape back to the Tasks page. Select HE Control | Menu | Select Task 1 under Items, and remove the name Task 1 and give it a short name you can understand, ie: Arm Alarm (probably the same as the flash/toast message text in step 4a. And change the icon to something appropriate. (Material Icons are the best for the popup menu). Unlike Step 3, where we are not changing the icon on the phone's desktop each time we press it, this is simple. You only need to change the icon on the popup screen.

c. Repeat steps 4a and 4b for all your HE endpoints 1 through 7, and win. Summary: change the endpoint, the popup title, and the flash message for each of the 7 options.

Hope this helps y'all.

Troubleshooting:
First determine where the problem lies:
Get the endpoint from tasker and paste it into a web browser, and hit enter. If the HE rule doesnt fire, then the issue is you have the wrong end point. If it does fire, the issue is with tasker.

Next up, automatically shut down the house when you place your phone face down and it's plugged in.

7 Likes

Great write up @mike . Question, if I take your back up would I loose my current profiles and tasks?

Yes, after some investigation, it will.

I've found another way to share the data, and I'll update the OP in a while.

Edit: I've edited the OP (Step 2b and c) to import the data without overwriting current data. Nonetheless, perform a backup of your current data beforehand.

I do similar but simpler. I use Android Auto while driving but it won't let you open any other apps outside of the ones in its "world". I got around that by creating a tiny overlay scene (the Tasker logo indicated by red arrow).

If I press that, it opens another scene that gives me a button to open Hubitat mobile app (MOST IMPORTANT!!!), text messaging program, or open/close garage door. Android Auto wouldn't allow me to get to any of that functionality natively. It won't even allow me to open the MyQ app to open garage door that way.

Not fancy but gets the job done and makes it easier to use Android Auto. For those of you on Android, Car Home Ultra is another great Car Dock app that allows you to use Tasker Shortcuts natively. However, I didn't like the way it handled the music apps like IHeartRadio, Pandora, etc.

Hi @mike,
Excellent write up and great idea using tasker and hubitat.
I personally find it inconvenient and slow to open the hubitat dashboard and turn devices manually on or off if I have to! As I don't have switches all around the house.

Question: the HE control widget only has 7 tasks.
I would like to create groups and bring all my lights, locks, switches under HE control .
For example, if task 1 is 'group passage lights', and if I click on it will show another grid with all passage lights separately so that I can turn on and off manually. Is there anyway this can be done?

Yes, you could easily do that. You'd just need to change the command for the first task to open a second popup menu/window. Or, you could have multiple widgets on your phone desktop/screen. Or you could change it so that you have more than 7 options in the popup.

Thanks, will try and let you know how it went!

Can you help on how to do this? I looked into multiple forums but couldnt get what I was looking for.

It's definitely possible, because I just tried it and did it. You'll need to play around with time-outs and whether the current popup menu sits over the screen (KEYGUARD).

Go into the main menu for the popup (in tasker). Select the main popup option (for example, Control). Select only option. Select any of the 7 tasks on that page, say the first one under items. Change the label and action (press the search key under action, then press the search key under Name and select Profile Select (which is the default profile main menu for the profiles task)). If you then back out until you can press the tick near the top right.

Then go to your desktop/screen and press Control, and menu should popup, then select the subtask that you just changed and it should popup with a different popup. The issue is that since I've/you've given the first menu (Control) the ability to popup over the other items on the screen, when the second menu opens, it appears under the first. As I said, you'll need to play around with keyguards and how long the menu remains on the screen.

It might just be easier to have multiple popups widgets for each of the types of tasks that you want, in conjunction with increasing the 7 tasks on each popup menu. I have 2 presently.

Very nice. I did something similar as while back

I don't believe maker api was a thing at the time

This is AWESOME! I just was wondering how I could make my August Lock easier to unlock with Tasker and this was the trick! Thanks for the write up. :slight_smile:

1 Like

Download the Hubitat app