Home automation gateway with a REST API