Issues with customizing automatic lighting piston


#1

1) Give a description of the problem
I found this piston here on the forums and I’m trying to change a little bit of the functionality. It’s doing very weird things.

2) What is the expected behavior?
I’m hoping that 30 minutes before sundown and after sunup it will be enabled. When motion is detected turn on a few lights but only if I’m not watching TV (switch 5 6 and 7 are my Logitech Harmony activities) and all lights are already off. If any of the Logitech activities are on, or any of the lights involved (Dimmer 1 and 3, and Switch 2 and 3) I do not want the motion detection event to turn on the lights and ruin my movie! Once motion is no longer detected, wait 2 minutes, then turn off the lights. I also do not want the lights to turn off automatically, unless they were turned on automatically. If the light was on manually, don’t ever do anything.

3) What is happening/not happening?
Motion will enable the lights, but for some reason the whole house turns into a disco. The lights will turn on and off randomly and the only way to get it to stop is to disable the piston. Does anyone need a disco mode piston cause this one works fantastically!

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
I can get logs upon request but this piston has been disabled for a long while. I can’t figure it out!

Hopefully someone here can help me out. My wife is visually impaired and having this would make her trips around the house in the middle of the night much easier.

Thanks!


#2

Hmm, are you able to turn on the light without triggering the motion?


#3

I can turn the lights on with Alexa or with the app. I‘m pretty sure once you create motion is when it goes bonkers. I’ll check again.


#4

I put one together, you can give it a try. Only tested a few times. Let me try and post it from my phone.

controlLights are the Harmony activities. Oh and adjust the sunrise/sunset restriction


#5

Sweet, thank you! I’ll give it a try and report back.


#6

I’m really sorry that I haven’t been able to report back much sooner but my kitchen had a water leak and I had to move out for three months for repairs.

The script seems to be doing what I’d like! Thank you for helping out.