Logo

Contents:

  • Home

API Reference

  • cremalink package
    • Client
      • Client.create_datapoint()
      • Client.fetch_properties()
      • Client.get_device()
      • Client.get_devices()
      • Client.get_lan_config()
      • Client.get_serial_number()
      • Client.list_account_devices()
      • Client.refresh_access_token()
    • Device
      • Device.transport
      • Device.dsn
      • Device.model
      • Device.nickname
      • Device.ip
      • Device.lan_key
      • Device.scheme
      • Device.is_online
      • Device.last_seen
      • Device.firmware
      • Device.serial
      • Device.coffee_count
      • Device.command_map
      • Device.property_map
      • Device.monitor_profile
      • Device.extra
      • Device.PARAM_CURRENT_PROFILE
      • Device.app_id_confirm_own_seconds
      • Device.app_id_confirm_poll
      • Device.app_id_confirm_seconds
      • Device.app_id_refresh_min_seconds
      • Device.app_id_refresh_seconds
      • Device.bean_systems()
      • Device.beverage_catalog()
      • Device.brew()
      • Device.brew_entry()
      • Device.capabilities
      • Device.catalog_datapoints
      • Device.coffee_count
      • Device.command_map
      • Device.configure()
      • Device.current_profile
      • Device.custom_recipe_names()
      • Device.declared_catalog()
      • Device.do()
      • Device.dsn
      • Device.extra
      • Device.favorite_beverages()
      • Device.firmware
      • Device.firmware_info()
      • Device.from_map()
      • Device.get_commands()
      • Device.get_monitor()
      • Device.get_monitor_frame()
      • Device.get_monitor_snapshot()
      • Device.get_profiles()
      • Device.get_properties()
      • Device.get_property()
      • Device.get_property_aliases()
      • Device.get_setting_bits()
      • Device.get_settings()
      • Device.get_statistics()
      • Device.health()
      • Device.ip
      • Device.is_online
      • Device.lan_key
      • Device.last_seen
      • Device.machine_profile
      • Device.model
      • Device.model_name
      • Device.model_ref
      • Device.monitor_bits
      • Device.monitor_profile
      • Device.n_profiles
      • Device.nickname
      • Device.profile_poll_seconds
      • Device.property_map
      • Device.read_catalog()
      • Device.recipe_beverage_order
      • Device.recipe_params()
      • Device.recipe_priority_loaded()
      • Device.refresh_current_profile()
      • Device.refresh_monitor()
      • Device.resolve_property()
      • Device.response_poll
      • Device.response_timeout
      • Device.scheme
      • Device.seed_catalog_from_properties()
      • Device.select_bean_system()
      • Device.select_profile()
      • Device.selected_bean_slot()
      • Device.selected_profile
      • Device.send_command()
      • Device.send_frame()
      • Device.serial
      • Device.session_refresh()
      • Device.set_setting()
      • Device.set_setting_bit()
      • Device.setting_levels
      • Device.setting_options()
      • Device.settings_datapoints
      • Device.standby()
      • Device.statistics_datapoints
      • Device.statistics_source
      • Device.stop_brew()
      • Device.transport
      • Device.wake()
      • Device.write_confirm_seconds
    • EmbeddedLocalServer
      • EmbeddedLocalServer.advertised_ip
      • EmbeddedLocalServer.event_logger
      • EmbeddedLocalServer.get_recent_events()
      • EmbeddedLocalServer.log()
      • EmbeddedLocalServer.log_telemetry()
      • EmbeddedLocalServer.set_machine_asleep()
      • EmbeddedLocalServer.start()
      • EmbeddedLocalServer.stop()
    • LocalServer
      • LocalServer.start()
    • ServerSettings
      • ServerSettings.advertised_ip
      • ServerSettings.cloud_token_path
      • ServerSettings.cloud_wake_interval_seconds
      • ServerSettings.cloud_wake_threshold
      • ServerSettings.commands_poll_active_seconds
      • ServerSettings.device_register_ca_path
      • ServerSettings.device_register_timeout
      • ServerSettings.device_register_verify
      • ServerSettings.enable_device_register
      • ServerSettings.enable_monitor_job
      • ServerSettings.enable_nudger_job
      • ServerSettings.enable_session_job
      • ServerSettings.fixed_random_2
      • ServerSettings.fixed_time_2
      • ServerSettings.log_ring_size
      • ServerSettings.model_config
      • ServerSettings.monitor_poll_interval
      • ServerSettings.monitor_poll_interval_standby
      • ServerSettings.nudger_poll_interval
      • ServerSettings.nudger_poll_interval_standby
      • ServerSettings.nudger_renudge_seconds
      • ServerSettings.queue_max_size
      • ServerSettings.server_ip
      • ServerSettings.server_port
      • ServerSettings.server_settings_path
      • ServerSettings.session_keepalive_interval_seconds
      • ServerSettings.session_probe_timeout_seconds
      • ServerSettings.session_register_timeout_seconds
      • ServerSettings.session_silence_reset_seconds
    • authenticate_cloud()
    • create_app()
    • create_cloud_device()
    • create_local_device()
    • detect_model_id()
    • device_map()
    • log_event()
    • Subpackages
      • cremalink.clients package
      • cremalink.core package
      • cremalink.crypto package
      • cremalink.devices package
      • cremalink.domain package
      • cremalink.ecam package
      • cremalink.local_server_app package
      • cremalink.parsing package
      • cremalink.resources package
      • cremalink.transports package
    • Submodules
      • cremalink.local_server module
cremalink
  • cremalink package
  • View page source

cremalink package

Cremalink: A Python library for interacting with De’Longhi coffee machines.

This top-level package exposes the primary user-facing classes and functions for easy access, including the main Client, the Device model, and factory functions for creating device instances.

class cremalink.Client(token_path: str, *, logger: Logger | None = None)[source]

Bases: object

Client for interacting with the Ayla IoT cloud platform. Manages authentication (access and refresh tokens) and device discovery.

create_datapoint(dsn: str, name: str, value) → dict[source]

Write one datapoint via the cloud channel — the app’s announce path.

Verified endpoint (AylaProperty.createDatapointCloud / createDatapointEndpoint, Coffee Link 4.9.6; DECODED.md): POST apiv1/dsns/{dsn}/properties/{name}/datapoints.json with {"datapoint": {"value": ...}} and x-ayla-source: Mobile. This is the channel that carries device_connected to the machine’s cloud uplink — independent of the LAN local_reg module, so it is the recovery lever when the LAN session is dead (research.md R17). Whether a wedged datapoint engine processes it is unverified — callers should treat it as a probe, not a fix.

fetch_properties(dsn: str) → dict[str, str | None][source]

Every datapoint of a device in ONE request — {name: value}.

This is the Coffee Link app’s property-store sync (syncProperties fetch-all; research.md R11, captures/cloud_fetch.json). Values are the cloud’s last-published copies (protocol.md §13 staleness lesson) — fine for factory descriptors and menu order, not for a brew’s live recipe values.

get_device(dsn: str, device_map_path: str | None = None)[source]

Retrieves a specific cloud device by its DSN.

Parameters:
  • dsn (str) – The Device Serial Number of the desired device.

  • device_map_path (str | None) – Optional path to a device-specific command map file.

Returns:

An instance of CloudDevice if found, otherwise None.

Return type:

CloudDevice | None

get_devices()[source]

Retrieves a list of Device Serial Numbers (DSNs) for all registered devices.

Returns:

A list of DSNs.

Return type:

list[str]

get_lan_config(dsn: str) → dict[source]

Fetch LAN connectivity details for a device (FR-006).

Ported from delonghi_coffee’s api.get_lan_config — same Ayla platform, same account. Never raises just because LAN is disabled; returns lan_enabled: False with the other fields None instead (FR-008).

get_serial_number(dsn: str) → str | None[source]

Fetch the raw d270_serialnumber property for a device.

Used as an input to model detection (FR-004); returns None if the property is absent rather than raising, so callers can safely fall through to the next detection tier.

list_account_devices() → list[dict][source]

Discover coffee-machine devices on the account (cloud-assisted onboarding).

Unlike get_devices() (kept unchanged for backward compatibility), this re-fetches /devices.json and returns one enriched dict per coffee-machine device only — non-coffee appliances (e.g. a Pinguino A/C on the same account) are excluded, not just flagged (FR-002).

Returns:

Each with dsn, product_name, oem_model, lan_enabled, connection_status.

Return type:

list[dict]

refresh_access_token() → str[source]

Fetch a new access token with the stored refresh token.

The refresh token rotates and is written back to token_path. Handed to cloud transports, which call it on HTTP 401.

class cremalink.Device(transport: DeviceTransport, dsn: str | None = None, model: str | None = None, nickname: str | None = None, ip: str | None = None, lan_key: str | None = None, scheme: str | None = None, is_online: bool | None = None, last_seen: str | None = None, firmware: str | None = None, serial: str | None = None, coffee_count: int | None = None, command_map: dict[str, ~typing.Any]=<factory>, property_map: dict[str, ~typing.Any]=<factory>, monitor_profile: MonitorProfile = <factory>, extra: dict[str, ~typing.Any]=<factory>, machine_profile: MachineProfile | None = None, n_profiles: int = 1, capabilities: dict[str, ~typing.Any]=<factory>, setting_levels: dict[str, int]=<factory>, statistics_source: str = 'native', statistics_datapoints: list[str] = <factory>, settings_datapoints: list[str] = <factory>, catalog_datapoints: list[str] = <factory>, monitor_bits: dict[str, list[str]]=<factory>, model_ref: dict[str, ~typing.Any]=<factory>, model_name: str | None = None, recipe_beverage_order: list[int] = <factory>, response_timeout: float = 8.0, response_poll: float = 0.25, write_confirm_seconds: float = 45.0, profile_poll_seconds: float = 30.0, app_id_refresh_seconds: float = 240.0, app_id_confirm_seconds: float = 10.0, app_id_confirm_poll: float = 3.0, app_id_confirm_own_seconds: float = 5.0, app_id_refresh_min_seconds: float = 60.0)[source]

Bases: object

Represents a coffee machine, providing methods to control and monitor it.

This class holds the device’s state (e.g., IP, model) and uses a DeviceTransport object to handle the actual communication. Device-specific capabilities are loaded from a “device map” file.

transport

The transport object responsible for communication.

Type:

cremalink.transports.base.DeviceTransport

dsn

Device Serial Number.

Type:

str | None

model

The model identifier of the device.

Type:

str | None

nickname

A user-defined name for the device.

Type:

str | None

ip

The local IP address of the device.

Type:

str | None

lan_key

The key used for LAN-based authentication.

Type:

str | None

scheme

The communication scheme (e.g., ‘http’, ‘mqtt’).

Type:

str | None

is_online

Boolean indicating if the device is currently reachable.

Type:

bool | None

last_seen

Timestamp of the last communication.

Type:

str | None

firmware

The device’s firmware version.

Type:

str | None

serial

The device’s serial number.

Type:

str | None

coffee_count

The total number of coffees made.

Type:

int | None

command_map

A mapping of command aliases to their hex codes.

Type:

dict[str, Any]

property_map

A mapping of property aliases to their technical names.

Type:

dict[str, Any]

monitor_profile

Configuration for parsing monitor data.

Type:

cremalink.parsing.monitor.profile.MonitorProfile

extra

A dictionary for any other miscellaneous data.

Type:

dict[str, Any]

PARAM_CURRENT_PROFILE: ClassVar[int] = 1006

Param behind striker d286_mach_sett_profile — on striker it is the live selected-profile register (f2() asserts the envelope param id). On the Soul it answers 0x95 but does NOT track 0xA9 selections — verified 2026-10-25: display on profile 2 while the register still read 0. On non-striker it is only a boot-state hint, never truth (DECODED.md §335).

app_id_confirm_own_seconds: float = 5.0

a machine that still holds it republishes nothing, so the wait only costs time (seen live: no answer within 10 s). Real confirmations took 3–5 s.

Type:

Shorter wait when the cloud already shows our id

app_id_confirm_poll: float = 3.0
app_id_confirm_seconds: float = 10.0

How long to wait for the machine to confirm a registration, and the spacing of the checks while waiting (the app checks once after a few seconds; a few spaced reads keep the request count low).

app_id_refresh_min_seconds: float = 60.0

Inside the refresh window an explicit refresh frame is sent at most this often; every frame carrying our id extends the registration too (a command sent with an app’s id kept that registration alive).

app_id_refresh_seconds: float = 240.0

App-id registration (app_device_connected, striker machines): the machine drops a registration ~300 s after the last refresh, so a registration older than this is renewed instead of refreshed.

bean_systems() → list[BeanSystem][source]

Configured BeanAdapt slots with their user-assigned names.

Reads the republished d25X_beansystem_N blobs — the same ba f0 frames the app’s U(index)/0xBA slot reads produce (protocol.md §11 — on LAN the answers republish the d25x properties rather than answering data_response). Frame layout per DECODED G0/loadBeanSystems: id @[4], name UTF-16BE @[5..44] zero-stripped, flag bytes before the CRC (01 01 = configured+selected, 00 00 = empty slot — research.md R10). Unconfigured/undecodable slots are skipped.

beverage_catalog(*, fetch_priority: bool = True) → list[Beverage][source]

Brewable beverages for the selector, priority-ordered.

Built from the app’s model table (static — zero machine requests) filtered to the union of the profile’s drink-menu order and the command-map brew entries. The menu order costs one cached GET per profile; pass fetch_priority=False (standby / startup) to use only what is already cached, falling back to command-map order. Labels are resolved by callers (command-map name → Beverage.name → Beverage <id>).

brew(beverage_id: int, recipe: bytes | None = None, profile_slot: int | None = None, accessory: int = 0, *, overrides: Mapping[int, int] | None = None, action: int | None = None, params: RecipeParams | None = None) → Any[source]

Start brewing beverage_id — optionally with param overrides.

profile_slot=None resolves to the last 0xA9-acked profile (current_profile); recipe=None fetches the profile-scoped recipe bytes from the republished a6f0 property — both per the FR-001 coherence rule (frame names its profile, recipe must be that profile’s). do() uses the same live-recipe path, taking beverage id, action and trailer from the stored frame and falling back to the captured recipe when the machine does not republish one.

overrides ({param_id: raw_value}) is a one-off brew: the values are merged into the recipe TLVs and the machine’s stored recipe is untouched (the 0x83 PREPARE_BEVERAGE path — no SAVE_BEVERAGE write; research.md R1–R2). Overrides are validated against recipe_params() bounds; management tags and params absent from the recipe are rejected (ValueError). Passing params (a prior recipe_params() result) skips the second machine read and builds the frame straight from its values map. Bean-system beverages (0xC8–0xCD) send action | 0x80 and read the selected bean’s bs_recipe datapoint (research.md R10).

brew_entry(beverage_id: int) → dict[source]

The command-map entry carrying beverage_id ({} if none).

capabilities: dict[str, Any]
catalog_datapoints: list[str]
coffee_count: int | None = None
command_map: dict[str, Any]
configure() → None[source]

Configures the underlying transport.

current_profile: int = 0
custom_recipe_names() → dict[int, str][source]

Custom recipe names by beverage id, as the last cloud seed saw them.

declared_catalog() → RecipeCatalogue[source]

The advisory catalogue declared by the app’s model table.

Uses model_ref.recipe_declaration (an appModelId whose table entry stands in for this model) or else model_ref.appModelId. Empty when the table declares no recipes.

do(drink_name: str) → Any[source]

Executes a command by its friendly name (e.g., ‘espresso’).

Map entries are decoded fields, not captured frames:

  • power (standby/wake/session_refresh) builds via build_power.

  • beverage_id entries build via build_brew. With a recipe_datapoint the recipe is fetched live from the machine’s republished profile-scoped property (0xA6) and the brew fails closed if it is unavailable; entries without one use their stored recipe hex (models with no recipe catalogue), and a recipe-less stop frame uses the default recipe.

  • Entries holding only a raw command hex are sent verbatim.

Built frames go through the session gate.

Parameters:

drink_name – The name of the command to execute, as defined in the command_map.

Returns:

The response from the transport.

Raises:
  • ValueError – If the command name is not found in the device map.

  • ConnectionError – If no recipe is available for a brew entry.

dsn: str | None = None
extra: dict[str, Any]
favorite_beverages(profile_slot: int | None = None) → list[int] | None[source]

The profile’s favourite drinks in favourite order, or None.

Read from the cloud snapshot (dNNN_favorite_priority_<p>, family 0xAC) together with the catalogue seed — no machine request. None means unknown (no such datapoint, or no snapshot yet); an empty list means the profile has no favourites.

firmware: str | None = None
firmware_info() → dict[str, str][source]

Firmware versions — machine datapoint plus cloud module data.

machine: the machine’s own firmware (software_version datapoint, e.g. Striker_cb_demo 1.1.0 Oct 18 2022); wifi_module and wifi_module_updated_at: the Wi-Fi module’s firmware and when the cloud last updated it (cloud transport only). Keys whose value is unknown are left out.

On LAN the datapoint lands in the server’s property store only after the machine republishes it, so a miss triggers one request_property round-trip — verified: the Soul answers a software_version GET with the same string the cloud mirrors (protocol.md §14.7, captures/lan_software_version.json). Cloud transports cannot request properties and read the store only.

classmethod from_map(transport: DeviceTransport, device_map_path: str | None = None, *, event_logger: Logger | None = None, **kwargs) → Device[source]

Factory method to create a Device instance with a loaded device map.

If device_map_path is not provided, it attempts to find one using the device’s model.

Parameters:
  • transport – The communication transport to use.

  • device_map_path – Optional path to the device map JSON file.

  • **kwargs – Additional attributes to set on the Device instance.

Returns:

A configured Device instance.

get_commands() → list[str][source]

Returns a list of all available command names from the device map.

get_monitor() → MonitorView[source]

Retrieves and parses monitoring data into a structured, human-readable view.

Returns:

A MonitorView instance containing parsed status information.

get_monitor_frame() → MonitorFrame | None[source]

Decodes the raw monitor data into a MonitorFrame for low-level analysis.

Returns:

A MonitorFrame if decoding is successful, otherwise None.

get_monitor_snapshot() → MonitorSnapshot[source]

Retrieves the latest raw monitoring data from the transport.

get_profiles() → list[ProfileSlot][source]

Read the occupied profile slots (a4f0 blobs, profile-scoped).

The blobs are republished as dNNN_profiles_* (Soul) or dNNN_profile_name* (striker/ECAM452 over the cloud, which has no response mailbox for the 0xA4 fallback).

get_properties() → Any[source]

Fetches all available properties from the device.

get_property(name: str) → Any[source]

Fetches a single property by its alias or technical name.

Parameters:

name – The alias or name of the property to fetch.

Returns:

The value of the requested property.

get_property_aliases() → list[str][source]

Returns a list of all available property aliases from the device map.

get_setting_bits(*, refresh: bool = True) → dict[str, bool | None][source]

Read boolean bit settings as {key: on/off} (param 0x003F).

Same read strategy as get_settings(): republished dNNN 95-blobs first, 0x95 mailbox read for params without one. Capability-gated settings the map marks unsupported are omitted; unreadable params yield None — never a fabricated False.

refresh=False harvests only what is already in the property store — no request_property GETs and no 0x95 fallback. Used by the HA coordinator’s tracking poll: get_settings refreshes the store first, then this reads param 0x003F off it without queuing a second GET round (protocol.md §14.11 — republished dNNN is the WiFi read channel).

get_settings(*, hints: Collection[str] | None = None, keys: Collection[str] | None = None) → dict[str, int | None][source]

Read writable settings as {key: raw_option_index}.

Republished dNNN 95-blobs are read first; settings without a stored blob fall back to a 0x95 mailbox read. Capability- gated settings the map marks unsupported are omitted.

hints narrows the re-requested datapoints to names containing one of the hint substrings (datapoint_hint semantics) — the HA coordinator passes the entity-backed hints so the periodic refresh queues ~3 GETs instead of the full six (observed 2026-10-30: the full lane burst-starved interactive commands on the one-command-per-poll drain). keys narrows the evaluated settings to the given map keys — entities refreshing a single setting pass their own key so sibling keys don’t each sink into a seconds-long 0x95 fallback.

get_statistics() → StatisticsReport[source]

Fetch the machine’s usage statistics.

statistics_source == "native" maps page the 0xA2 table via the response mailbox; "cloud_counters" maps resolve logical counters against the transport’s property snapshot.

health() → Any[source]

Checks the health of the device connection.

ip: str | None = None
is_online: bool | None = None
lan_key: str | None = None
last_seen: str | None = None
machine_profile: MachineProfile | None = None
model: str | None = None
model_name: str | None = None

Display name from the device map (model_name key) — e.g. “PrimaDonna Soul”. None for maps that do not name the model.

model_ref: dict[str, Any]
monitor_bits: dict[str, list[str]]

exclude (bits the model does not have) and disabled_by_default (bits that may exist but are unverified). Empty = every documented bit applies.

Type:

Per-model monitor-bit policy from the device map

monitor_profile: MonitorProfile
n_profiles: int = 1
nickname: str | None = None
profile_poll_seconds: float = 30.0

Min seconds between param-0x03EE current-profile reads — callers may hook this to a ~1 s monitor cycle, far too chatty for a register that only changes on a profile switch.

property_map: dict[str, Any]
read_catalog(*, settle: float = 0.5) → RecipeCatalogue[source]

Build the recipe catalogue.

Machines that publish recipe datapoints are read per-name and parsed; maps without catalog_datapoints (striker models) get the model-table declaration instead.

recipe_beverage_order: list[int]
recipe_params(beverage_id: int, *, profile_slot: int | None = None, catalog: RecipeCatalogue | None = None) → RecipeParams[source]

Effective parameters + bounds for (profile, beverage).

Costs at most two machine reads and no catalogue sweep (protocol.md §13/§14.12, research.md R11): the recipe’s 0xB0 bounds (one GET, cached for the process) and the profile’s live 0xA6/bs_recipe values. A full catalog (from read_catalog()) may be supplied; its a6f0 profile records then serve as the values source. BeanAdapt beverages always live-read bs_recipe — the 6 bean slots share bev id 0xC8. Falls back to 0xB0 defaults (or the command-map stored recipe) with source="default" — never raises on a failed machine read. ValueError only for a beverage neither the model table nor the command map knows.

recipe_priority_loaded(profile_slot: int | None = None) → bool[source]

Whether the profile’s drink-menu order has been read already.

refresh_current_profile(*, force: bool = False) → int | None[source]

Refresh current_profile — striker reads 0x03EE, non-striker keeps the last-asserted profile.

On striker the register is read back whenever it is stale. On non-striker the app never asks the machine for the profile — 0xA9 is told-never-asked and 0x03EE does not follow panel/app selects, so the read only seeds the initial state (when current_profile is still 0/unknown) and can never overwrite a selection this process asserted or confirmed. Throttled to profile_poll_seconds; the read runs under the session gate (§14.8).

refresh_monitor() → Any[source]

Requests a refresh of the device’s monitoring data.

resolve_property(alias: str, default: str | None = None) → str[source]

Translates a property alias to its technical name using the property_map.

Parameters:
  • alias – The property alias to resolve.

  • default – A default value to return if the alias is not found.

Returns:

The resolved technical name, or the alias/default if not found.

response_poll: float = 0.25
response_timeout: float = 8.0
scheme: str | None = None
seed_catalog_from_properties(properties: Mapping[str, Any]) → int[source]

Fill the descriptor + menu-order caches from a bulk snapshot.

properties is {datapoint name: base64 value} — the cloud properties.json fetch (the app’s one-shot store sync, research.md R11). Only this map’s catalog_datapoints are considered and only the slow-changing families are taken: 0xB0 factory descriptors and 0xA8 menu orders. Per-profile 0xA6 recipe values are deliberately NOT seeded — the cloud copy can be stale (protocol.md §13) and a stale value would brew the wrong amount; those stay a live read. Returns the number of descriptors seeded (0 → the caller keeps the lazy LAN path).

select_bean_system(slot: int) → bool[source]

Switch the BeanAdapt bean system (session-gated 0xB9).

0xB9 is on protocol.md §13’s untested write list — it goes through the same gated path as the verified 0xA9 profile select: device_connected announce (_send_gated) → 0D 06 B9 F0 <slot> → optional <ok> ack (h.m(ok=(b5==0)), DECODED dispatcher). Like 0xA9 on non-striker the app has no read-back for the select — a nack-free send counts as applied; an explicit nack returns False.

select_profile(index: int) → bool[source]

Switch the active profile (session-gated 0xA9).

Wakes a standby machine first. On striker a matching positive ack is required (the a9 ack path updates EcamMachine.B). On non-striker the app treats 0xA9 as fire-and-retry — its connect storm sends it ~11× and the 2026-10-14 cloud capture shows zero acks, while the machine still applies the selection (DECODED.md “Current profile — never fetched on non-striker”). There is no machine-side read-back on Soul: after a nack-free send the asserted index becomes the truth, matching the app’s UserData.USER_PROFILE_SELECTED model.

selected_bean_slot() → int | None[source]

The machine’s currently selected BeanAdapt slot (1–6).

Bean-name blobs (d25X_beansystem_N, ba f0 family) end with two flag bytes: captured values mark the configured+selected bean 01 01 (byte 49 = configured, byte 50 = selected) vs 00 00 empty slots (research.md R10). Returns the flagged slot, else the first configured one, else None.

property selected_profile: int | None

The last acknowledged 0xA9 profile index, if any.

send_command(command: str) → Any[source]

Encodes and sends a raw hex command to the device via the transport.

Parameters:

command – The hex command string to send.

Returns:

The response from the transport.

send_frame(frame: bytes) → Any[source]

Encode a protocol frame (timestamp + optional app-id trailer) and send it via the transport’s command channel.

serial: str | None = None
session_refresh() → Any[source]

Refresh the write-gate session.

Non-striker machines re-announce device_connected; striker machines send the 84 0f 03 02 refresh frame.

set_setting(key: str, option_index: int) → bool[source]

Write a writable setting (session-gated 0x90 + ack/read-back).

Follows protocol.md §14.5: device_connected announce (via _send_gated()) → 0x90. §14.5 woke the machine for its test; by product decision this library never wakes it — configuration writes are attempted in standby as well: the machine processes data_request while in_standby (§14.8 — 0xA2 reads were answered there) and the official app exposes config changes in standby (only profile selection is gated). §14.5 confirmed the commits on the machine’s display and recorded no ack for them, so the ack is treated as optional: the write counts as committed when a read-back — mailbox answer or the republished dNNN backing property — shows the new value. An unconfirmed write is retried once with a fresh session announce — the machine rate-limits and drops frames under load (observed 2026-10-14).

Returns True when the write is confirmed and False when the machine nacked it or reports a different value. Raises ValueError for unknown keys/options and TimeoutError when neither an ack nor a read-back arrives.

set_setting_bit(key: str, on: bool) → bool[source]

Flip a boolean flag inside a shared param word (0x90 write).

Reads the param’s current u32 first — the flag is merged so unrelated bits survive (the app’s f0 write does exactly this; protocol.md §14.8). Standby does not block configuration writes: the machine processes data_request while in_standby and the app exposes these toggles there. An unreadable base value aborts with TimeoutError — a blind write could clobber other settings. Returns True on confirmed state, False when the machine reports a different value.

setting_levels: dict[str, int]

How many levels of a writable setting the model offers (map key setting_levels, e.g. {"temperature": 3}); unlisted settings offer their default_levels (or every option).

setting_options(key: str) → dict[int, str][source]

The options of a writable setting this model offers (index -> label).

The map’s setting_levels caps how many levels count, like the app, which offers as many coffee temperatures as the machine reports in param 194 (three on the Eletta Explore, four on the Soul).

settings_datapoints: list[str]
standby() → Any[source]

Send the machine to standby (84 0f 01 01).

statistics_datapoints: list[str]
statistics_source: str = 'native'
stop_brew() → Any[source]

Stop the running brew (the verified 83 f0 .. 02 frame).

transport: DeviceTransport
wake() → Any[source]

Wake the machine (84 0f 02 01).

write_confirm_seconds: float = 45.0

Post-write confirmation window — longer than response_timeout because the machine can commit 0x90 writes sluggishly under load (the app’s own re-read waits ~2 s; we budget generously and poll the republished property meanwhile). Over the cloud the republished value of a committed write took up to ~21 s to show (ECAM452), so a shorter window reported accepted writes as failed and resent them. A confirmed write still returns as soon as seen.

class cremalink.EmbeddedLocalServer(dsn: str, device_ip: str, lan_key: str, device_map_path: str | None = None, *, advertised_ip: str | None = None, monitor_poll_interval: float = 5.0, nudger_poll_interval: float = 1.0, cloud_token_path: str | None = None, event_logger: Logger | None = None, preferred_port: int = 10280, port_fallback_range: int = 50, bind_host: str = '0.0.0.0')[source]

Bases: object

In-process host for a single device’s cremalink local LAN server.

See specs/002-embedded-local-server/contracts/embedded-server-api.md for the full behavioral contract.

advertised_ip: str | None

Resolved once start() runs; a supplied value is used as-is.

property event_logger: Logger

Return this instance’s isolated library event logger.

get_recent_events() → list[dict][source]

Return a snapshot of this server’s sanitized event buffer.

log(event: str, details: dict | None = None, *, level: int = 20) → None[source]

Route an integration-owned event through this server’s log path.

log_telemetry(event: str, details: dict, *, level: int = 20) → None[source]

Forward telemetry through the HA logger without buffering it.

set_machine_asleep(asleep: bool) → None[source]

Tell the server jobs the machine’s sleep state.

The consumer (HA coordinator) knows the monitor status; in standby the monitor/nudger jobs drop to their standby cadence so a sleeping machine is not polled every few seconds.

async start() → None[source]

Resolve advertised IP + a free port, then start serving.

Raises:
  • RuntimeError – if already starting/running.

  • OSError – if no port in the fallback range could be bound.

async stop() → None[source]

Stop serving and release the listening socket (FR-005).

Safe to call multiple times.

class cremalink.LocalServer(settings: ServerSettings)[source]

Bases: object

A wrapper class that encapsulates the aiohttp application runner.

start() → None[source]

Starts the aiohttp server to serve the application (blocking).

class cremalink.ServerSettings(_case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_prefix_target: EnvPrefixTarget | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_file_depth: int | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_nested_max_split: int | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_show_env_vars: bool | None = None, _cli_exit_on_error: bool | None = None, _cli_prefix: str | None = None, _cli_flag_prefix_char: str | None = None, _cli_implicit_flags: bool | Literal['dual', 'toggle'] | None = None, _cli_ignore_unknown_args: bool | None = None, _cli_kebab_case: bool | Literal['all', 'no_enums'] | None = None, _cli_shortcuts: Mapping[str, str | list[str]] | None = None, _secrets_dir: PathType | None = None, _build_sources: tuple[tuple[PydanticBaseSettingsSource, ...], dict[str, Any]] | None = None, *, SERVER_SETTINGS_PATH: str = '', SERVER_IP: str = '127.0.0.1', SERVER_PORT: int = 10280, ADVERTISED_IP: str | None = None, NUDGER_POLL_INTERVAL: Annotated[float, Gt(gt=0)] = 1.0, MONITOR_POLL_INTERVAL: Annotated[float, Gt(gt=0)] = 5.0, MONITOR_POLL_INTERVAL_STANDBY: Annotated[float, Gt(gt=0)] = 30.0, NUDGER_POLL_INTERVAL_STANDBY: Annotated[float, Gt(gt=0)] = 30.0, NUDGER_RENUDGE_SECONDS: Annotated[float, Gt(gt=0)] = 10.0, COMMANDS_POLL_ACTIVE_SECONDS: Annotated[float, Gt(gt=0)] = 4.0, SESSION_KEEPALIVE_INTERVAL_SECONDS: float = 20.0, SESSION_PROBE_TIMEOUT_SECONDS: float = 4.0, SESSION_SILENCE_RESET_SECONDS: float = 900.0, SESSION_REGISTER_TIMEOUT_SECONDS: float = 5.0, CLOUD_TOKEN_PATH: str | None = None, CLOUD_WAKE_THRESHOLD: Annotated[int, Ge(ge=1)] = 3, CLOUD_WAKE_INTERVAL_SECONDS: Annotated[float, Gt(gt=0)] = 60.0, QUEUE_MAX_SIZE: int = 200, LOG_RING_SIZE: int = 200, DEVICE_REGISTER_VERIFY: bool = False, DEVICE_REGISTER_CA_PATH: str | None = None, DEVICE_REGISTER_TIMEOUT: float = 10.0, ENABLE_DEVICE_REGISTER: bool = True, ENABLE_NUDGER_JOB: bool = True, ENABLE_MONITOR_JOB: bool = True, ENABLE_SESSION_JOB: bool = True, FIXED_RANDOM_2: str | None = None, FIXED_TIME_2: str | None = None)[source]

Bases: BaseSettings

Defines the application’s settings, which can be loaded from environment variables or a .env file. This provides a centralized and type-safe way to configure the server’s behavior.

advertised_ip: str | None
cloud_token_path: str | None
cloud_wake_interval_seconds: float
cloud_wake_threshold: int
commands_poll_active_seconds: float
device_register_ca_path: str | None
device_register_timeout: float
device_register_verify: bool
enable_device_register: bool
enable_monitor_job: bool
enable_nudger_job: bool
enable_session_job: bool
fixed_random_2: str | None
fixed_time_2: str | None
log_ring_size: int
model_config = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_kebab_case': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_shortcuts': None, 'cli_show_env_vars': False, 'cli_use_class_docs_for_groups': False, 'enable_decoding': True, 'env_file': '.env', 'env_file_depth': 0, 'env_file_encoding': 'utf-8', 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_nested_max_split': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': '', 'env_prefix_target': 'variable', 'extra': 'ignore', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'populate_by_name': True, 'protected_namespaces': ('model_validate', 'model_dump', 'settings_cached', 'settings_clear_cache', 'settings_customise_sources'), 'secrets_case_sensitive': None, 'secrets_dir': None, 'secrets_dir_max_size': None, 'secrets_dir_missing': None, 'secrets_nested_delimiter': None, 'secrets_nested_subdir': None, 'secrets_prefix': None, 'toml_file': None, 'validate_default': True, 'yaml_config_section': None, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

monitor_poll_interval: float
monitor_poll_interval_standby: float
nudger_poll_interval: float
nudger_poll_interval_standby: float
nudger_renudge_seconds: float
queue_max_size: int
server_ip: str
server_port: int
server_settings_path: str
session_keepalive_interval_seconds: float
session_probe_timeout_seconds: float
session_register_timeout_seconds: float
session_silence_reset_seconds: float
cremalink.authenticate_cloud(email: str, password: str, language: str = 'en') → CloudToken[source]

Performs the multi-step authentication flow to obtain a refresh token for the Ayla IoT cloud platform.

This function executes the following steps: 1. Authorize: Initiates the authorization process to obtain a context parameter. 2. Get IDs: Retrieves necessary IDs (ucid, gmid, gmid_ticket) for the login process. 3. Login: Authenticates the user with their email and password, along with risk context information, to obtain a login token. 4. Get User Info: Fetches user information using the login token to obtain UID, UIDSignature, and signatureTimestamp. 5. Consent: Simulates the user consent process to obtain a signature for the authorization continue step. 6. Authorization Continue: Continues the authorization process using the context, login token, and consent signature to obtain an authorization code. 7. IDP Token: Exchanges the authorization code for an IDP token. 8. Exchange for Ayla: Uses the IDP token to sign in to the Ayla cloud and obtain a refresh token.

Parameters:
  • email (str) – The user’s email address for authentication.

  • password (str) – The user’s password for authentication.

  • language (str) – The preferred language for the authentication process (default is “en”).

Returns:

An instance of CloudToken containing the obtained refresh token.

Return type:

CloudToken

cremalink.create_app(settings: ServerSettings | None = None, device_adapter: DeviceAdapter | None = None, logger=None) → Application[source]

Application factory for the aiohttp server.

Initializes all components (state, settings, adapter, jobs) and wires up the API routes and startup/cleanup handlers.

Returns:

A configured aiohttp Application instance.

cremalink.create_cloud_device(dsn: str, access_token: str, device_map_path: str | None = None, event_logger: Logger | None = None, token_refresher: Callable[[], str] | None = None) → Device[source]

Creates a Device instance configured for cloud-based communication.

This factory sets up a CloudTransport, which communicates with the device via the manufacturer’s cloud services, requiring an access token.

Parameters:
  • dsn – The Device Serial Number.

  • access_token – The authentication token for the cloud service.

  • device_map_path – Optional path to a device-specific command map file.

Returns:

A Device instance configured with a CloudTransport.

cremalink.create_local_device(dsn: str, lan_key: str, device_ip: str | None, server_host: str, server_port: int = 10280, device_scheme: str = 'http', auto_configure: bool = True, device_map_path: str | None = None, event_logger: Logger | None = None) → Device[source]

Creates a Device instance configured for local network communication.

This factory sets up a LocalTransport which requires details about the local network environment, including the device’s IP and the local server’s address.

Parameters:
  • dsn – The Device Serial Number.

  • lan_key – The key for authenticating on the local network.

  • device_ip – The IP address of the coffee machine.

  • server_host – The hostname or IP address of the local proxy server.

  • server_port – The port of the local proxy server.

  • device_scheme – The communication protocol to use with the device (e.g., ‘http’).

  • auto_configure – If True, the transport will be configured automatically.

  • device_map_path – Optional path to a device-specific command map file.

Returns:

A Device instance configured with a LocalTransport.

cremalink.detect_model_id(raw_serial: str | None, cloud_metadata: dict[str, Any] | None, oem_model: str | None) → str | None[source]

Resolve a discovered device to an existing cremalink device-map id.

Parameters:
  • raw_serial – The device’s raw serial number string, if known.

  • cloud_metadata – Additional cloud-reported fields (e.g. product_name, model), if any.

  • oem_model – The Ayla oem_model/model identifier, if known.

Returns:

A valid cremalink device-map id, or None if no detection tier yielded a recognized model. Never returns a guessed or default id.

cremalink.device_map(model_id: str) → str[source]

Finds the absolute path to a device map file for a given model ID.

This function handles packaged resources, extracting them to a temporary directory if they are not directly accessible on the filesystem.

Parameters:

model_id – The model ID of the device.

Returns:

The absolute path to the device map JSON file as a string.

Raises:

DeviceMapNotFoundError – If the map for the given model ID doesn’t exist.

cremalink.log_event(logger: Logger, event: str, details: dict | None = None, *, diagnostic_sensitive_values: tuple[str | None, ...] = (), operational_sensitive_values: tuple[str | None, ...] = (), level: int = 20, telemetry: bool = False) → None[source]

Emit one record with separate operational and diagnostic details.

Subpackages

  • cremalink.clients package
    • Client
      • Client.create_datapoint()
      • Client.fetch_properties()
      • Client.get_device()
      • Client.get_devices()
      • Client.get_lan_config()
      • Client.get_serial_number()
      • Client.list_account_devices()
      • Client.refresh_access_token()
    • Submodules
      • cremalink.clients.auth module
        • CloudToken
        • authenticate_cloud()
      • cremalink.clients.cloud module
        • Client
        • is_coffee_device()
  • cremalink.core package
    • Submodules
      • cremalink.core.binary module
        • b64_to_cmd_hex()
        • crc16_ccitt()
        • get_bit()
        • hex_to_signed_decimal()
        • safe_byte_at()
        • signed_decimal_to_hex()
  • cremalink.crypto package
    • aes_decrypt()
    • aes_encrypt()
    • extract_bits()
    • hmac_for_key_and_data()
    • pad_zero()
    • rotate_iv_from_ciphertext()
    • unpad_zero()
  • cremalink.devices package
    • DeviceMapNotFoundError
    • device_map()
    • get_device_maps()
    • load_device_map()
  • cremalink.domain package
    • Device
      • Device.transport
      • Device.dsn
      • Device.model
      • Device.nickname
      • Device.ip
      • Device.lan_key
      • Device.scheme
      • Device.is_online
      • Device.last_seen
      • Device.firmware
      • Device.serial
      • Device.coffee_count
      • Device.command_map
      • Device.property_map
      • Device.monitor_profile
      • Device.extra
      • Device.PARAM_CURRENT_PROFILE
      • Device.app_id_confirm_own_seconds
      • Device.app_id_confirm_poll
      • Device.app_id_confirm_seconds
      • Device.app_id_refresh_min_seconds
      • Device.app_id_refresh_seconds
      • Device.bean_systems()
      • Device.beverage_catalog()
      • Device.brew()
      • Device.brew_entry()
      • Device.capabilities
      • Device.catalog_datapoints
      • Device.coffee_count
      • Device.command_map
      • Device.configure()
      • Device.current_profile
      • Device.custom_recipe_names()
      • Device.declared_catalog()
      • Device.do()
      • Device.dsn
      • Device.extra
      • Device.favorite_beverages()
      • Device.firmware
      • Device.firmware_info()
      • Device.from_map()
      • Device.get_commands()
      • Device.get_monitor()
      • Device.get_monitor_frame()
      • Device.get_monitor_snapshot()
      • Device.get_profiles()
      • Device.get_properties()
      • Device.get_property()
      • Device.get_property_aliases()
      • Device.get_setting_bits()
      • Device.get_settings()
      • Device.get_statistics()
      • Device.health()
      • Device.ip
      • Device.is_online
      • Device.lan_key
      • Device.last_seen
      • Device.machine_profile
      • Device.model
      • Device.model_name
      • Device.model_ref
      • Device.monitor_bits
      • Device.monitor_profile
      • Device.n_profiles
      • Device.nickname
      • Device.profile_poll_seconds
      • Device.property_map
      • Device.read_catalog()
      • Device.recipe_beverage_order
      • Device.recipe_params()
      • Device.recipe_priority_loaded()
      • Device.refresh_current_profile()
      • Device.refresh_monitor()
      • Device.resolve_property()
      • Device.response_poll
      • Device.response_timeout
      • Device.scheme
      • Device.seed_catalog_from_properties()
      • Device.select_bean_system()
      • Device.select_profile()
      • Device.selected_bean_slot()
      • Device.selected_profile
      • Device.send_command()
      • Device.send_frame()
      • Device.serial
      • Device.session_refresh()
      • Device.set_setting()
      • Device.set_setting_bit()
      • Device.setting_levels
      • Device.setting_options()
      • Device.settings_datapoints
      • Device.standby()
      • Device.statistics_datapoints
      • Device.statistics_source
      • Device.stop_brew()
      • Device.transport
      • Device.wake()
      • Device.write_confirm_seconds
    • create_cloud_device()
    • create_local_device()
    • detect_model_id()
    • Submodules
      • cremalink.domain.device module
        • BeanSystem
        • Device
        • MachineStandbyError
        • RecipeParams
      • cremalink.domain.factory module
        • create_cloud_device()
        • create_local_device()
      • cremalink.domain.model_detection module
        • detect_model_id()
  • cremalink.ecam package
    • Beverage
      • Beverage.bev_id
      • Beverage.declared
      • Beverage.defined
      • Beverage.in_priority_list
      • Beverage.ingredients
      • Beverage.kind
      • Beverage.name
      • Beverage.off_default
      • Beverage.priority_position
      • Beverage.profiles
      • Beverage.profiles_differ
      • Beverage.ranges
      • Beverage.source_properties
      • Beverage.use_for_custom
    • BrewAction
      • BrewAction.START
      • BrewAction.STOP
    • MachineProfile
      • MachineProfile.command_property
      • MachineProfile.grinder_scale
      • MachineProfile.key
      • MachineProfile.monitor_request_ids
      • MachineProfile.profile_entry_size
      • MachineProfile.session
      • MachineProfile.trailer
    • PowerCommand
      • PowerCommand.SESSION_REFRESH
      • PowerCommand.STANDBY
      • PowerCommand.WAKE
    • ProfileSlot
      • ProfileSlot.icon
      • ProfileSlot.index
      • ProfileSlot.mug
      • ProfileSlot.name
    • RecipeCatalogue
      • RecipeCatalogue.beverages
      • RecipeCatalogue.favorite_lists
      • RecipeCatalogue.fingerprint
      • RecipeCatalogue.names
      • RecipeCatalogue.priority_lists
      • RecipeCatalogue.source
      • RecipeCatalogue.stats
    • SessionGate
      • SessionGate.announced_at
      • SessionGate.ensure_fresh()
      • SessionGate.invalidate()
      • SessionGate.is_fresh()
      • SessionGate.uses_timestamp_announce
    • StatisticEntry
      • StatisticEntry.a2_id
      • StatisticEntry.label
      • StatisticEntry.raw
      • StatisticEntry.unit
      • StatisticEntry.value
    • StatisticsReport
      • StatisticsReport.breakdowns
      • StatisticsReport.cloud_counters
      • StatisticsReport.complete
      • StatisticsReport.data_updated_at
      • StatisticsReport.entries
      • StatisticsReport.fetched_at
      • StatisticsReport.source
    • WritableSetting
      • WritableSetting.capability
      • WritableSetting.datapoint_hint
      • WritableSetting.default_levels
      • WritableSetting.key
      • WritableSetting.options
      • WritableSetting.param_id
    • answer_flag()
    • answer_id()
    • blob_family()
    • brew_param_included()
    • build_bean_system()
    • build_brew()
    • build_catalog()
    • build_factory_descriptor()
    • build_monitor_request()
    • build_power()
    • build_priority_list()
    • build_profile_names()
    • build_profile_select()
    • build_read()
    • build_read_block()
    • build_read_param()
    • build_read_params()
    • build_recipe_names()
    • build_recipe_values()
    • build_statistics_page()
    • build_striker_handshake()
    • build_write_param()
    • catalog_beverage_ids()
    • counter_breakdown()
    • decode_a2_page()
    • decode_blob()
    • encode_for_transport()
    • fingerprint()
    • interpret()
    • is_sync_timeout()
    • parse_a9_ack()
    • parse_counter_value()
    • parse_profile_names()
    • parse_settings()
    • parse_simple_ack()
    • parse_tlv()
    • parse_triples()
    • parse_water_volume_liters()
    • parse_write_ack()
    • profile_from_map()
    • resolve_cloud_breakdowns()
    • resolve_cloud_counters()
    • trim_frame()
    • verify_frame()
    • Submodules
      • cremalink.ecam.answers module
        • answer_flag()
        • answer_id()
        • decode_a2_page()
        • is_sync_timeout()
        • parse_a9_ack()
        • parse_simple_ack()
        • parse_write_ack()
      • cremalink.ecam.builder module
        • BREW_DROP_TAGS
        • BrewAction
        • DEFAULT_RECIPE
        • PowerCommand
        • REQUEST_NAMES
        • brew_param_included()
        • build_bean_select()
        • build_bean_system()
        • build_brew()
        • build_brew_params()
        • build_factory_descriptor()
        • build_handshake_blob()
        • build_monitor_request()
        • build_power()
        • build_priority_list()
        • build_profile_names()
        • build_profile_select()
        • build_read()
        • build_read_block()
        • build_read_param()
        • build_read_params()
        • build_recipe_names()
        • build_recipe_values()
        • build_statistics_page()
        • build_striker_handshake()
        • build_write_param()
        • describe_request_frame()
        • encode_for_transport()
        • merge_recipe_params()
        • trim_frame()
        • verify_frame()
      • cremalink.ecam.catalog module
        • Beverage
        • CUSTOM_SLOT_IDS
        • RecipeCatalogue
        • TEXT_BLOB_FAMILIES
        • WIDE_TAGS
        • blob_family()
        • build_catalog()
        • build_declared_catalog()
        • catalog_beverage_ids()
        • decode_blob()
        • decode_custom_names()
        • decode_text()
        • diff_declared()
        • fingerprint()
        • iter_blobs()
        • load_model_declaration()
        • parse_tlv()
        • parse_triples()
      • cremalink.ecam.machine_profiles module
        • MachineProfile
        • profile_from_map()
      • cremalink.ecam.monitor_bits module
        • ALARM_BITS
        • BitDef
        • SWITCH_BITS
        • decode_bits()
      • cremalink.ecam.params module
        • BEAN_SYSTEM_ID_MIN
        • MANAGEMENT_PARAMS
        • PARAMS
        • ParamMeta
        • TAG_COFFEE
        • TAG_MILK
        • TAG_TASTE
        • TAG_WATER
        • adjustable_params()
        • is_bean_beverage()
        • to_display()
        • to_raw()
      • cremalink.ecam.profiles module
        • ProfileSlot
        • parse_profile_names()
      • cremalink.ecam.session module
        • DEFAULT_REFRESH_SECONDS
        • SessionGate
      • cremalink.ecam.settings module
        • BitSetting
        • SETTING_BIT_MAPS
        • SETTING_OPTION_MAPS
        • WritableSetting
        • merge_setting_bit()
        • parse_settings()
        • settings_bits()
      • cremalink.ecam.statistics module
        • CLOUD_COUNTER_CANDIDATES
        • CLOUD_COUNTER_PERCENTAGES
        • CLOUD_COUNTER_USED_UP
        • STAT_LABELS
        • StatisticEntry
        • StatisticsReport
        • candidate_datapoint()
        • counter_breakdown()
        • decode_a2_page()
        • interpret()
        • parse_counter_value()
        • parse_water_volume_liters()
        • resolve_cloud_counters()
  • cremalink.local_server_app package
    • EmbeddedLocalServer
      • EmbeddedLocalServer.advertised_ip
      • EmbeddedLocalServer.bound_port
      • EmbeddedLocalServer.event_logger
      • EmbeddedLocalServer.get_recent_events()
      • EmbeddedLocalServer.log()
      • EmbeddedLocalServer.log_telemetry()
      • EmbeddedLocalServer.set_machine_asleep()
      • EmbeddedLocalServer.start()
      • EmbeddedLocalServer.state
      • EmbeddedLocalServer.stop()
    • ServerSettings
      • ServerSettings.advertised_ip
      • ServerSettings.cloud_token_path
      • ServerSettings.cloud_wake_interval_seconds
      • ServerSettings.cloud_wake_threshold
      • ServerSettings.commands_poll_active_seconds
      • ServerSettings.device_register_ca_path
      • ServerSettings.device_register_timeout
      • ServerSettings.device_register_verify
      • ServerSettings.enable_device_register
      • ServerSettings.enable_monitor_job
      • ServerSettings.enable_nudger_job
      • ServerSettings.enable_session_job
      • ServerSettings.fixed_random_2
      • ServerSettings.fixed_time_2
      • ServerSettings.log_ring_size
      • ServerSettings.model_config
      • ServerSettings.monitor_poll_interval
      • ServerSettings.monitor_poll_interval_standby
      • ServerSettings.nudger_poll_interval
      • ServerSettings.nudger_poll_interval_standby
      • ServerSettings.nudger_renudge_seconds
      • ServerSettings.queue_max_size
      • ServerSettings.server_ip
      • ServerSettings.server_port
      • ServerSettings.server_settings_path
      • ServerSettings.session_keepalive_interval_seconds
      • ServerSettings.session_probe_timeout_seconds
      • ServerSettings.session_register_timeout_seconds
      • ServerSettings.session_silence_reset_seconds
    • create_app()
    • Submodules
      • cremalink.local_server_app.api module
        • LOCAL_STATE_KEY
        • create_app()
      • cremalink.local_server_app.config module
        • ServerSettings
        • get_settings()
      • cremalink.local_server_app.device_adapter module
        • DeviceAdapter
      • cremalink.local_server_app.embedded module
        • DEFAULT_PORT
        • DEFAULT_PORT_FALLBACK_RANGE
        • DEFAULT_SESSION_KEEPALIVE_SECONDS
        • EmbeddedLocalServer
        • SITE_SHUTDOWN_TIMEOUT
        • detect_advertised_ip()
      • cremalink.local_server_app.jobs module
        • JobManager
        • monitor_job()
        • nudger_job()
        • session_job()
      • cremalink.local_server_app.logging module
        • OperationalConsoleHandler
        • RingBufferHandler
        • create_logger()
        • log_event()
        • redact()
        • redact_operational()
        • redact_telemetry_operational()
      • cremalink.local_server_app.models module
        • CommandPollResponse
        • CommandRequest
        • ConfigureRequest
        • EncPayload
        • KeyExchange
        • KeyExchangeRequest
        • MonitorResponse
        • PropertiesResponse
        • PropertyGetRequest
        • PropertySetRequest
      • cremalink.local_server_app.protocol module
        • build_empty_payload()
        • decrypt_payload()
        • derive_keys()
        • encrypt_payload()
        • pad_seq()
        • sign_payload()
      • cremalink.local_server_app.state module
        • LocalServerState
  • cremalink.parsing package
    • Subpackages
      • cremalink.parsing.monitor package
        • MonitorFrame
        • MonitorProfile
        • MonitorSnapshot
        • MonitorView
        • build_monitor_snapshot()
        • decode_monitor_b64()
        • Submodules
      • cremalink.parsing.properties package
        • PropertiesSnapshot
        • Submodules
  • cremalink.resources package
    • load_api_config()
    • Submodules
      • cremalink.resources.api_config module
        • load_api_config()
      • cremalink.resources.lang module
        • load_lang_config()
  • cremalink.transports package
    • Subpackages
      • cremalink.transports.cloud package
        • CloudTransport
        • Submodules
      • cremalink.transports.local package
        • LocalTransport
        • Submodules
    • Submodules
      • cremalink.transports.base module
        • DeviceTransport

Submodules

  • cremalink.local_server module
    • LocalServer
      • LocalServer.start()
    • main()
Previous Next

© Copyright 2026, Lodzen.

Built with Sphinx using a theme provided by Read the Docs.