A survey has been conducted by Perera et al.  on the functionalities of Middleware for IoT. Functionalities that have been considered are device management, interoperation, platform portability, context-awareness, and security and privacy. The survey shows majority of Middleware solution do not provide context-awareness functionality.
According to Abowd and Dey , context is defined as follows:
“Any information that can be used to characterise the situation of an entity. An entity is a person, place or object that is considered relevant to the interaction between a user and an application, including the user and applications themselves.”
A system (Middleware) is said to be context aware if it is able to provide information and/or service to the users that is relevant to the task being carried out . For example, an Elderly in-home Assistance system should be able to provide information such as identity, location, time, and activity of elder persons being monitored.
 Perera, C.; Zaslavsky, A.; Christen, P.; Georgakopoulos, D., “Context Aware Computing for The Internet of Things: A Survey,” Communications Surveys & Tutorials, IEEE , vol.16, no.1, pp.414,454, First Quarter 2014
 Gregory D. Abowd, Anind K. Dey, Peter J. Brown, Nigel Davies, Mark Smith, and Pete Steggles. 1999. Towards a Better Understanding of Context and Context-Awareness. In Proceedings of the 1st international symposium on Handheld and Ubiquitous Computing (HUC ’99), Hans-Werner Gellersen (Ed.). Springer-Verlag, London, UK, UK, 304-307.