Help me simplify!

I’ve been trying for a while to automate my downstairs lighting.

My objective here was to have various things happen at different times of the evening, including changing lights to a warmer white and reducing brightness at various stages in the evening and ultimately turning main lights off and turning on some lamps.

I have around 20 hue bulbs for my main lighting. A key issue I had was altering the temperature without turning the light on if it was off. I also couldn’t just tie this to a timed event because I may not be at home, so I’ve now attached to a motion event. This works quite well in so far as, I walk in at night turn on the lights and then the motion sensor fires the piston and my lights adjust accordingly depending on the time of day.

I ended up creating this complex piston, which does work functionally but it seems to have become the cause of a number of performance issues. I often see that when this is running other events don’t fire or are delayed…

I minor issue is that the lights change state in a random order - it works but not elegant

The piston

Screenshot showing what the “location” events are…

Performance stats…

any help would be greatly appreciated !

D

If it was me I’d make the variables global and have a piston that just sets the variables, then have a separate piston for each of the actions, grouped by device. You can create separate Do pistons that don’t have their own triggers, and execute them from the main one if necessary.

Thanks for the reply - I agree that’s a cleaner approach and it would get rid of the unnecessary variable sets that I’m doing on motion but how much of an overhead is this really ?

Several of us have experimented with a large single piston vs multiple smaller pistons and found that multiple smaller ones perform better than a single large one. I can’t quantify it but that’s been the general consensus.

1 Like

I’ll give it a go… thanks for the advice