• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Tasker scene "go" code for home automation

paulheth

Lurker
First post, thanks for any consideration.

I have all the home automation gear and tasker tasks setup to make this "welcome home" app work but have no idea how to trigger the tasks based on the selected checkboxes on the go button press. The dialogue will pop up when we arrive in the driveway (sensing our home wifi).

I'm have almost zero coding background, and amazed at how far one can get with tasker without it. But I have hit a wall here.

Suggestions appreciated.
 

Attachments

  • tasker Screenshot_2015-12-28-02-57-56.png
    tasker Screenshot_2015-12-28-02-57-56.png
    459.9 KB · Views: 151
Welcome to Android Forums.

In the scene editor ...
Go to the Go button.
Pull down the Tap Action from the top of the screen.
Enter whatever you want.

When the scene is loaded if the button is tapped it w1ill do whatever t you defined.

You could make the code a separate task (like TapTest) and in the Tap Action pull down have ...
Perform task TapTest.

... Thom
 
Welcome to Android Forums.

In the scene editor ...
Go to the Go button.
Pull down the Tap Action from the top of the screen.
Enter whatever you want.

When the scene is loaded if the button is tapped it w1ill do whatever t you defined.

You could make the code a separate task (like TapTest) and in the Tap Action pull down have ...
Perform task TapTest.

... Thom

Thanks for the reply Thom. But that much I have figured out. It's exactly what code to enter that would evaluate the status of each check box and include that task in the actions carried out is the trick.

I am guessing some kind of string of nested if statements, but not having a programming background I'm not sure where to start.

Even some kind of related example would be helpful.

Thanks.
 
I've actually found Tasker amazingly easy to do very detailed things. As a matter of fact it has been the only solution I have found that can get around wink hub api limitations to enable opening of zwave locks automatically.

I have to say I don't see macrodroid as a good alternative at all in this case.
 
But that much I have figured out

Posting what you have when you ask the question and asking very specific questions would be VERY helpful.

What is supposed to happen if a box is checked?
What is the expected flow of control that you are trying to achieve?

I suggest that to learn Tasker you start out with something simple and nibble away at it As you gain insight the project will grow.

Try getting one of the options to do what you want.

... Thom
 
Posting what you have when you ask the question and asking very specific questions would be VERY helpful.

What is supposed to happen if a box is checked?
What is the expected flow of control that you are trying to achieve?

I suggest that to learn Tasker you start out with something simple and nibble away at it As you gain insight the project will grow.

Try getting one of the options to do what you want.

... Thom
Sorry Thom. Thought that was obvious.

I'm not starting with Tasker. Have worked with it on and off for years. Have modified and created many working profiles and tasks that successful automate my home through the wink hub. But I have been able to avoid significant coding until this point. Thus the reaching out to forum experts for help.

When a box is checked that already pre-existing task is included in the list of tasks that are triggered when the go button is pressed.

Flow control seems like a programming term and I am not totally clear on what you are asking. But basically all tasks that have the box checked are triggered, those that don't are not.

Again experienced with Tasker, but not a programmer so my apologies if this is still missing needed details.

Thx.
 
So each could be a global variable that is either on or off. You could have a tap action for each that sets or unsets its global variable and reissues the scene.

When go is tapped the function checks the first global satiable with an if statement and executes that ever it is you want.

It then tests the next global variable.

If they are global variables then they can be manipulated by multiple tasks.

(I assume you are not root-ed.)

... Thom
 
I've actually found Tasker amazingly easy to do very detailed things. As a matter of fact it has been the only solution I have found that can get around wink hub api limitations to enable opening of zwave locks automatically.

I have to say I don't see macrodroid as a good alternative at all in this case.

for those that understand the coding, Tasker can be nice.
for me, it was a huge waste of money, as the coding is not at all intuitive, and I won't ever bother to take the time to work with, or try to learn it. My phone is supposed to help me, and not be a PITA to me.
 
So each could be a global variable that is either on or off. You could have a tap action for each that sets or unsets its global variable and reissues the scene.

When go is tapped the function checks the first global satiable with an if statement and executes that ever it is you want.

It then tests the next global variable.

If they are global variables then they can be manipulated by multiple tasks.

(I assume you are not root-ed.)

... Thom
Ah yes. That makes sense. Haven't created global variables much but have edited them so could probably get there. Thanks Thom that is exactly the tip I needed.

AZgl1500: Agreed tasker isn't for everyone. But I am not by any stretch a programmer and it has allowed me to create apps all the way to apk with little or no coding (my fav so far allows my wife to open the garage with a click of a shortcut). I can see a spot in the market for MacroDroid but it doesn't seem to touch the power of Tasker.
 
Tasker is for people who want to get their hands dirty and do something Their Way. It is not for everyone. The true power of Android is that there is room for both points of view.

... Thom
 
Tasker is for people who want to get their hands dirty and do something Their Way. It is not for everyone. The true power of Android is that there is room for both points of view.

... Thom

Thom is quite correct..... I just choose to not get involved with coding.... I retired from that life, and don't want any more of it. Now, I just want to cruise on "easy street" and MacroDroid fulfills my simple requirements w/o any muss or fuss. I have never learned Android, nor do I want to. I have a laptop that I just yesterday put Linux Mint 17.3 on simply because I got my belly full of Microsoft in my working life, and hate Win10 with a passion...

Linux installed w/o me doing anything much at all, Firefox cruises thru the internet like a breeze, it is a great little laptop now for my motorcycle saddlebag.... enuff said on that.
 
I have all the home automation gear and tasker tasks setup to make this "welcome home" app work but have no idea how to trigger the tasks based on the selected checkboxes on the go button press.

Here's a new idea ... 7 profile/tasks and 1 task.

The 1 task sets the 7 global variables for the options that you want to invoke. Since they are global they will remain set the way they were from one session to another.

Each of the 7 profiles is the home location action plus the global variable for that option.

So ... you will at sometime set the options you want. When you arrive home the options you enabled will all fire and do as you instruct.

... Thom
 
I just choose to not get involved with coding.... I retired from that life, and don't want any more of it.

I on the other hand am seduced by the process and find Tasker to be absolutely fascinating. I have been working in a lot of environments for more years then I care to relate.

I had never used an Intent in Tasker and had three projects that I wanted to convert to APKs and share a single global variable. I spent a day and a half this weekend learning Intents and find it quite fascinating. Three standalone apps created by Tasker sharing data. The overall purpose ... I have a profile that monitors the proximity sensor and turns the screen off unless I am on a phone call. The status of this profile (on of off) is what was being shared. Two other apps will call the app to disable/enable based on its state.

... Thom
 
Back
Top Bottom