Tasker / Llama / NFC Integration

OK so with help from an Android forum I got it working. Posting here to try to help others! In the latest Tasker, you have to hold down on the profile name to get a pop up box that says add exit task. Then you can create a new task that is triggered when you leave that location. Maybe this technique is obvious to Android users, but I like my software intuitive, and that wasn’t. Great stuff though, and credit to Garrett for Automation. I can now link all my Z-Wave devices including Philips Hue lighting and automate them according to events on my phone. If you’re eavesdropping Garrett an iPad version of Authomation would be great, when you have a few spare months that is!

Also if you haven’t heard but this topic interests you, try ifttt.com, recently launched and simple enough even for me…

Yes sorry about the confusion. It is exit task not scene and you did indeed hit the nail on the head. It took me some time to figure that one out also. Glad you got it working. Tasker + AutHomation is awesome, huh?

Yep, Philips Hue too, they have added Geofencing in three tick boxes - turn lights on when I arrive home - tick, only if it’s dark - tick, turn them off when I leave - tick. Hopefully they will add more features over time. The bulbs and controller work globally on any voltage or frequency, despite what they say. I run on 240v and 50Hz. The ifttt.com website allows me to choose a signal bulb which slowly changes colour if, for example a new email arrives, or to turn blue if rain is forecast. Worth a look. Thanks for your help.

I would like to use Utter! in combination with AutHomation, but it has no ‘global’ intent option. It provides a list with the intents (activities?) off all installed apps, where AutHomation has the intent ‘activate’ which is, I think, the most logical candidate. With long press you get extra fields to fill in, named ‘Optional action’ and 2 ‘Optional data’.

How can I activate a scene using Utter!
https://play.google.com/store/apps/details?id=com.brandall.nutter

im trying to use the voice recognition feature of authomationHD in the same way that everybody seems to be using the google now/autoshare method (obviously without using autoshare interceptor). does anybody know how this can be achieved?

for example, i want to say “home, turn lounge lights on” where “home” triggers app and i can use “%avcommnofilter” to fill in the desired action, instead of using 2 steps (“home” trigger to in-app recognition, the pause, then saying action)

I use secure setting to intercept the google now shortcut

For awhile I have been using Tasker to turn on my kitchen light when I get home (based on wifi). My next project is to control my garage door opener, and I’d like to have a profile in Tasker that will open the door automatically when I get home just like the kitchen light. Instead of setting up a scene to do both at once, I want to set that up as a separate profile but that will be triggered at the same time. That way if things aren’t going as planned with the garage door I can just turn that profile off. I wasn’t sure if I could have two separate tasks calling AutHomation at once though so I decided to test this with two tasks turning on two lights. So far, it hasn’t worked.

Here’s what I have done - I have two profiles in Tasker that activate at the same time. The task for the first is Light 1 and the task for the second is Light 2. So far only one works, even though it shows both profiles are active. Since the action for both tasks is the AutHomation plugin, I set collision handling to run both together. (By default it is abort task). That had no effect. Next, I tried to add a delay. For one task I told it to wait 1 second and that was the first action in the list, followed by AutHomation turning a light on. Still not working. I also combined both actions in to one task just to see what would happen and still only one worked.

When I check each task and hit “play” they work. But when both profiles activate at the same time, only one of the two tasks runs. Any ideas? Hopefully something simple I overlooked.

Garrett,
Can you automate/integrate the below method? Just like you have with the Tasks portion… point and choose :slight_smile:

I know it can be done with Tasker since AutoVera does it. Otherwise, this is a PITA to put in using small onscreen keyboard! Too much when you are doing several Profiles.

[quote=“silencery, post:52, topic:173172”]Just wanted to add another dimension of tasker integration. If you need tasker to read the current status of a device on your Vera network and have tasker respond accordingly, this can be done by sending a JSON request to vera. You can use the following steps:

  1. Create a new profile in Tasker (i.e. NFC tag scanned, GPS location reached, bluetooth connected, widget pushed, whatever you want to use as a trigger).
  2. In tasker, create a new matching task for your new profile.
  3. Add Action (click the + sign) → Net → HTTP Get
  4. Under the Server:Port field, add in the URL for your device status request:

[ul][li]Example to retrieve the status of a DSC Alarm: https://fwd5.mios.com/USERNAME/PASSWORD/VERA_SERIAL/data_request?id=variableget&DeviceNum=DEVICEID&serviceId=urn:micasaverde-com:serviceId:AlarmPartition2&Variable=DetailedArmMode[/li]
[li]The example above forwards through the MCV servers and requests the status of an alarm system. It’s a good idea to test the URL is working in your browser as expected before proceeding. In this case, it should show ready, exitdelay, or armed, etc.[/li]
[li]USERNAME/PASSWORD: Vera username/password[/li]
[li][VERA_SERIAL]: Vera serial found in UI5 under account → tech support tab[/li]
[li][DEVICE_ID]: Vera Device ID for the item you want to view status on. Found under the advanced tab of each individual vera device.
[/li]
[li]Make sure to include the appropriate serviceid and the variable you want information on for each device. You can find serviceid information by visiting the following URL: http://LOCAL_VERA_IP:3480/data_request?id=status&output_format=xml&DeviceNum=DEVICE_ID[/li][/ul]

  1. Under mime type, select “text/plain”
  2. The response from this HTTP request is automatically exposed to tasker as “%HTTPD”
  3. You can write tasks based on the state of the %HTTPD variable. In my case, this example task polls vera and check the status of the alarm before performing any actions. For instance, if it’s “ARMED,” tasker will disarm the alarm and include a verbal confirmation. If it’s “READY,” tasker will report accordingly and ask me if i want to arm the house.

A few caveats and suggestions:

[ul][li]Since your vera login is passed through the URL, there are high security risks. Make sure you understand this before proceeding. If absolutely necessary, it would be a good idea to at least create restricted logins for this purpose (I’m not positive, but I believe this method is how forwarding is handled by most mobile Vera apps?).[/li]
[li]If you can, a better method would be to use a VPN into your vera site location and use the local URL command instead[/li]
[li]Here is the equivalent local URL for the above JSON query: http://LOCAL_VERA_IP:3480/data_request?id=variableget&DeviceNum=DEVICEID&serviceId=urn:micasaverde-com:serviceId:AlarmPartition2&Variable=DetailedArmMode[/li]
[li]If you are using if/case statements to process the command, don’t forget to add an exit condition in case you cannot poll vera for any reason.[/li][/ul][/quote]

[quote=“Aaron, post:68, topic:173172”]Garrett,
Can you automate/integrate the below method? Just like you have with the Tasks portion… point and choose :slight_smile:

I know it can be done with Tasker since AutoVera does it. Otherwise, this is a PITA to put in using small onscreen keyboard! Too much when you are doing several Profiles.

[quote=“silencery, post:52, topic:173172”]Just wanted to add another dimension of tasker integration. If you need tasker to read the current status of a device on your Vera network and have tasker respond accordingly, this can be done by sending a JSON request to vera. You can use the following steps:

  1. Create a new profile in Tasker (i.e. NFC tag scanned, GPS location reached, bluetooth connected, widget pushed, whatever you want to use as a trigger).
  2. In tasker, create a new matching task for your new profile.
  3. Add Action (click the + sign) → Net → HTTP Get
  4. Under the Server:Port field, add in the URL for your device status request:

[ul][li]Example to retrieve the status of a DSC Alarm: https://fwd5.mios.com/USERNAME/PASSWORD/VERA_SERIAL/data_request?id=variableget&DeviceNum=DEVICEID&serviceId=urn:micasaverde-com:serviceId:AlarmPartition2&Variable=DetailedArmMode[/li]
[li]The example above forwards through the MCV servers and requests the status of an alarm system. It’s a good idea to test the URL is working in your browser as expected before proceeding. In this case, it should show ready, exitdelay, or armed, etc.[/li]
[li]USERNAME/PASSWORD: Vera username/password[/li]
[li][VERA_SERIAL]: Vera serial found in UI5 under account → tech support tab[/li]
[li][DEVICE_ID]: Vera Device ID for the item you want to view status on. Found under the advanced tab of each individual vera device.
[/li]
[li]Make sure to include the appropriate serviceid and the variable you want information on for each device. You can find serviceid information by visiting the following URL: http://LOCAL_VERA_IP:3480/data_request?id=status&output_format=xml&DeviceNum=DEVICE_ID[/li][/ul]

  1. Under mime type, select “text/plain”
  2. The response from this HTTP request is automatically exposed to tasker as “%HTTPD”
  3. You can write tasks based on the state of the %HTTPD variable. In my case, this example task polls vera and check the status of the alarm before performing any actions. For instance, if it’s “ARMED,” tasker will disarm the alarm and include a verbal confirmation. If it’s “READY,” tasker will report accordingly and ask me if i want to arm the house.

A few caveats and suggestions:

[ul][li]Since your vera login is passed through the URL, there are high security risks. Make sure you understand this before proceeding. If absolutely necessary, it would be a good idea to at least create restricted logins for this purpose (I’m not positive, but I believe this method is how forwarding is handled by most mobile Vera apps?).[/li]
[li]If you can, a better method would be to use a VPN into your vera site location and use the local URL command instead[/li]
[li]Here is the equivalent local URL for the above JSON query: http://LOCAL_VERA_IP:3480/data_request?id=variableget&DeviceNum=DEVICEID&serviceId=urn:micasaverde-com:serviceId:AlarmPartition2&Variable=DetailedArmMode[/li]
[li]If you are using if/case statements to process the command, don’t forget to add an exit condition in case you cannot poll vera for any reason.[/li][/ul][/quote][/quote]

I’ll look at adding the ability to retrieve information of a device via Tasker. This will require some work and time. Not sure when I will get this added. The only drawback would be that this will be dependent on the data that AutHomation has. So if you require realtime data, you’ll have to mess with the background polling of the data for the app when the app is not running. It is currently set to 30 minutes. I would not go any lower than 5 minutes to not drain the battery.

  • Garrett

[quote=“garrettwp, post:69, topic:173172”][quote=“Aaron, post:68, topic:173172”]Garrett,
Can you automate/integrate the below method? Just like you have with the Tasks portion… point and choose :slight_smile:

I know it can be done with Tasker since AutoVera does it. Otherwise, this is a PITA to put in using small onscreen keyboard! Too much when you are doing several Profiles.

[quote=“silencery, post:52, topic:173172”]Just wanted to add another dimension of tasker integration. If you need tasker to read the current status of a device on your Vera network and have tasker respond accordingly, this can be done by sending a JSON request to vera. You can use the following steps:

  1. Create a new profile in Tasker (i.e. NFC tag scanned, GPS location reached, bluetooth connected, widget pushed, whatever you want to use as a trigger).
  2. In tasker, create a new matching task for your new profile.
  3. Add Action (click the + sign) → Net → HTTP Get
  4. Under the Server:Port field, add in the URL for your device status request:

[ul][li]Example to retrieve the status of a DSC Alarm: https://fwd5.mios.com/USERNAME/PASSWORD/VERA_SERIAL/data_request?id=variableget&DeviceNum=DEVICEID&serviceId=urn:micasaverde-com:serviceId:AlarmPartition2&Variable=DetailedArmMode[/li]
[li]The example above forwards through the MCV servers and requests the status of an alarm system. It’s a good idea to test the URL is working in your browser as expected before proceeding. In this case, it should show ready, exitdelay, or armed, etc.[/li]
[li]USERNAME/PASSWORD: Vera username/password[/li]
[li][VERA_SERIAL]: Vera serial found in UI5 under account → tech support tab[/li]
[li][DEVICE_ID]: Vera Device ID for the item you want to view status on. Found under the advanced tab of each individual vera device.
[/li]
[li]Make sure to include the appropriate serviceid and the variable you want information on for each device. You can find serviceid information by visiting the following URL: http://LOCAL_VERA_IP:3480/data_request?id=status&output_format=xml&DeviceNum=DEVICE_ID[/li][/ul]

  1. Under mime type, select “text/plain”
  2. The response from this HTTP request is automatically exposed to tasker as “%HTTPD”
  3. You can write tasks based on the state of the %HTTPD variable. In my case, this example task polls vera and check the status of the alarm before performing any actions. For instance, if it’s “ARMED,” tasker will disarm the alarm and include a verbal confirmation. If it’s “READY,” tasker will report accordingly and ask me if i want to arm the house.

A few caveats and suggestions:

[ul][li]Since your vera login is passed through the URL, there are high security risks. Make sure you understand this before proceeding. If absolutely necessary, it would be a good idea to at least create restricted logins for this purpose (I’m not positive, but I believe this method is how forwarding is handled by most mobile Vera apps?).[/li]
[li]If you can, a better method would be to use a VPN into your vera site location and use the local URL command instead[/li]
[li]Here is the equivalent local URL for the above JSON query: http://LOCAL_VERA_IP:3480/data_request?id=variableget&DeviceNum=DEVICEID&serviceId=urn:micasaverde-com:serviceId:AlarmPartition2&Variable=DetailedArmMode[/li]
[li]If you are using if/case statements to process the command, don’t forget to add an exit condition in case you cannot poll vera for any reason.[/li][/ul][/quote][/quote]

I’ll look at adding the ability to retrieve information of a device via Tasker. This will require some work and time. Not sure when I will get this added. The only drawback would be that this will be dependent on the data that AutHomation has. So if you require realtime data, you’ll have to mess with the background polling of the data for the app when the app is not running. It is currently set to 30 minutes. I would not go any lower than 5 minutes to not drain the battery.

  • Garrett[/quote]

I was just going to ask the same thing :wink:

I plan to use DashClock as an interface for my DSC alarm via Dashclock Tasker + AutomationHd.

I’d want to query - if it’s armed, show a disarm icon, if it’s disarmed show arm icon. I might want to show the state of a few sensors as well.

Also - you should charge for AutomationHd, or at least make a pay version available. I’d gladly pay for it and you more than deserve it. Amazing application.

Garrett,
I’m not sure how the AutoVera app makes the status available, maybe their Vera-side app makes it easier? You might want to install their apps and see how they work, might give you some ideas - or maybe piggyback on it.

I’m working to design a method, using NFC + Tasker + AutHomation, to create occupancy tracking and security mode automation so grabbing a status of a device from Vera is critical when you scale it beyond a single person.

Thanks for looking into this, hopefully it will be easier than you expect :slight_smile:

[quote=“Aaron, post:71, topic:173172”]Garrett,
I’m not sure how the AutoVera app makes the status available, maybe their Vera-side app makes it easier? You might want to install their apps and see how they work, might give you some ideas - or maybe piggyback on it.

I’m working to design a method, using NFC + Tasker + AutHomation, to create occupancy tracking and security mode automation so grabbing a status of a device from Vera is critical when you scale it beyond a single person.

Thanks for looking into this, hopefully it will be easier than you expect :)[/quote]

I looked at their plugin awhile back, when it was first available in the app store. They are essentially parsing through the list of devices in vera and using a variable watch on those devices for certain services and variables. They are then using Google’s Cloud Message to send the data to AutoVera when changes happen. It is a pretty good idea, however I do not know how keen I am on having a variable watch command on all of my devices for the different services / variables. Not sure how resource intensive it would be on Vera.

A few options that could make this work well in my app but would require some work to get working and resources (cost). I could implement Google Cloud Messaging in my app and do something similar to what AutoVera does, but just send a message saying to retrieve new data. This would also require setting up a service that needs to work with Google Cloud Messaging. VerAlerts does this, however Richard is now paying to keep the service from not hitting it’s quota. This also means I have to maintain this service which my time is already limited and I would like to push out another release to the community.

To get tasker to work the way a few want it to work with performing tasks based on the variables of a device when it actually happens and not delayed would require a good amount of work, resources (money, time, support).

  • Garrett

Can anyone confirm how best to use profiles in Tasker.
If I have a light that I want to turn on and off via a voice command does it require 2 profiles? One that says light on and the other light off or can you create one profile and have 2 tasks? I think you need a profile for each as the voice request is associated with one profile not 2. So if I have AV equipment and lighting I would need a profile for each state.

Eh? Why not just use the Speech Recognition built in to AutHomation? No need for tinkering with Tasker for that.

Tasker can do some nice things when paired with AutHomation but what you’re proposing sounds like reinventing the wheel for the hell of it. Sounds like digging holes and filling them back in again.

Or maybe I’m missing something?

Yep you are missing something. authomation is great but to give voice command you need to go into the program, swipe right, scroll down, press voice and issue your command. Might as well just use the icon in the program.
With tasker I have an autovoice icon on the phone which I press and issue my command. Voila! One screen press and I can turn on/off lights, av equipment etc

Or use the home screen shortcut to go directly to the voice recognition.

  • Garrett

Thanks for providing the intents! Got tasker to work with gentlealarm to turn on my bedroom light when the alarm goes off… just what i wanted!

Quick question though - if I wanted to make the light flash, would I be able to do that with a single intent or would I have to make several tasks alternating the dim level?

Edit: I achieved what I wanted by adding “Wait ** seconds” followed by an on or off intent and repeating it to achieve what I wanted to do.

I’m a heavy sleeper.

Personally I would do all of this on the Vera side. If you’re set up with home automation gear there is a LOT more Vera can do than your phone.

I know there are apps to do that on the vera side but I change my alarm frequently so I wanted something that would correlate directly to the alarm on my phone without having to change anything on the Vera.

Is it possible to get the “flashing” on and off of the light on the vera side, in a scene perhaps? I’m still relatively new to the Vera side of things. If it’s possible to do it that way then obviously I’d prefer to - that way I’m sending one command to the vera instead of 15.

Yes this is possible. I myself have a rather elaborate setup for making sure I get up in time in the morning and my bedside light blinking is part of Vera’s last ditch effort.

http://forum.micasaverde.com/index.php?topic=5127.0

I use Google Calendar to set the time I get up. The only problem with this is that the Google Calendar plugin is primitive and can’t anticipate when I’ll need to get up so the entry needs to be set for however much time in advance you need to have the scene play out.