Foscam camera as sensor

Is there a way to use Foscam motion detection to trigger actions, like turn on/off lights?