A Hybrid Approach for Energy Optimization of Wireless Sensor Network Devices