Design of a Wireless Sensor and Actuator Network for Energy Management at Home