Rewritten SmartHomeEnd