Examples‎ > ‎

Dim a Light

posted Dec 31, 2014, 12:37 PM by Joshua Lyon   [ updated Jan 10, 2016, 1:33 PM ]
This tutorial shows how to use the SharpTools Tasker Plugins (or Widgets) to dim a light in your SmartThings automated home.

Tasker

  1. Open Tasker
  2. Navigate to Tasks using the tab bar at the top
  3. Tap the + icon at the bottom to add a new Task
  4. Name the Task (for example Turn Upstairs Light On) and press the checkmark to continue
  5. Within the Task Edit screen, press the + icon at the bottom to add a new Action
  6. Select Plugin > SharpTools > A Thing
    Note: Older versions of Tasker did not have the application grouping and would be Plugin > A Thing
  7. Within the Action Edit: A Thing screen, click the pencil icon to modify the configuration
  8. Select the Dimmer Switch device type (or relevant dim capable device type)
  9. Select the desired device (for example, Upstairs Hall)
  10. Select the setLevel command
    Note: after selecting the setLevel command, parameter fields should become available
  11. Enter the following settings in the parameter fields:
    Parameter 1: 50 
    Parameter 2: 0 
    Note: Some devices, like GE Links, will only work with one parameter. See the notes below.
  12. Press Apply to save your settings
    Note: If prompted to unlock Tasker/Widgets, follow the prompt to either start the trial or perform the In-App-Purchase
  13. Press the back button to save your Task
  14. From the Task Edit screen, press the play icon at the bottom of the screen to test your Task
Setting up the Task is just one part of having a complete Tasker setup. Check out the Introduction to Tasker article to better understand how a Task fits with a Context or the Voice Control Things articles for an example. 

Widgets

Each phone/launcher has different ways to add widgets to your homescreen. This guide assumes the reader has knowledge of how to add a widget to their homescreen.
  1. Follow the steps for your launcher to pick a Widget/Shortcut to be added your homescreen
  2. Select the 'A Thing' widget
  3. Select the Dimmer Switch device type (or relevant dim capable device type)
  4. Select the desired device (for example, Upstairs Hall)
  5. Select the setLevel command
    Note: after selecting the setLevel command, parameter fields should become available
  6. Enter the following settings in the parameter fields:
    Parameter 1: 50 
    Parameter 2: 0 
    Note: Some devices, like GE Links, will only work with one parameter. See the notes below.
  7. Press Apply to save your settings
    Note: If prompted to unlock Tasker/Widgets, follow the prompt to either start the trial or perform the In-App-Purchase
Note: Many launchers display the list of widgets after a long press of the homescreen or within their app drawer. Several of the SharpTools widgets are actually shortcuts and some launchers, like Nova Launcher, group these separate from traditional widgets

Notes

  • Parameter 1 is the percentage we would like to dim to (eg. 50 = 50%)
  • Parameter 2 is the duration over which we would like to dim
    • Only certain devices actually accept this value. You must enter a value even if your device does not support dimming over a duration.
    • For an immediate dim or for devices that don't support dimming over a duration , enter 0
    • Some devices, like GE Link light bulbs, will only dim when using 1 parameter for setLevel
      • These devices still report that 2 parameters are required from SmartThings, so you must override the settings
      • From the 'A Thing' configuration screen, open the menu and check the box for 'Override Parameters'
      • You should now see 'X' icons show up to the right of each parameter field. Click the 'X' next to Parameter 2.
      • Follow the instructions above as normal, ignoring Parameter 2.
  • The device type must support the setLevel command to perform dimming
    • This is supported with the out-of-the-box Dimmer Switch types and the Better Virtual Dimmer device types.
  • Some custom launchers do not support adding a Shortcut widget (like those used with SharpTools). Make sure your launcher supports adding Shortcuts or use a launcher like the Google Now Launcher.
Comments