Author Topic: Build your own UI with AutoVera and Tasker  (Read 7104 times)

Offline dkc

  • Moderator
  • Jr. Member
  • *****
  • Posts: 97
  • Karma: +6/-0
Build your own UI with AutoVera and Tasker
« on: June 12, 2014, 03:45:07 pm »
Using the Scenes feature of Tasker, not to be confused with Scenes on Vera, you can create your own custom UI to control any and every device on your Vera. Tasker scenes give you access to a what-you-see-is-what-you-get graphical editing tool.  You can use Tasker variables in combination with AutoVera Device Info actions to dynamically populate menus and actions, making custom scene creation as easy as possible.

Below is a sample APK created with Tasker and exported as a standalone application. It consists of one scene and several actions to control a dimmable device. Once installed, it will populate a spinner element (dropdown menu) that contains all of the devices on your Favorite Vera.  Once a device is selected, each of the elements in the scene will control that device. You can explore the XML shared below to see how to get each element triggering AutoVera Device actions. Screenshot here: http://i.imgur.com/ITJnm1B.png

IMPORTANT: The only dependency to run this app is AutoVera, a user would not need Tasker installed to run apps created with Tasker.

Interface elements include:
  • Button - Tap  to toggle
  • Text - Tap To toggle
  • Number Picker - New value sets light level(Dimmable Only)
  • Slider - New value sets light level(Dimmable Only)
  • Toggle - On = light on, Off = light off
  • Image - Stroke Up = light on, Stroke Down = light off
Note: If status updates are enabled for the chosen device, the Image element will update to reflect the current state.

To install and run:

I'm also including the Tasker XML for the project, the "source code". To install:
  • Download Tasker projext XML from here: https://www.dropbox.com/s/nyjkv0zn5a5jw5e/Scene_Sample.prj.xml
  • Using a file explorer, attempt to open the XML file and choose to open with Tasker
  • A popup will let you know the project is ready for import
  • Open Tasker and press and hold on an existing project*. Choose Import and select the XML file from the projects folder

*You'll need to have disabled beginner mode within Tasker.
« Last Edit: June 18, 2014, 06:04:00 pm by dkc »

Offline konradwalsh

  • Hero Member
  • *****
  • Posts: 566
  • Karma: +19/-6
Re: Build your own UI with AutoVera and Tasker
« Reply #1 on: June 13, 2014, 02:03:01 pm »
Thanks for sharing.. Makes for a great blueprint to make more scenes

Sent from my GT-N7100 using Tapatalk


Offline sleedham

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Build your own UI with AutoVera and Tasker
« Reply #2 on: July 31, 2014, 06:54:49 pm »
The status updates don't seem to be working for me. Where does it set the light level, so you can set the slider default value to the current light level status? I don't see where it sets the variable or where it changes the element to reflect the change

Thanks in advance!

Offline dkc

  • Moderator
  • Jr. Member
  • *****
  • Posts: 97
  • Karma: +6/-0
Re: Build your own UI with AutoVera and Tasker
« Reply #3 on: August 02, 2014, 01:37:13 pm »
If you want to set the slider to the current value, you'll need to do an AutoVera Device Info action, and set a variable based on the current value of %avlevel.  You can then use this variable to change the element value of the slider to the numerical value of the light level.  You'll want to run these actions before showing any scene.

Create Scene
AV Device Info
Variable Set
Element Value Set
Show Scene

Offline Stolid

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-4
Re: Build your own UI with AutoVera and Tasker
« Reply #4 on: May 03, 2016, 08:50:11 am »
This is exactly how far I've gotten... can you modify this to work with HUE lights? I have followed tutorials that say use OI ColorPicker, and I can get it to pop up, but I don't know how to convert from HEX to HSB afterwards to send that to the light with an Intent (SetHueSaturation).

Offline Chrisfraser05

  • Sr. Member
  • ****
  • Posts: 449
  • Karma: +16/-31
Re: Build your own UI with AutoVera and Tasker
« Reply #5 on: May 15, 2016, 06:40:46 am »
Here is a screen shot of my ui with tasker

Offline hyperwiz

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Build your own UI with AutoVera and Tasker
« Reply #6 on: December 23, 2016, 10:38:49 pm »

I'm wondering if you may be able to help.  I'm using Tasker w/ AutoVera and able to create a widget that changes icon (light) when one of my vera lights is on vs. off.  What I'm unable to do is use that same widget to turn on and off the light (and also have it change icon states).  Ideas on how to do this in Tasker?