Power Outage Piston not Firing


#1

1) Give a description of the problem
I’m trying to write a piston that will detect if the lights are at a certain color temperature, 2732K, which is what my Hue bulbs turn on to when I cut their power and turn them on again. However, something isn’t working right.

2) What is the expected behavior?
Turn off all lights when they are all at 2732K. I have tried “are equal to” and “stays”. The only thing I’ve gotten to work is do an “every” but I’d like it to be more efficient.

3) What is happening/not happening?
It works intermittently or when I click Test, but it isn’t reliable. I’m testing programmaticly by manually setting all of the temperatures and physically by flipping the switches.

4) Post a Green Snapshot of the pistonimage


#2

I would simplify the piston by trying it on one bulb first. Once you get that reacting properly then move on the complex build :slight_smile:


#3

I’ve tried changing to “any of” instead of “all of” and again, it works intermittently or whenever I click “Test”. It’s like it’s only checking once, but I’m expecting it to be instant.


#4

I remember a while back in the ST forums a discussion about something similar to this. I think they were just monitoring one bulb (a canary bulb) that would indicate a power failure. Based on that one bulb’s events, you send a turn off command to all the devices you want.

In your piston I would probably disable command optimizations if you have not done so already so webcore sends the off command regardless of what ST thinks it’s switch state is.


#5

I saw the canary posts, but I don’t have a bulb that I can use for that purpose. I am trying to sidestep it by using 2732K, a temperature we don’t use normally, but I don’t want it to fire if someone accidentally uses a switch, so I check multiple rooms.

How do I disable command optimizations?


#6

image


#8

Thanks. I missed the cog menu for settings. For now, I will just leave it on executing with an “every”. I’d like something like this to work when I need it to, and that’s the only way I’ve gotten it to work, unless I am doing something wrong.