Owners of solar power plants may be faced with the need to control energy consumption by end devices, as reducing consumption can extend battery life in the evening and in cloudy weather, and also avoid data loss in the event of a hard disconnect.
Most modern computers allow you to adjust the frequency of the processor, which, on the one hand, leads to a decrease in performance, on the other hand, to an increase in battery life. In Windows, the frequency reduction is carried out manually through the management program interface, in Linux through the taskbar widget and via the console (cpupower - CentOS, cpufreq-set - Ubuntu).
In Linux, execution of commands via the console allows them to be executed automatically when certain events occur.
The usps-consumptionagent utility from the free set of UmVirt Solar Power Station allows you to execute commands that control the performance of the processor depending on the operational data of the solar power station.
')
Typical configuration for 12 volt mode:
- If the voltage on the panels is higher than 16 volts, setting the mode performance
- If the voltage on the panels is below 16 volts or is unknown, setting the power saving mode
- If the battery voltage is less than 11.6 run the shutdown command
The shutdown command can be:
- smooth off (poweroff),
- sleep mode (systemctl suspend),
- hibernation (hibernate systemctl),
- command sequence.
Example command sequence:
./suspend.py && systemctl suspend
Running this command will save the current virtual machines to disk and put the computer into sleep mode. This command can be demanded by programmers and miners in the case of compilation of “big” programs such as Firefox, Chrome, LibreOffice and others, when the working time (uptime) can increase daytime.
As a demonstration of a
small video without sound .