Skip to main content

Crate hems_flex

Crate hems_flex 

Source
Expand description

The household’s flexibility, in the language Europe agreed on.

S2EN 50491-12-2 — is the interface between a Customer Energy Manager and the Resource Managers in a building. Its central idea is worth stating plainly, because it is what makes it different from every protocol that came before:

A device describes what it can do, not what it is for.

A battery, a hot water tank and a parked car are all storage with a fill level. Once they say so in the same words, an energy manager can plan all three without knowing what any of them is — and a device that arrives next year works without a driver being written for it. EEBUS, by contrast, organises around named use cases, which is why it needs a new one for each new thing a device might want to do.

hems plans in S2’s terms internally and speaks EEBUS where the German grid requires it. This crate is the first half: which control type each asset belongs to, the description a Customer Energy Manager would be sent, and the translation of an instruction back into something hems_device can issue.

The wire types are s2energy, generated from the official schema by the standard’s own authors. Writing our own would be a second opinion about a wire format, which is the one thing a standard exists to prevent.

§The five control types

Control typeForExample
FRBC Fill Rate Based Controlanything with a fill level and a ratebattery, hot water tank, the building’s own thermal mass
PEBC Power Envelope Based Controlanything that just needs a boundcharge point, inverter curtailment
OMBC Operation Mode Based Controldiscrete statesSG Ready heat pump, a two-speed pump
PPBC Power Profile Based Controla fixed sequence started in a windowwashing machine, dishwasher
DDBC Demand Driven Based Controlactuators serving a reported demanda heat pump following a heat demand

Re-exports§

pub use describe::BatteryDescription;
pub use describe::HeatPumpDescription;
pub use describe::describe_battery;
pub use describe::describe_evse;
pub use describe::describe_heat_pump;
pub use describe::describe_pv;
pub use describe::resource_manager_details;
pub use instruct::InstructError;
pub use instruct::battery_power;
pub use instruct::envelope_command;
pub use instruct::envelope_now;
pub use instruct::heat_pump_state;
pub use map::ControlType;
pub use map::control_type_for;
pub use map::roles_for;

Modules§

describe
What a Resource Manager tells a Customer Energy Manager it can do.
instruct
Reading an S2 instruction back into something the site can execute.
map
Which control type an asset belongs to.