Are smart buildings safe from hackers and privacy breaches?

The automated home and office market is predicted to grow quickly in the next few years. But as reports of cyber attacks increase, is it still possible for a home to be a castle in the age of smart buildings, or are we lowering the drawbridge to hackers?