In this paper, we discuss how to combine ontology-based policy reasoning mechanisms with in-use Internet of Things applications to customize and automate device behaviors. We discuss how the policy framework can be extended with data federation to handle diverse and distributed data sources. We demonstrate that smart devices and sensors can be orchestrated through policies in diverse settings, from smart home environments to hazardous workplaces, such as coal mines. Lastly, we evaluate our approach using real applications with real data and demonstrate that it is scalable under high load of data and devices. This article is categorized under: Technologies > Computational Intelligence Application Areas > Science and Technology Fundamental Concepts of Data and Knowledge > Knowledge Representation Technologies > Computational Intelligence.