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.
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.