fix check for error response
separate categories for lights and groups
Only add reachable lights