HLZ Controller: Automated Peak Load Time Control for Medium Voltage Networks

Energy Control Shelly Automation Medium Voltage IoT KVS

In medium voltage networks (e.g., 20 kV), energy providers like EWE Netz GmbH publish annual peak load time windows (HLZ). During these periods, special grid fees apply. The HLZ Controller fully automates this control – autonomous, Git-based, and low-maintenance.

The Challenge

Energy providers publish annual peak load time windows (HLZ) for medium voltage networks. For operators of facilities, pumping stations, or heat generators, compliance with these time windows means:

  • Optimize grid fees – by avoiding peak load times
  • Reduce operating costs – savings in the mid-five-figure range per year
  • Avoid manual control – no error-prone manual switching

The problem: Conventional solutions are often cloud-dependent, expensive, or maintenance-intensive.

The Solution: HLZ Controller with Shelly Pro

The HLZ Controller is a fully autonomous peak load time management system based on Shelly Pro, fed by open data sources and Git-based schedules.

The Concept in Three Components

1. KVSLoaderMerge.js – Automatic Holiday Import

Automatically loads all holidays for the current and upcoming year from nager.date and stores them in the Shelly's Key-Value Store (KVS). Existing values are merged, not overwritten.

2. MergeBridgeDays.js – Bridge Day Integration

Additionally supplements bridge days from an easily maintainable JSON file, maintained in a Git repository and automatically downloaded by the device:

{
  "2025": { "05": ["02","30"] },
  "2026": { "05": ["15"], "10": ["02"] }
}

This allows the system to also consider days that energy providers declare as off-peak time. Schedules are centrally managed in the repository and automatically synchronized.

3. CheckBankHoliday.js – Intelligent Daily Check

Checks daily whether it's a holiday, bridge day, or Christmas off-peak time:

  • If yes → all HLZ schedules are automatically disabled
  • If noreactivated

This ensures the control always runs correctly – completely hands-free.

How the Shelly Stays Up-to-Date

Time Action Script
00:05 AM Daily check / switching CheckBankHoliday.js
00:10 AM Load holidays KVSLoaderMerge.js
00:11 AM Add bridge days MergeBridgeDays.js

Even during internet outages, the Shelly continues to operate, as all data is stored locally in the KVS.

Data Structure in Shelly KVS

hlz/holidays/YYYY/MM  → ["01","02","08","29","30"]
hlz/years             → {"2025":"ok","2026":"ok"}
hlz/meta              → Source, timestamp, schema

These values are automatically maintained, extended, and synchronized. Once set up, the system runs completely autonomously.

Technologies Used

Hardware & Control:
  • Shelly Pro 3 (medium voltage switching)
  • Key-Value-Store (KVS) for local data storage
Data Sources:
  • nager.date (holidays, open data)
  • Git repository (bridge days, JSON schedules)
Automation:
  • JavaScript-based Shelly scripts
  • Time-controlled cron jobs (00:05 - 00:11 AM)
  • Automatic data set merging
Version Control:
  • Git repository for schedule management
  • Automatic download by Shelly Pro
  • Fully offline-capable (local KVS)

Practical Example: Medium Voltage Pumping Station

Initial Situation: Pumping station with medium voltage connection (20 kV), manual HLZ management, high error potential.

Solution:

  • Shelly Pro 3 controls switching of three power paths
  • Integrated schedules precisely maintain HLZ times
  • Automatic deactivation on holidays and bridge days

Result:

  • Savings in the mid-five-figure range per year
  • No additional operating effort
  • Audit-proof data storage
  • Complete offline capability

Advantages of This Solution

100% Autonomous No cloud, no external server – all data stored locally in Shelly KVS.

Offline-Capable Holidays & bridge days in local storage, works even during internet outages.

Audit-Proof Clearly structured KVS data with timestamps and source attribution.

Low-Maintenance Automatic updates through time-controlled scripts, no manual intervention required.

Expandable Adaptable for other regions, voltage levels, or energy providers.

Economical Savings in the mid-five-figure range – without license costs or cloud fees.

Why Git-Based Management Convinces

With Git repositories, schedules, logic, and control remain completely in your hands:

  • No cloud login
  • Version control for all schedules
  • No license costs
  • Transparent, maintainable, and future-proof system
  • Central management, automatic synchronization

Open data sources like nager.date and Shelly Pro create a transparent overall system.

Summary

The HLZ Controller fully automates peak load time control in medium voltage networks. The combination of Shelly Pro, open Key-Value Store, and Git-based schedule management creates a low-maintenance, economically attractive solution – secure, autonomous, and without vendor lock-in.

Are you planning automated peak load time control?

I develop and implement customized HLZ solutions for medium voltage systems, pumping stations, and heat generation systems – from planning through integration to maintenance.

Previous Post