ele-dev / Huawei-PSU-Regulator

An automatic power regulator for linux systems
GNU General Public License v3.0
2 stars 0 forks source link
48v berry can cmake energy-management huawei linux modbus-tcp photovoltaic shelly-pro-3em tasmota

Huawei-PSU-Regulator

The Idea

Dynamically regulate the power output of a Huawei R4850G2 power supply via CAN interface from a linux based system (e.g. raspberry pi) to charge a battery in a way so that almost no energy is fed back to the grid for free in periods of overproduction.

System components

Quick setup

  1. Download the latest release (zip archive) on your target system and extract it
  2. Enter IP address in berry script, upload in tasmota root directory and restart tasmota
  3. Use the config.txt file to change runtime configuration of the regulator app
  4. Execute the regulator binary file on the terminal

Note: "Power_curr" in Berry script has to be adjusted to work with your smart meter interface setup

Build & Run on linux system

  1. Clone the repository on the linux system that is connected to the power supply via CAN
  2. Run cmake . and make in the project root directory to build an application binary
  3. Customize your runtime settings in bin/config.txt file
  4. Execute the command line application in the bin folder with ./regulatorApp (use screen -dmS regualtor ./regulatorApp to run detached screen)

Acknowledgements

The code for the CAN commuication was based on work from craigpeacock https://github.com/craigpeacock/Huawei_R4850G2_CAN