init onoffstate