Skip to content
Template

BKW Dynamic Feed-in Tariff Switzerland

by 4FingerEddyNo rating yet28 downloads

Content languageEnglish

Description

Overview BKW Dynamic Feed-in Tariff Switzerland is an independent community integration for importing BKW's dynamic Swiss feed-in tariff into Loxone. A small open-source Docker proxy fetches and validates the BKW tariff data, groups the quarter-hour values into 24 hourly values for the Swiss local tariff day, and exposes a flat JSON document for a Loxone Virtual HTTP Input. BKW API → self-hosted Docker proxy → Loxone Virtual HTTP Input → Spot Price Optimizer This template is for feed-in tariffs, not electricity consumption or import prices.

Requirements Technical knowledge required: This community integration is not a plug-and-play solution. It requires a self-hosted Docker system and practical knowledge of Docker, container deployment, IP networking, and the configuration of LOXONE Virtual HTTP Inputs. Users should be able to deploy and maintain the proxy, configure the required network connection, and perform basic troubleshooting. Please review the installation documentation before using this template.

- A Docker Engine with Compose, or Portainer - A stable LAN address or local DNS name for the Docker host - Network access from the Loxone Miniserver to TCP port 8785 on the Docker host - Outbound HTTPS access from the proxy to api.bkw.ch - A Loxone Miniserver and Loxone Config with the Spot Price Optimizer function block - An applicable BKW dynamic Swiss feed-in tariff arrangement -

Do not expose TCP port 8785 to the internet!

Installation

1. Deploy the released proxy version using the repository's examples/docker-compose.yml. 2. Keep the /data volume persistent. 3. Verify /health, /v1/status-code, and /v1/loxone.json. 4. Import bkw-tariff-proxy.xml as a Virtual HTTP Input. 5. Replace REPLACE_WITH_PROXY_HOST with the Docker host's trusted LAN address or local DNS name. 6. Connect h00 through h23 one-to-one to hours 00:00 through 23:00 of the Spot Price Optimizer. 7. Configure the Spot Price Optimizer in Absolute mode. 8. Add the documented status guard before enabling productive automation.

Values and scaling The proxy transports signed integer milli-CHF/kWh values to avoid unreliable decimal parsing in Loxone command recognition. Each hourly input applies source 0..1000 → target 0..1. A transport value of 45 therefore reaches the Spot Price Optimizer as 0.045 CHF/kWh. Negative and zero tariff values are valid. A real tariff value of zero must not be treated as missing data.

Safety and data quality

- status_code == 0 → complete validated tariff day; optimization may run - status_code == 10 → exactly one hour was zero-filled; optimization may run with a visible warning - all other codes → block or neutralize dynamic optimization

Keep the degraded-data warning visible for status 10. Never bypass an unknown status or unknown-unit condition. The included .Loxone example demonstrates manual Classic EMS priority, offline blocking, status 0/10 handling, an explicit fail-closed catch-all for unknown codes, and 24 one-to-one Absolute-mode hour connections.

Source and support Documentation, deployment, releases, troubleshooting, and source code: GitHub repository Release used for this submission: v0.2.0 Best-effort community support: GitHub Issues The project is provided as-is under the MIT License. Pin a released container version in production and test updates before enabling live automation.

Version mapping LOXONE Library package 1.0.0 uses bkw-tariff-proxy project release v0.2.0.

Non-affiliation Independent community project. Not affiliated with, endorsed by, or supported by BKW Energie AG or Loxone Electronics GmbH. The names "BKW" and "Loxone" are used descriptively to identify the data source and integration target.

Inputs and outputs · 25

NameTypeCommandUnit
BKW Status CodeVirtualInHttp\i"status_code":\i\v<v>
BKW h00VirtualInHttp\i"feedin_h00_mchf_kwh":\i\vCHF
BKW h01VirtualInHttp\i"feedin_h01_mchf_kwh":\i\vCHF
BKW h02VirtualInHttp\i"feedin_h02_mchf_kwh":\i\vCHF
BKW h03VirtualInHttp\i"feedin_h03_mchf_kwh":\i\vCHF
BKW h04VirtualInHttp\i"feedin_h04_mchf_kwh":\i\vCHF
BKW h05VirtualInHttp\i"feedin_h05_mchf_kwh":\i\vCHF
BKW h06VirtualInHttp\i"feedin_h06_mchf_kwh":\i\vCHF
BKW h07VirtualInHttp\i"feedin_h07_mchf_kwh":\i\vCHF
BKW h08VirtualInHttp\i"feedin_h08_mchf_kwh":\i\vCHF
BKW h09VirtualInHttp\i"feedin_h09_mchf_kwh":\i\vCHF
BKW h10VirtualInHttp\i"feedin_h10_mchf_kwh":\i\vCHF
BKW h11VirtualInHttp\i"feedin_h11_mchf_kwh":\i\vCHF
BKW h12VirtualInHttp\i"feedin_h12_mchf_kwh":\i\vCHF
BKW h13VirtualInHttp\i"feedin_h13_mchf_kwh":\i\vCHF
BKW h14VirtualInHttp\i"feedin_h14_mchf_kwh":\i\vCHF
BKW h15VirtualInHttp\i"feedin_h15_mchf_kwh":\i\vCHF
BKW h16VirtualInHttp\i"feedin_h16_mchf_kwh":\i\vCHF
BKW h17VirtualInHttp\i"feedin_h17_mchf_kwh":\i\vCHF
BKW h18VirtualInHttp\i"feedin_h18_mchf_kwh":\i\vCHF
BKW h19VirtualInHttp\i"feedin_h19_mchf_kwh":\i\vCHF
BKW h20VirtualInHttp\i"feedin_h20_mchf_kwh":\i\vCHF
BKW h21VirtualInHttp\i"feedin_h21_mchf_kwh":\i\vCHF
BKW h22VirtualInHttp\i"feedin_h22_mchf_kwh":\i\vCHF
BKW h23VirtualInHttp\i"feedin_h23_mchf_kwh":\i\vCHF

FAQ

No questions have been answered yet.

Ratings and comments

No ratings or comments yet.

Questions and answers

No questions have been asked yet.

Report this entry

Report abuse

You have to be logged in to report an entry. Log in