Wireless Sensor and Actor Networks for Monitoring and Controlling Energy Use in the Smart Grid