Sign inSign up

bluefox42/solarcontrol

By bluefox42

Updated over 1 year ago

Enforce a zero export policy with an OpenDTU-controlled inverter and energy data from MQTT.

Image
Internet of things
0

1.8K

bluefox42/solarcontrol repository overview

See https://git.privacynerd.de/BlueFox/SolarControl for source repository.




SolarControl

Enforce a zero export (or whatever consumption you like) policy with an OpenDTU-controlled inverter and energy data from MQTT.

Configuring and usage

Example docker-compose (from v1.0)
services:
  solarcontrol:
    image: bluefox42/solarcontrol:latest
    hostname: solarcontrol
    container_name: solarcontrol
    env_file: ".env"
    restart: unless-stopped
    stop_grace_period: 15s

With the following .env file:

MQBROKER=<IP OF THE BROKER>         # ip address of the MQTT broker
MQPORT=<PORT OF THE BROKER>         # port of the MQTT broker
MQUSER=<MQTT USERNAME>              # username for MQTT broker
MQPWD=<MQTT PASSWORD>               # password for MQTT broker
MQTOPIC_P_HOUSE=<HOUSE P TOPIC>     # the MQTT topic for current house power
MQTOPIC_P_SOLAR=<SOLAR P TOPIC>     # the MQTT topic for current solar power
MAXIMUM_DATA_TS_DEVIATION=1         # maximum time difference which is accepted for the arrival of house power and solar power MQTT messages, default: 5 [sec]
OPENDTU_ADDR=<ADDRESS OF OPENDTU>   # address of opendtu (format: http(s)://<IP-HOSTNAME>:<PORT>/)
OPENDTU_USER=<OPENDTU USER>         # username for opendtu auth
OPENDTU_PWD=<OPENDTU PWD>           # password for opendtu auth
OPENDTU_INVERTER_SN=<SERIAL NR>     # serial number of the inverter to control
LIMIT_CORRECTION_FACTOR=2           # correction factor for limit setting (e.g.: when only 2 strings of 4 are connected, you always need to set 2x the power), default: 1.0
LIMIT_UPDATE_INTERVAL=5             # interval in which the limit shall be updated, default: 5 [sec]
DRY_RUN=0                           # if the limit shall be set or not; default: 1 (0: False, 1: True)
POWER_TARGET=15                     # the target power consumption of the house, default: 50 [Watts]
POWER_TARGET_MIN=0                  # minimum percentage for the inverter output limit, default: 0.0 [%]
POWER_TARGET_MAX=100                # maximum percentage for the inverter output limit, default: 100.0 [%]
POWER_DAMPING_FACTOR=0.7            # damping factor for changes of the inverter output limit (between 0-1), default: 0.3
POWER_LIMIT_CHANGE_TRESHOLD=0.3     # set a treshold for the api calls: they will not be executed if the new limit isn't that much higher, default: 0.5 
PYTHONUNBUFFERED=1                  # for use in docker images (for fast logs, ...)

License

This project is licensed under the terms of the GNU General Public License v3.0 or later, see COPYING.

Tag summary

Content type

Image

Digest

sha256:90a4c7f3d

Size

46.7 MB

Last updated

over 1 year ago

docker pull bluefox42/solarcontrol