Engineering the Internet of Things