Hue Bulb won't respond to set level command


#1

I have a Piston that controls several lights to establish transitional lighting when I put my system in Night Mode and one of the bulbs, a Hue White bulb, won’t respond to the Set Level Command.

When I run the Smartthings routine (typically launched via Amazon Echo command, the following actions should occur:

  1. The Smartthings Routine shuts off most of the lights in the house and switches the system to Night mode
  2. The piston creates path lighting from the living room to the bedrooms based on who is home. The lights in common areas are set to a specific level and then dimmed 1% per minute until off. And other lights are set and made to turn off after a predetermined time.

For reasons I have not been able to determine one light, a Hue White called “White Bulb 1” should have its level set to 10% and then fade at 1% per minute until off. The fade out routine works perfectly. However, the Hue bulb will not respond to the Set Level command. I have tried several different things from inserting wait commands to placing the Set Level command in a do until loop. None have worked. The bulb does dim properly via Smarthings, Amazon Echo and, ActionTiles. But does not respond to the WebCore Set Level Command.


#2

My free time is scarce lately, but here are my thoughts. Hopefully it gives you some ideas.

Set level’ and ‘Adjust level’ are two very different commands, that act differently on different devices. I have tried to avoid ‘emulated’ commands as much as possible. I find that ‘device’ commands are much more reliable for me.

temp

Here is a tiny snippet of how I would use ‘Set level’ commands to simulate an adjust.

temp

This should be easy to plug into your original piston in the appropriate sections. You just have to tweak it a bit to make sure the first block only runs once, and the 2nd block runs until the light is off.


#3

The challenge I’m having is not with the adjust level while loops, they work great.

The thing that is not working, and only for that one Hue bulb, is the Set Level to 10%


#4

I setup a couple test pistons that used Turn On/Off and Set Level commands triggered by a couple virtual switches I created for testing. In those pistons the bulb responds as expected to Set level commands.

So, I’m left thinking it’s something about my original piston that is at issue. Why would set level not work in that one instance?


#5

Line 29-33 in the pic above looks flawless to me…
If you have already tested Set level for that same bulb in another piston, and the command works there, maybe try making that particular block of code:

Task Cancellation Policy = Never
Task Scheduling Policy = Allow Multiple

The only other idea I have is, sometimes my network is bogged down and I will send repeat commands back to back like this:

Set level to 10%
Wait 500 milliseconds
Set level to 10%

But that is my workaround. I’m not sure why your piston is not working


#6

Thanks!

I’ll try both ideas. I can’t find where I would set or enter

Task Cancellation Policy = Never
Task Scheduling Policy = Allow Multiple

IF you could point me to the right place to input those settings it would be appreciated.


#7

Edit the piston in question, and find the block that is giving you issues.
Left click to the right of the word "do"

temp

In the top right of the webpage, you will find this:

temp

To clarify, I am not sure this will solve it, but those 2 settings often fixes issues that I have.


#8

@WCmore

This is exactly what I was looking for. But how does the “Adjust level” differ from “Set Level” and how does it work?


#9

It has been ages since I last used “Adjust level”…
I only use “Set level” nowadays…

If I were to make an educated guess, I would say that “device” commands go straight to the device (hardware), and “emulated” commands uses ST to try to do something (software).

Whenever I have a choice, I always use “device” commands, but your mileage may vary.


#10

I was trying to code a routine that would increase or decrease the volume (+/- 10 %) of a particular set of speakers if I said “Alexa, turn up/down the volume.” Originally I was trying to “Adjust level” up or down by a %, but that did not work. This is the reason I am trying to find out how I determine in webcore which Alexa I am talking to. So that Alexa can adjust only those speakers accordingly.

I could make individual Alexa routines, but I may want to address some of my speakers as a group (ex. Master Bath and Master Shower). I am probably making this much more complicated than it actually should be.


#11

If your speakers are the Alexa you are talking to, you can simply say, “Alexa, volume up” or “Alexa, volume down” to adjust 10%. (it goes up or down one number out of ten each time you make that request)

You can also jump directly to a level by saying, “Alexa, volume 7”
(which equals 70%)


#12

Correct. That works for individual Alexa units. But I am addressing my ceiling speakers in my house.


#13

Ahh yes, I am tracking with you now…

I cheat a little bit, and hook up speakers to an Echo Dot, which lets me control a bunch of speakers with the same command.


#14

Yeah, my whole home speakers are wired through my Russound AV system. This would probably be very easy with a Sonos system. But I hate to scrap the entire home audio system that I built into my new house just three years ago.


#15

Unless something changed recently, Alexa lets you group devices in multiple groups, so they can be called individually or in a group, depending on your wording.

IE:
Turn on living room can be 2 speakers
Turn on downstairs can be those 2 speakers plus 2 more
Turn on whole house can be all 6 speakers

I admit though, it is very rare for me to use Alexa to program logic. I like to keep all my coding in webCoRE, whenever possible…


#16

Totally agree. I love webCoRE and I am trying to keep my logic there. Any idea how you would use “Adjust level”? Just for learning purposes as your code above works perfectly for me.


#17

Are you back to asking about lightbulb levels?


#18

No, just curious how the “Adjust level” command is used.


#19

Sorry, I do not have any good examples to share. I think I use “Set level” exclusively thesedays.


#20

And I am using your “Set Level” code above to adjust my speaker volume.