GithubHelp home page GithubHelp logo

sbam's Introduction

codecov

sbam - Smart Battery Advanced Manager.

Charge Fronius battery using SolCast weather forecast.

Introduction

After installing a Fronius Gen24 plus Solar system including a BYD battery, I wanted during months of low solar production to charge the battery at night when electricity costs are generally lower, in order to use the stored energy during the day.

Fronius through the local web interface reachable from the inverter's LAN IP provides the Battery Management utility -> Time-dependent battery control.

Indeed, it is possible to charge at night, but the process is static. Many times, I found the battery to be either too charged or too discharged the next day. I wanted something more advanced, dynamic, and adaptive that takes into account:

  • weather forecasts
  • daily electricity consumption related to my home
  • the current battery charge
  • the minimum reserve of the battery not to go below
  • the time range when the energy operator offers cheaper electricity to force the charge.

Here sbam is all this and much more :)

Home Assistant:

Sbam is available as an add-on for HAOS (Home Assistant OS).

N.B. HAOS must be able to reach the Fronius inverter on its LAN IP.

follow this guide to install and configure in HAOS: link

Stand Alone:

sbam can be run via cli with the following parameters:

sbam - Smart Battery Advanced Manager.
        Charge Fronius© battery using weather forecast.
        Initiate parameters from command line, env variables or config.yaml file.

Usage:
  sbam [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  configure   Configure Battery Storage Charge
  estimate    Estimate Forecast Solar Power
  help        Help about any command
  schedule    Schedule Battery Storage Charge

Flags:
  -h, --help      help for sbam
  -v, --version   version for sbam

Use "sbam [command] --help" for more information about a command.

Configure

Connect to the fronius inverter via modbus and set charging

Usage:
  sbam configure [flags]

Flags:
  -d, --defaults            Set defaults
  -f, --force-charge        Force charge
  -H, --fronius_ip string   FRONIUS_IP
  -h, --help                help for configure
  -p, --power int16         Power (percent of nominal power)

Estimate

Print the solar forecast and the battery storage power

Usage:
  sbam estimate [flags]

Flags:
  -k, --apikey string       APIKEY
  -H, --fronius_ip string   FRONIUS_IP
  -h, --help                help for estimate
  -u, --url string          URL

Schedule

Workflow to Check Forecast and Battery residual Capacity and decide if it has to be charged in a definited time range.

Usage:
  sbam schedule [flags]

Flags:
  -k, --apikey string           APIKEY
  -t, --crontab string          crontab (default "0 0 0 0 0")
  -d, --defaults                DEFAULTS (default true)
  -e, --end_hr string           END_HR (default "05:55")
  -H, --fronius_ip string       FRONIUS_IP
  -h, --help                    help for schedule
  -m, --max_charge float        MAX_CHARGE (default 3500)
  -r, --pw_batt_reserve float   PW_BATT_RESERVE
  -c, --pw_consumption float    PW_CONSUMPTION
  -s, --start_hr string         START_HR (default "00:00")
  -u, --url string              URL

A configuration file config.yml and/or environment variables are also supported.

sbam's People

Contributors

atbore-phx avatar

Stargazers

Felix Hillebrand avatar Florian Hotze avatar Filip Łajszczak avatar mfruehman avatar  avatar  avatar  avatar bryce avatar Enzo avatar

Watchers

bryce avatar  avatar Filip Łajszczak avatar

Forkers

knackerbrot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.