How the Internet of Things makes buildings safer