Design of a Distributed Embedded System for Domotic Applications