A Heterogeneous Sensor and Actuator Network Architecture for Ambient Intelligence