This document discusses using ontologies and semantic interoperability to enable context-aware systems of pervasive devices. It proposes representing devices' knowledge and capabilities using ontologies structured in layers. The top layer is a core ontology, with more specialized domain and device ontologies below. Devices use ontology concepts and "recipes" stored in their knowledgebases to understand contexts, coordinate virtual devices, and respond to requests. Recipes define step-by-step actions for devices to perform tasks. Representing devices' knowledge and behaviors semantically through shared ontologies allows their systems to work interoperably and adapt to contexts.