Due to the inherent nature of their heterogeneity, resource scarcity and dynamism, the provision of middleware for future networked embedded environments is a challenging task. In this paper we present a middleware approach that addresses these key challenges; we also discuss its application in a realistic networked embedded environment. Our application scenario involves fire management in a road tunnel that is instrumented with networked sensor and actuator devices. These devices are able to reconfigure their behaviour and their information dissemination strategies as they become damaged under emergency conditions, and firefighters are able to coordinate their operations and manage sensors and actuators through dynamic reprogramming. Our supporting middleware is based on a two-level architecture: the foundation is a language-independent, component-based programming model that is sufficiently minimal to run on any of the devices typically found in networked embedded environments. Abov...