Control of solar electricity consumption by computer/server

Solar plant owners may be faced with the need to manage the power consumption of end devices, as reducing consumption can extend battery life in the evening and during cloudy weather, as well as avoid data loss in the event of a hard shutdown.

Most modern computers allow you to adjust the frequency of the processor, which leads, on the one hand, to a decrease in performance, and on the other, to an increase in battery life. In Windows, frequency reduction is done manually through the control program interface, in Linux through the taskbar widget and through the console (cpupower - CentOS, cpufreq-set - Ubuntu).

On Linux, executing commands through the console allows them to be executed automatically when certain events occur.

The usps-consumptionagent utility from the free UmVirt Solar Power Station kit allows you to execute commands that control processor performance depending on the operating data of the solar power plant.

Typical configuration for 12 volt mode:

  • If the voltage on the panels is higher than 16 volts, setting the performance mode
  • If the voltage on the panels is below 16 volts or unknown, setting the power saving mode
  • If the battery voltage is less than 11,6, execute the shutdown command

The shutdown command can be:

  1. soft shutdown (poweroff),
  2. sleep mode (systemctl suspend),
  3. hibernation (systemctl hibernate),
  4. command sequence.

Command sequence example:

./suspend.py &&  systemctl suspend

Running this command will save the current virtual machines to disk and put the computer to sleep. This command can be required by programmers and maintainers in case of compiling "large" programs such as Firefox, Chrome, LibreOffice and others, when the uptime may exceed daytime.

As a demonstration short video without sound.

Source: habr.com

Add a comment