Adaptive power consumption improves the reliability of solar-powered devices for internet of things