I've noticed in my logs, that the events keeps on being triggered. When I tried to write my own script for this, I've noticed that my bash script also kept on running. After the exit command, it just reopens a new process. So i can image that after pushing a few time the sensor, a lot of process where shutting down my lights.
I've solved this with following script (notice the pkill):
#! /bin/shAnd I run this script with the event 'App Server' and Spawn Application...
groupswrite ip:127.0.0.1 4/1/11 0