A real-time network based on IEEE 802.15.4/ZigBee to control home automation environment