Correcting bulbs that should not be on


#21

i tried it with 3 lights and 1 contact sensor.

thats an interesting question … never tried that one :slight_smile:


#22

PRETTTTY GOOD! I think any remaining flakiness is just a matter of unstable communication. But the code is there. I upped it to 10 attempts to be safe.

What is this command optimization?

Thank you!


#23

command optimization optimizes to prevent repeated commands from being sent to the device when the command being sent is same as the current state of the device for that command.

you are welcome.

were you able to confirm if the stay on event is received after recovering from a power loss? if that does not work, might be easier to change this to a timer piston where the check is done every 10 minutes or so.


#24

I’ll test the power recovery later on…

A timer piston might be good, because it’s still missing stay on events here and there. But for single offenses it seems to do well.


#25

OK

yeah, thats the behavior i see as well.


#26

Let’s see how it does for a few weeks… Usually when bulbs turn on randomly it’s for a weird reason, like an issue in the bulb itself, which may or may not be picked up by the trigger.


#27

Looks like this piston corrected a bulb this morning, and I didn’t even notice it. :slight_smile:


#28

thats how every piston should work :slight_smile:


#29

I know this is an older post, but the solution is close to something I’m looking for so it seemed like this might be the best place to start. I’m looking for ideas to make sure all my lights get turned off during certain routines.

I have around 20 lights, switches and bulbs (some Hue, some not). that I want to turn off when I go to bed, and everyone leaves. I’ve been using the built in “good bye” and “goodnight” routines for a long time, and they are generally very good, easy to configure, etc but probably 25% of the time, one or two lights do not turn off. Its not always the same lights. I dont want to keep the lights off at night or when I’m away though, because I have a couple of other late night routines that turn on lights for a few minutes and back off based on motion.

Bottom line I’d like a piston to turn off a list of devices (maybe a global variable), then wait short period of time, and make sure they are actually off, if not turn them off.


#30

Could you just run the good night piston twice? Set a variable “good night” changes to true, then wait 10 minutes and run the piston again. That would probably be the easiest way. You could write another one to say - if piston was run, and any of (device list) is on, then turn (devices) off. You could store the info and send a notification when it makes a correction. To do this you could just use the original piston above here and change the delay time