Tasker Color Control

I am having a similar problem, using the Sharptools Tasker plugin, but with two different RGBW-capable devices: “Aeon Labs LED Strip” and “Inovelli Dimmer Red Series” (LZW31-SN). While I can query the value for “hue” on either device, I cannot set “hue” via the “sethue” method. (BTW, I have tried “sethue(0)” to see if this would succeed in displaying Red on either device. I have also tried setting other attributes such as “level” and “saturation” but the corresponding “set” methods do not seem to have any effect). Meanwhile, yes, I have installed the latest Smartthings device handlers installed. And I can verify that, for each device , I can successfully change colors using the Smartthings app and the ActionTiles app – and even verbally using my Alexa Echo Dot. This non-functionality was not remedied by the awful “new Smartthings” app and remained broken using the “Classic” Smartthings app both before the new app was installed and after I uninstalled it. I had gotten around this non-functionality by using Smartthings Routinies to change colors as needed – but (as documented in another post to this forum) Smartthings Routines can no longer be triggered using the Sharptools plugin for Tasker. Any help you can provide would be greatly appreciated – I love these RGBW devices and would dearly love to be able to access them programmatically. Any insights you can provide would be greatly appreciated, with my thanks!

1 Like

Which device handlers do you have installed? Can you share a link to each?

You should still be able to trigger Routines as long as they are still available in the SmartThings Classic app. I replied over in the other thread. :slight_smile:

If setLevel() isn’t working, then it sounds like something fundamental isn’t working properly. Can you share a descriptive export of the Tasker profile (or PM me a link to a Tasker profile share)?

And are you able to control devices directly from the main SharpTools Android app UI? (It’s usually just on/off type commands, but figured we should at least verify that the basics are working)


Edit: Here’s a demo showing the use of the setHue() command in a Tasker plugin to control the color of an RGBW light (displayed on a SharpTools.io dashboard):

https://imgur.com/oNe7vqc

Let me digest the information you’ve kindly sent me here before I respond with the requested info. Thanks!

1 Like

Let me locate github links for each and send them in subequent reply, give me an hour or so.

I was incorrect, “setLevel” does work. However not “setSaturation” or “setHue” or “setColor”. I’m going to do some additional investigation of “setHue” over the weekend. It’s curious I can get Tasker to obtain a value for “hue” from Smartthings via Sharptools – just cannot succeed in setting exactly the same value.

Yes, on/off and level (based on slider control).

Note that, while sharptools.io provides a color palette 2-D slider control, Tasker requires a decimal value, which (based on values for “hue” being obtained from Smartthings via Sharptools using Tasker “Get Attribute”) ranges from 0 to 99. (Perhaps I will experiment and see if a hexidecimal value might be accepted.)

1 Like

Here is the info you requested in prior message (device handlers & example Tasker task:

Device Handler for Inovelli dimmer with RGBW display bar

Device handler for Aeotech RGBW LED strip
https://aeotec.freshdesk.com/helpdesk/attachments/6103457415

Tasker Share example task “Test setHue”
https://taskernet.com/shares/?user=AS35m8lvQboLUlIq8WHogCV7BIV6BxwnwJBoDhO2iIudXYxXgmSDIjuJyJfQMbT3hyk2kQ%3D%3D&id=Task%3ATest+setHue

Please let me know what additional information I can provide.

The Inovelli DTH is missing the setHue() command altogether (which explains why the command won’t work for that device). Since the device handler indicates that it implements the Color Control capability, it is supposed to implement the setHue() command.

The Aeotec DTH seems to implement a setHue() command that remaps the command over to the setColor() command. Upon closer inspection though, it appears that their code has a bug with 0 values for hue or saturation. They shorthanded some of their code which causes it to check for truthiness rather than the existence of a value… and 0 evaluates to false which makes their code ignore the supplied value altogether and use the current value reported by the device. You should be able to use a value of 1 to test this particular device.

As a side note, the Aeotec setColorTemperature() command doesn’t follow the spec properly either - theirs is expecting a percentage [0-99] whereas the specification expects a Kelvin value

1 Like

Thanks very much for the diagnostics. You were correct about using “1” to test the one device – not sure how I missed this in earlier testing. As for the rest, thank you for doing the work I should have done in tracing down what is amiss here.

May I ask you to clarify one more issue for me here please? I’m not sure if it’s Tasker or Sharptools placing the limitation, but can you suggest why a CONSTANT must be supplied for the call to setHue? I would have thought Tasker would have permitted me to obtain the value to be passed to the device handler via a Tasker variable?

Yes, you can use variables in the Tasker plugins.

For example check out step 12 onward in the following article:

I believe I did not ask my question clearly. Please see the attached screenshot from my Tasker session, where I am able to enter a value for “hue” only as a numeric constant. I cannot use a Tasker variable (even tried to paste one in to no avail). It is unclear to me whether this is a limitation imposed by: A) Tasker, B) Sharptools, C) the device driver? Could you please elucidate. My thanks in advance!

From the linked article:

  1. Choose Plugin > SharpTools> A Thing

  2. Click the pencil icon to configure the SharpTools plugin

  3. Tap the tag icon in the action bar to enter Tasker variable mode

  4. Enter the device name in the Device field (eg. bedroom light)

  5. Enter the command to send: setLevel

  6. From the menu, check the box for Override Parameters

  7. A plus icon appears below the command allowing you to add parameters

  8. Click the + icon to add a new parameter and tap the AZ icon to change the variable type to numeric (09)

  9. Parameter 1: %level

  10. Press Apply

The key thing is to tap the tag icon in the action bar at the top of your screenshot to put you into Tasker Variable mode. From there, you may need to open the ... menu in the top-right and check Override Parameters to customize the parameters that are sent.

Thank you for taking the time to explain. I’ve got it now.