How to trace what is turning on a light

Before trying to making changes to the current complex setup of groups try to just work with that/those bulb(s) that are malfunctioning.
Turn them off separately and see if that changes their behavior. KISS!

57 of them are light bulbs or sockets that act as repeaters.

Mystery solved.

Did not find out how to trace what is going on, but I finally spotted an automation issue.
I have two areas living room and sun room that form an open space. Each room has its own scenes to control the lights. However some lamps are used in scenes for the sun room as well as scenes for the living room.

When I turn off the lights for the night - I trigger sunroom_off and livingroom_off scenes. The lamps common to both scenes get two simultaneous off commands and sometimes get confused. Scenes have now been segregated and the problem resolved.

Thank you for the suggestions, I learnt more about HA / ZHA.

Steve