Energy-Efficient Sensor Node Control Based on Sensed Data and Energy Monitoring