how to save motion sensor in file xml