How do we make home automation work?

So how can we avoid using the cloud for home automation? We need: