See this topic for some ideas. If you have access to RBoy Apps you could use it with your relay and sensor.