Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

ckvsoft/SEUSS

Repository files navigation

Logo

SEUSS

[SEUSS -> Smart Ess Unit Spotmarket Switcher]

Please report the bugs and suggest improvements. Thank you to everyone who has already taken part.

If you would like to contribute extensions to this, please submit the pull request in the dev branch. For bug fixes, the pull request can also be made on the main branch

What does this software do?

This is a Python 3 Application that turns on your ESS unit (controller) at the right time when your hourly dynamic energy prices are low. Or used for discharging when prices are extremely high.


Design Note: Hourly Prices as Core Decision Unit

SEUSS bases all charging and discharging decisions on hourly prices, even when some spot markets provide higher-resolution (15-minute) prices.

Why this matters:

  • Fair comparison: Hourly aggregation ensures prices from aWATTar, ENTSO-E, and Tibber are semantically equivalent.
  • Avoid misleading spikes: Single 15-minute low prices do not make an entire hour “cheap.”
  • 🔌 Contiguous periods: Maintains meaningful, hour-scale charging/discharging windows.
  • 🛠 Hardware stability: Prevents excessive switching and reduces wear on ESS components.

For a detailed explanation, see the full design note.


Currently supported systems are:

ESS Units


  • Victron Venus OS energy storage systems such as the MultiPlus II series

Spot Markets


  • aWATTar
  • Entso-E
  • Tibber

The control of the ESS unit (controller) is done via mqtt. The advantage of this control is: that this application does not have to run directly on VenusOS. Direct control with D-BUS is in the works

Tested

This version was successful with


  • Linux Ubuntu >= 22.04
  • Venus OS Raspberry >= v3.12

tested

Install

Download the installation script from the GitHub repository execute the following command in your terminal:

wget -O seuss_install.sh https://raw.githubusercontent.com/ckvsoft/SEUSS/dev/scripts/seuss_install.sh`

Run the installer script with additional options to prepare everything in a subdirectory for your inspection. For example:

bash seuss_install.sh`

The default directory is /data/seuss (Venus OS) But you can optionally specify a different directory by using the environment variable TARGET_DIRECTORY e.g.

TARGET_DIRECTORY=/opt/seuss bash seuss_install.sh`

On a Cerbo GX the filesystem is mounted read only. See https://www.victronenergy.com/live/ccgx:root_access. In order to make the filesystem writeable you need to execute the following command before running the installation script:

/opt/victronenergy/swupdate-scripts/resize2fs.sh

Configuration

After SEUSS has been successfully installed, a website is available at the IP address and port 5000 of the Computer/VenusOS on which SEUSS was installed.

  • You can view or download the log file.
  • Furthermore, the configuration can be carried out using the [Config Editor] menu item.
  • Tool tips for most points are displayed here.

Log Viewer

  • Logo

Config Editor - ESS Units

  • Logo

Config Editor - PV Panels

  • Logo

These can also be found in the Settings description. For those who prefer to work in a config file, there is config.json

Settings

General

Setting Meaning
time_zone Essential for correct timing of operations based on your geographic location.
Format like Europe/Vienna, Europe/Amsterdam, ...
log_file_path Sets an alternative path to which the log files are saved.
log_level Used Loglevel are: INFO, WARNING, ERROR and DEBUG. see Log Levels

Prices

Please change prices (always use Cent/kWh, no matter if you're using Awattar (displaying Cent/kWh) or Entsoe API (displaying EUR/MWh) / net prices excl. tax).

Setting Meaning
use_second_day enable/disable to compare today and tomorrow prices if they become available
Note: If you activate this and the prices decrease over several days,it is possible that there will be no charging or switching for several days until the lowest prices are reached.
number_of_lowest_prices_for_charging Two modes can be used here.
mode1:
* the number of cheapest prices at which charging should/may take place. Here you enter whole numbers
mode2:
* Here the number of prices is determined based on the average price. For this mode you enter decimal numbers. E.g. 0.85 to receive all prices that are 85% below average.What is relevant here is the specification of a comma value. With 1.0 it is assumed that 100% of the average price is taken (doesn't make any sense) but if 1 is entered it is 1 cheapest price
number_of_highest_prices_for_discharging Two modes can be used here.
mode1:
* the number of most expensive prices at which discharging should/may take place. Here you enter whole numbers
mode2:
* Here the number of prices is determined based on the average price. For this mode you enter decimal numbers. E.g. 1.25 to receive all prices that are 25% above average.
What is relevant here is the specification of a comma value. With 1.0 it is assumed that 100% of the average price is taken (doesn't make any sense) but if 1 is entered it is 1 most expensive price
charging_price_limit Charging is always enabled below this price.
The threshold price below which charging is allowed to occur.
charging_price_hard_cap Charging is strictly prohibited above this price.
Ensures that charging does not occur when prices exceed the specified threshold.
use_solar_forecast_to_abort Operations will only be aborted if the solar energy for both days exceeds the average consumption:
If the expected solar energy surpasses these thresholds, operations such as charging will be aborted in favor of utilizing solar energy instead.
delay_grid_charging_below_active_soc_limit Prevents charging from the grid when it returns if SOC is below the Active SOC Limit and electricity prices are high.

ESS Units

Victron

Setting Meaning
use_vrm If this point is enabled (true), an attempt is made to connect to the Victron via the VRM portal.
This requires a user/password in the VRM portal
ip_address The local IP address of the Victron.
This is required if use_vrm is disabled (false).
Otherwise this field remains empty
unit_id VRM Portal ID
can be found in the Settings / VRM online portal / VRM Portal Id.
Note: This ID is required to access the Victron even if you are not using a VRM portal
user mail adress you use to connect to VRM portal
password password you use to connect to VRM portal
max_discharge_power Default: -1
If you use Limit inverter power in the ESS menu then this value must be entered here.
If the inverter is set to Discharge false by this app then this value will be overwritten in the ESS.
This limit here is set in discharge mode in the ESS.
If no limit is set then leave the value at -1.
Example: Enter 1000 to limit the discharge to 1000W, Enter -1 for full Power
only_observation If only observation is activated the essunit will only be used for statistical purposes. The essunit does not execute any conditions
enabled To use this entry it must be enabled. Otherwise disabled

Spot Markets

aWATTar

Setting Meaning
country Choose location AT or DE
fee This parameter defines the fee to be added to the base price. The fee can be specified as a percentage (e.g., 3% + 2.5 for 3% of the base price plus a fixed fee of 2.5 cents), or just a fixed amount (e.g., 2.5 for a flat fee of 2.5 cents). The fixed fee must always be specified in cents. If no fee should be applied, this field must be left empty. The final price is calculated using the formula: Final price = Base price + Fee. Please note that the price is calculated excluding tax, and the fee is already included in the final price. For the special case of "entsoe", there is no direct fee. In this case, the fee should be taken from the primary market. If "entsoe" is the primary market, the fee should be taken from the fallback market instead.
primary If this market is enabled this point sets it as the primary market
enabled To use this entry it must be enabled. Otherwise disabled

Entso-e

Setting Meaning
api_token How to get the free api_security_token:
1. Go to https://transparency.entsoe.eu/ --> register and create an account
2. Send an email to [email protected] with “Restful API access” in the subject line
3. The ENTSO-E Helpdesk will respond to your request within 3 working days.
4. Generate a security token at https://transparency.entsoe.eu/usrm/user/myAccountSettings
in_domain To find out your in and out domain key go to:
https://www.entsoe.eu/data/energy-identification-codes-eic/eic-area-codes-map/
out_domain like in_domain
fee This parameter defines the fee to be added to the base price. The fee can be specified as a percentage (e.g., 3% + 2.5 for 3% of the base price plus a fixed fee of 2.5 cents), or just a fixed amount (e.g., 2.5 for a flat fee of 2.5 cents). The fixed fee must always be specified in cents. If no fee should be applied, this field must be left empty. The final price is calculated using the formula: Final price = Base price + Fee. Please note that the price is calculated excluding tax, and the fee is already included in the final price. For the special case of "entsoe", there is no direct fee. In this case, the fee should be taken from the primary market. If "entsoe" is the primary market, the fee should be taken from the fallback market instead.
primary If this market is enabled this point sets it as the primary market
enabled To use this entry it must be enabled. Otherwise disabled

Tibber

Setting Meaning
api_token To get the tibber_api_key:
1. log in with a free or customer Tibber account at https://developer.tibber.com/settings/access-token
2. Create a token by selecting the scopes you need (select "price")
3. Use this link to create a free account with your smartphone: https://tibber.com/de/invite/ojgfbx2e
price_unit Set to:
"energy" to use the spotmarket-prices (default),
"total" to use the total prices including taxes and fees,
"tax" to use only the taxes and fees
fee This parameter defines the fee to be added to the base price. The fee can be specified as a percentage (e.g., 3% + 2.5 for 3% of the base price plus a fixed fee of 2.5 cents), or just a fixed amount (e.g., 2.5 for a flat fee of 2.5 cents). The fixed fee must always be specified in cents. If no fee should be applied, this field must be left empty. The final price is calculated using the formula: Final price = Base price + Fee. Please note that the price is calculated excluding tax, and the fee is already included in the final price. For the special case of "entsoe", there is no direct fee. In this case, the fee should be taken from the primary market. If "entsoe" is the primary market, the fee should be taken from the fallback market instead.
primary If this market is enabled this point sets it as the primary market
enabled To use this entry it must be enabled. Otherwise disabled

PV Panels

Setting Meaning
locLat Latitude
locLong Longitude
angle Angle of your panels 0 (horizontal) … 90 (vertical)
direction Plane azimuth, -180 … 180 (-180 = north, -90 = east, 0 = south, 90 = west, 180 = north)
totPower installed modules power in kilo watt
total_area Total area of the panels in square meters
efficiency Adjusts the efficiency rate of the installed PV panels for accurate performance forecasting.
damping_morning With this parameter you can adjust the result in the morning. Value float 0..1, default 0
damping_evening With this parameter you can adjust the result in the evening. Value float 0..1, default 0
enabled To use this entry it must be enabled. Otherwise disabled

Smart Switches

Shelly

Setting Meaning
ips A list of IP addresses assigned to the device. Use | to separate multiple IPs. Prefix an IP with ! to temporarily disable it without removing it from the list. Example: "10.1.1.20 | !10.1.1.21" (IP 10.1.1.21 is disabled).
user The username required for authentication (if applicable).
password The password required for authentication (can be encoded in base64).
enabled To use this entry, it must be set to true. Otherwise, it is false (disabled).

Tasmota

Setting Meaning
ips A list of IP addresses assigned to the device. Use | to separate multiple IPs. Prefix an IP with ! to temporarily disable it without removing it from the list. Example: "10.1.1.30".
user The username required for authentication.
password The password required for authentication (can be encoded in base64).
enabled To use this entry, it must be set to true. Otherwise, it is false (disabled).

Fritz

Setting Meaning
ips A list of IP addresses assigned to the device. Use | to separate multiple IPs. Prefix an IP with ! to temporarily disable it without removing it from the list. Example: "192.168.178.1 | !10.1.1.23" (IP 10.1.1.23 is disabled).
ains A list of AINs (Actor Identification Numbers) for Fritz devices. Multiple AINs are separated by commas, and if multiple IPs are used, the AINs for each IP are separated by |. Example: "1234,3443,2333 | 1234,4456,7866,3421".
user The username required for authentication.
password The password required for authentication (can be encoded in base64).
enabled To use this entry, it must be set to true. Otherwise, it is false (disabled).

Loglevels

ERROR

The ERROR log level indicates error conditions within an application that hinder the execution of a specific operation. While the application can continue functioning at a reduced level of functionality or performance,
ERROR logs signify issues that should be investigated promptly.

WARN

Events logged at the WARN level typically indicate that something unexpected has occurred, but the application can continue to function normally for the time being. It is also used to signify conditions that should be promptly addressed before they escalate into problems for the application.

INFO

The INFO level captures events in the system that are significant to the application's business purpose. Such events are logged to show that the system is operating normally. Production systems typically default to logging at this level so that a summary of the application's normal behavior is visible to anyone reviewing the logs.

DEBUG

The DEBUG level is used for logging messages that aid developers in identifying issues during a debugging session. The content of the messages logged at the DEBUG level will vary depending on your application, but they typically contain detailed information that assists its developers in troubleshooting problems efficiently. This can include variables' state within the surrounding scope or relevant error codes. |

Inspiration

The idea is inspired by the @christian1980nrw project linked below. This project is my first with the Victron Venus OS, so I adopted some ideas and approaches from the following projects. The approach is the same and for very narrow systems the implementation with a bash script is probably better

– thank you very much for passing on the knowledge:

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •