Another thought: place a motion sensor in the room and use its ability to sense the lamp to trigger the macro. (Sensor must be placed to see only the lamp, of course, and not sunlight, or a dusk control can be added to the macro.) Whatever way the light is turned on (or off), the macro(s) will trigger.