1) Give a description of the problem
Hi Guys,
Here goes a long one, thanks in advance to anyone who will take the time to read through and also help with some advice.
Setup: Smartthings hub, Ikea tradfri light bulbs (named Dimmer1 and Dimmer2), Xiaomi motion sensor, xiaomi open/close (contact) sensor, Ikea tradfri button (2-button dimmer I/0).
I would like to create an appropriate piston for my entrance hallway lighting. I want the light on the hallway to act differently based on the time of the day as it follows:
-
between 7:15 am and 8:15 am, if motion is detected on the hallway - the two light bulbs I will turn on at 100% brightness, then if there is no movement for 20 seconds, the the lights turn off (yes… I know… 20 seconds not ideal, but I have ‘hard-hacked’ the Xiaomi motion sensor to report state every 5 seconds instead of 60 seconds, and that works just fine). *** If anytime the entrance door is opened then the lights will turn/stay on. When the door is closed, if there is motion on the hallway (someone is still inside) the lights stay on for 1 minute and then turn off if there is no motion for 20 seconds; if when the door is closed there is no motion on the hallway (everyone left the house) then the light will turn off if there is no motion for 20 seconds.
-
between 8:15 am and 6 pm the lights are not triggered by motion anymore, and only the actions described at above point 1 after the three star (*) signs will take place.
-
between 6 pm and 8 pm same as point 1 above
-
between 8 pm and 7:15 am, same as point 1 above, but brightness for motion is only 10%, and goes to 100% only if the door gets opened.
-
If I press the ‘I’ button on the switch at anytime, the lights will turn/stay on until I press the ‘0’ button on the switch.
I have managed to set up the above, but the problem is that I used 4 different pistons for the 4 times of the day described above (similar to the one in the green snapshot below) and one piston for point 5 above which is set to turn on lights and pause all pistons when I press ‘I’ and resume all pistons when I press ‘0’. Thus, I see a lot of ‘waiting at the semaphore’ events within the pistons, and also all the pistons get executed together constantly throughout the day, even outside their configured times. For example if I walk to the hallway at 2 pm, the lights will not turn on (as per piston number 2 above), however the other 3 pistons (1,3,4) will show up as executed at 2 pm as well.
2) What is the expected behaviour?
Have maybe only one piston configured to do the above. or a better way to set up all pistons so that they do not get executed outside their defined times generating ‘waiting at a semaphore’ events and probably delays as well.
3) What is happening/not happening?
The config seems clustered, all pistons get executed constantly when motion is detected, ‘waiting at a semaphore’ events are generated, delays experienced between motion and lights on.
**4) Post a Green Snapshot of the piston!
Any advice is much appreciated.