Activity recognition has gained a lot of importance in the computing era, making the system intelligent so that it automatically recognizes human tasks is attracting a number of application domains. It can be applied to real-time scenarios and human-centric tasks such as health care. Activity recognition in smart homes helps the elderly to live their life independently. A knowledge-driven approach that uses rich domain knowledge is used where ontology is used to represent the knowledge including the representation of the sensor inputs as the individuals of the ontology. The activities are considered to happen in specific locations, i.e., spatial knowledge and under specific circumstances of time, i.e., temporal knowledge. Using ontology makes the system reusable and also does not need a large amount of the data as required in data-driven approaches. Once the ontology is created as the knowledge base, the activities can be inferred with the help rules using an appropriate inference engine. In this thesis, a goal ontology and a belief ontology are proposed to identify activities of daily living within a smart home. The recognition of ADLs can be used to provide activity guidance for elderly and also those suffering from cognitive deficiencies.