Update algorithm for open close status