eebus

EEBUS, in Rust,
down to the socket.

Connect appliances and energy managers with the SHIP transport, SPINE device model and 28 energy use cases.

Rust 1.88+ · MIT or Apache-2.0

energy_guard.rs
// Cap a 10 kW inverter at 40% of rated output.
let mut guard = EnergyGuardActor::new(lpp::DIRECTION, client, diagnosis, now);
guard.require(&inverter, Some(LimitWrite::active(4_000)), now)?;

// Once commissioned, the guard writes −4,000 W over SPINE.
if let Some(GuardEvent::LimitAccepted { limit, request, .. }) =
    guard.handle_event(&mut engine, &event, now)
{
    println!("Write {} accepted: {limit}", request.get()); // "4000 W"
}
830SPINE types, generated
28use cases, both actors
no_stdbelow the runtime
TLS 1.2mutual auth, SKI-pinned

Protocol stack

Embedded or networked

Drive SHIP and SPINE with your own clock and transport, or use the Tokio runtime for TLS, WebSocket and mDNS.

Application-controlled limits

The Energy Guard commissions a writable limit. The appliance applies its local policy and acknowledges the result.

Exact power, one sign rule

Limits and battery setpoints keep the exact value from the wire. One table states the sign convention for every use case.

Measured conformance

Library tests exercise 189 of 203 abstract test cases for the grid use cases. A device harness covers procedures such as power cycling and factory reset.

The exchange, end to end

A control box discovers a heat pump, establishes trust and writes a power limit. The appliance acknowledges the write over the same connection.

flowchart LR
  mdns["mDNS-SD<br><small>find it</small>"]
  tcp["TCP<br><small>connect</small>"]
  tls["TLS 1.2<br><small>mutual auth</small>"]
  ws["WebSocket<br><small>framing</small>"]
  ship["SHIP<br><small>handshake, trust</small>"]
  spine["SPINE<br><small>model, bindings</small>"]
  uc["use case<br><small>the decision</small>"]

  mdns --> tcp --> tls --> ws --> ship --> spine --> uc

  classDef s fill:#e6f5ef,stroke:#0b8f63,color:#101620;
  classDef d fill:#0b8f63,stroke:#0b8f63,color:#fff;
  class mdns,tcp,tls,ws,ship,spine s
  class uc d

Who it is for

You are buildingYou needStart at
A heat pump, wallbox, battery or inverter that must accept a §14a limitthe Controllable System actors, the tester hooks, no_stdGetting started, then LPC and LPP
An energy manager or grid control box that issues limitsthe Energy Guard and Monitoring Appliance actors, Hub with its listener, browse and pairingOn a network
A gateway, simulator or test harnessthe sans-IO core, without socketsArchitecture

Start with the exchange itself

A grid operator's control box limits a heat pump, first against a virtual clock and then over a real socket. Both are runnable examples in the repository.