The Vera Community forums have moved!

General => Remote Control => Home Buddy (Android) => Topic started by: rakstar on December 15, 2010, 04:34:02 am

Title: Tasker Integration
Post by: rakstar on December 15, 2010, 04:34:02 am
This is pretty awesome and I think you'd all agree.  I created a video tutorial on how to execute Home Buddy scenes through Tasker.  Now you can activate scenes on events you specify -- ex. when your device connects to your home wifi, when you get within a certain radius of a GPS location, when you dock your phone, etc.

Check out my Tips and Tricks page
https://sites.google.com/site/rakstar/homebuddy/tips

Feel free to use this topic to post questions or your experiences with Home Buddy/Tasker integration.
Title: Re: Tasker Integration
Post by: kd5ftn on December 16, 2010, 12:49:22 pm
rakstar, this is awesome.

So far, I've used your tutorial and have created two profiles in Tasker. One that fires my "Lights On" scene when I connect to my home wifi network and a second profile that runs my "Lights Off" scene when I disconnect from my home wifi network.

I noticed the "Lights Off" scene was failing. This may be because it was trying to send the data right as the phone was switching network connections to 3G, so I added a short "wait" in tasker that will fire the "Lights Off" scene 10 seconds after it detects I've disconnected from the network.

I've only had this setup for a few hours now, so it's hard to tell if this will be practical for not. If your wifi randomly disconnects/reconnects on your phone while at home, it will trigger the lights to turn off/back on, so that may be pretty undesirable.

All in all, some seriously cool things that can be done when combining Tasker with Homebuddy.

Title: Re: Tasker Integration
Post by: rakstar on December 17, 2010, 12:09:11 am
@kd5ftn Thanks for posting.  This is exactly what I was hoping to get from the community, some actual user experiences.  Perhaps an alternative is to do location based triggers -- so trigger your "Lights Off" scene when you get outside a specific radius of your house.  I'm not sure if this will work better or worse than the wifi-based setup but might be worth a shot.
Title: Re: Tasker Integration
Post by: kd5ftn on December 17, 2010, 12:17:17 pm
You're exactly right rakstar, some additional logic would be required to make this function more fluidly. Right now, it's not bullet-proof. There's a few issues.

I'm a little hesitant in using Tasker's location-based context for this action. I'm already not satisfied with the battery life on my Evo, and there's got to be some impact from location polling that may shorten my battery life.

Perhaps using bluetooth connection for determining state, or even checking from an always on PC if the device is connected to the network may work better.

I look forward to hearing from others experimentation!
Title: Re: Tasker Integration
Post by: mario23 on December 20, 2010, 02:58:02 pm
Awesome!!!

I saw this while browsing the Tasker site looking for a solution.

Well done sir!
Title: Re: Tasker Integration
Post by: mario23 on December 21, 2010, 09:58:30 am
deleted for redundancy
Title: Re: Tasker Integration
Post by: mario23 on December 21, 2010, 10:19:05 am
You're exactly right rakstar, some additional logic would be required to make this function more fluidly. Right now, it's not bullet-proof. There's a few issues.
  • No audible confirmation from Home Buddy if the scene has been executed. If homebuddy encounters an error trying to execute a scene, a message will pop up on screen for a second, but if you have your phone in your hand, then there's not really a need for automating this with Tasker.
  • WiFi Connection may not be the best way to trigger scenes. I woke up at some point last night to all my lights being on. Apparently my phone dropped my wifi connection and reconnected, triggering the "Lights On" scene. Perhaps additional programming logic & delays in tasker can prevent re-connects from being interpreted as "coming home"

I'm a little hesitant in using Tasker's location-based context for this action. I'm already not satisfied with the battery life on my Evo, and there's got to be some impact from location polling that may shorten my battery life.

Perhaps using bluetooth connection for determining state, or even checking from an always on PC if the device is connected to the network may work better.

I look forward to hearing from others experimentation!


Hey have you rooted your Evo yet?
I'm getting around 26 hours on a charge with a custom rom and kernal.
Just wanted to let you know as I had battery issues as well.
Title: Re: Tasker Integration
Post by: mario23 on December 11, 2011, 09:29:50 pm
Hey rakstar, can you help me find the scene id number in my setup?
I see a whole lot of text but want to make sure I can figure this out.

I was also curious if you were going to update the app to work with google tv now that we finally have the market on there.

Thanks
Title: Re: Tasker Integration
Post by: rakstar on December 11, 2011, 11:09:14 pm
@mario23 First of all, thank you so much for your donation!  I really appreciate it.

You could also use this site, http://jsonlint.com, to make the output a little more readable.  Or just email me your user data and I'll list them out for you.

I just got my Revue update yesterday (good stuff!) so yes I will for sure!  I've actually started on it already but I'm re-writing some other parts as well so it might take a while.
Title: Re: Tasker Integration
Post by: kgrr on December 14, 2011, 02:49:08 pm
Definitely awesome.  It seems to work well on my T-Mobile Samsung Galaxy S - Vibrant
---------------------
Vera2 (1.1.1350, UI4); ACT ZRW113W; GE/Jasco 45600, 45602, 45604, 45605 x3, 45606 x4, 45609 x11, 45614; Hawking HRDS1 x3; Intermatic CA9000 x2; Schlage BE369GR, WCE100; Trane TZEMT400AB32MAA
Title: Re: Tasker Integration
Post by: davem2421 on December 28, 2011, 12:43:23 pm
How do I locate the device ID in UI5?

I was playing around with tasker and took a guess at a device ID but I'd like to set something up for a specific task just not sure how to locate that info with the new UI.

very cool by the way!!!

Thanks for sharing
Title: Re: Tasker Integration
Post by: rakstar on December 30, 2011, 12:05:41 am
How do I locate the device ID in UI5?

I was playing around with tasker and took a guess at a device ID but I'd like to set something up for a specific task just not sure how to locate that info with the new UI.

very cool by the way!!!

Thanks for sharing

I have yet to upgrade to UI5 so I can't tell you where to find it in the UI, but if you're familiar with JSON, you can get it from your user data.  Follow the instructions here:

https://sites.google.com/site/rakstar/homebuddy/troubleshooting#user_data

then format the output here:

http://jsonlint.com/
Title: Re: Tasker Integration
Post by: davem2421 on January 10, 2012, 07:43:08 am
thanks! will give it a shoot
Title: Re: Tasker Integration
Post by: mogul on January 22, 2012, 01:43:31 am
Just tried this for the first time and it worked great!  ;D

I noticed that Tasker has a bunch of actions for specific apps listed under "3rd Party Actions"... I think if you talk to the author about adding specific support, you could make setup a whole lot easer. For example, in Tasker it would be: "3rd Party Actions > Home Buddy > Trigger Scene > (click magnifying glass) > (pick scene from list)"

Would be awesome!
Title: Re: Tasker Integration
Post by: Ap15e on January 22, 2012, 09:06:56 am
The LSI (Luup System Information) plugin provides device ids and scene ids.
Title: Re: Tasker Integration
Post by: radix on May 26, 2012, 01:20:09 am
As you note on the Tips and Tricks page the data format for intents changed in v.28 from what you see in the video. The problem is however on the website you list the new data format as homebuddy://activate=<vera id>&scene=<scene id> but on the changelog for Home Buddy you list it as homebuddy://activate?vera=<serial no>&scene=<scene id> Looks like the changlog is correct and the website is wrong. You should use the the activate?vera= format rather then the activate=<vera id> suggested on the website. rakstar would you update the website please? this was kinda a pain the in the rear for me.
Title: Re: Tasker Integration
Post by: rakstar on May 27, 2012, 08:53:55 am
Site update... so sorry about the typo  :-[
Title: Re: Tasker Integration
Post by: stuartluck on July 28, 2012, 06:19:53 am
I have successfully used Tasker to active a scene in Homebuddy when I connect to my wifi and have included a task to generate a notification when the profile is activated. I use the notification as Homebuddy only briefly displays a message which could be missed.

However this method may not be a true notification that the scene has been actioned in Homebuddy as this is assumed by Tasker. I would like to know if it is possible to set up a task to pick up the return confirmation message from Homebuddy to action a notification and signal a confirmed scene activation.

 
Title: Re: Tasker Integration
Post by: rakstar on July 28, 2012, 10:55:13 am
Right now there's no way to do that, but what about if I add a "notify" parameter to the url, for example:

homebuddy://activate?vera=<vera id>&scene=<scene id>&notify=true

this would tell Home Buddy to create a notification instead of a toast message -- will that work for you?
Title: Re: Tasker Integration
Post by: Will H on July 28, 2012, 11:32:38 am
I'm interested in a true notification as well, and what you propose would work for me.
Title: Re: Tasker Integration
Post by: guest17681 on July 30, 2012, 10:06:26 am
Are there any similar solutions for the iPhone platform?  I've been looking for something simliar to this to help control door locks and such as I enter and exit my home.
Title: Re: Tasker Integration
Post by: garrettwp on July 30, 2012, 10:12:15 am
Not that I know of. You might have better luck asking in the Automator forum.

- Garrett
Title: Re: Tasker Integration
Post by: stuartluck on July 31, 2012, 12:19:54 pm
Right now there's no way to do that, but what about if I add a "notify" parameter to the url, for example:

homebuddy://activate?vera=<vera id>&scene=<scene id>&notify=true

this would tell Home Buddy to create a notification instead of a toast message -- will that work for you?

This would work for me.
Title: Re: Tasker Integration
Post by: SteveZ on October 02, 2012, 09:21:50 pm
I am having a problem with homebuddy crashing every time i test the scene in tasker, I have a newer version of tasker then the video shows but everything is the same. in the execute its not called action intent its called send intent and i have followed the new formate listed above, any ideas what could cause it to not work?

Thanks

Title: Re: Tasker Integration
Post by: rakstar on October 02, 2012, 11:40:50 pm
Another user had a similar problem because he left the "<" and ">" characters in.  Does your intent look like the following?

homebuddy://activate?vera=12345&scene=1
Title: Re: Tasker Integration
Post by: SteveZ on October 03, 2012, 10:21:51 am
yes that is what it looks like but i have that in the data box and the android.intent.action.VIEW in the action box. does that sound right?

thanks for your help

Title: Re: Tasker Integration
Post by: rakstar on October 03, 2012, 10:38:20 am
Did you set Target to Activity as shown here (https://www.youtube.com/watch?v=PwMQgLPRpUw&feature=player_detailpage#t=82s)?
Title: Re: Tasker Integration
Post by: SteveZ on October 03, 2012, 12:12:09 pm
Yes I did

Title: Re: Tasker Integration
Post by: rakstar on October 03, 2012, 12:52:51 pm
Can you email me your user data and the intent string?
Title: Re: Tasker Integration
Post by: SteveZ on October 03, 2012, 04:54:28 pm
Okay I found the problem, I had the v in Vera capitalized  and didn't see it.

Thank you for your help I really appreciate it
Title: Re: Tasker Integration
Post by: rakstar on October 04, 2012, 12:02:01 pm
Awesome! You're welcome.
Title: Re: Tasker Integration
Post by: allard083 on November 26, 2012, 04:37:01 pm
Hello. Great appli !
Can we use device or virtual device with tasker instead of scenes ?

I would like use ON or OFF button and note scène.
Title: Re: Tasker Integration
Post by: rakstar on November 26, 2012, 04:50:55 pm
That's on the list, but very low priority to be honest.  I have very little time to work on the app so it might be a while until this feature ever sees light.

I know it's not ideal, but what I do is I have a scenes set up to do the individual device controls, then I just hide (using the favorite stars) the scenes that I don't want to see.  I hope that helps, at least for now.
Title: Re: Tasker Integration
Post by: allard083 on November 27, 2012, 04:38:01 pm
Ok ok. I would like to turn on all the lights when I shake my phone the first time and turn everything off when I shake my phone the second time.

I created a virtual device that triggers the scene all the lights on and off all the lights. For the moment I shake my phone and the lights ON. I don't know switch off lights with the same gesture.

Title: Re: Tasker Integration
Post by: rakstar on November 27, 2012, 06:16:24 pm
I feel like you can accomplish this with some LUA scripting magic.  Unfortunately, that is not my expertise... anyone out there up to the task?
Title: Re: Tasker Integration
Post by: SteveZ on November 27, 2012, 07:59:00 pm
allard, create a new scene and go to the advanced tab and select your virtual switch then in the drop down menu select toggle state, then use this scene in tasker.
Title: Re: Tasker Integration
Post by: dklinkman on January 03, 2013, 11:53:52 pm
I am trying to set up a task in Tasker to try the homebuddy:// integration. When I execute the task there is a few second delay and then I always see a popup message "Unfortunately, Home Buddy has stopped."

The task type is Send Intent, the action is android.intent.action.VIEW, the data is homebuddy://activate?vera=3004629&scene=1, and the target is set to Activity.

I'm sure I am missing something as I know others have done this.  Notice anything amiss?  The vera= is the serial number of the vera3 from the bottom of the device and from the UI.  The android and the vera are on the same network.  Homebuddy itself works fine when starting the same scene.

Thanks!
Title: Re: Tasker Integration
Post by: SteveZ on January 05, 2013, 11:18:21 pm
I had the same problem and didn't catch that the auto correct made the V in vera capitalized, so make sure that everything is spelled out correctly, 
Title: Re: Tasker Integration
Post by: dklinkman on January 07, 2013, 02:35:09 pm
I did check that yes.  tks
Title: Re: Tasker Integration
Post by: dklinkman on January 08, 2013, 02:31:34 pm
Figured it out finally.  A wee little space among the parameters. Much harder to see with a variable pitch font than with a fixed pitch.  Maybe the boss will add parameter checking some day!  But for the price I can live without it.  lol
Title: Re: Tasker Integration
Post by: signal15 on February 28, 2013, 06:02:11 pm
I got this working on mine also.  I created a Scene called Quiet Kids which uses Vera Alerts to say "Kids, Daddy is on the phone right now for work.  You need to be quiet."

Then, tasker is set up for:
- Phone offhook
- Time between 7:30am and 5:15pm
- Date is Mon-Fri
- One of my wifi networks is near

Then it executes the scene.  I set the cooldown period to 15 minutes to improve the Wife Acceptance Factor.  Now, when I make a call or answer one during work hours and I'm at home, Vera tells the kids to shut up.  :)
Title: Re: Tasker Integration
Post by: allmoney.ws on June 29, 2013, 04:23:12 pm
Is it right, that Scene ID I can get from here? (34 in my case)
Title: Re: Tasker Integration
Post by: allmoney.ws on June 29, 2013, 04:36:53 pm
Where is mistake? Not work for me :(
A1: Send Intent [ Action:android.intent.action.VIEW Cat:None Mime Type: Data:homebuddy://activate?vera=3XXXXXX5&scene=34 Extra: Extra: Package: Class: Target:Activity ]
 ???
Title: Re: Tasker Integration
Post by: Pestus on August 23, 2013, 07:41:10 pm
Home Buddy is a fantastic app.   The integration with Tasker makes for killer automation!!!  Thank you Rakstar!

I'm not sure if the issue regarding a need for a full refresh has been solved.  I'm using Home Buddy widgets as an easy means of activating certain things, and they appear to fail once every week or two.  The reason being is the need to go into Home Buddy to do a full refresh.  I'm not convinced that it's due to configuration changes insisting on a full refresh.  It sometimes appears to occur unpredictably.

If Home Buddy seems to require a refresh periodically, can an intent message cause Home Buddy to do this, say... on a schedule?  Or even better, is there a way to have Home Buddy run as a service, such that it updates on it's own?

Thanks in advance!
Title: Re: Tasker Integration
Post by: persimmonx on November 28, 2013, 11:08:53 pm
@rakstar

It would be great if Home Buddy would refresh in the background. Often when I want to use it, I have to wait till it refreshes, which is annoying. Actually, I stopped using it because of this.

Thanks.