cremalink.ecam.machine_profiles module
Machine dialect profiles for the ECAM protocol layer.
Different De’Longhi machine families speak slightly different dialects of the
same Ayla/ECAM protocol. Rather than scattering if model == ... checks
throughout the code, each family’s differences live in one frozen
MachineProfile here, bound explicitly via the machine_profile
field of the device map (FR-006).
- class cremalink.ecam.machine_profiles.MachineProfile(key: str, command_property: str, trailer: str, session: str, monitor_request_ids: frozenset[int], profile_entry_size: int, grinder_scale: float)[source]
Bases:
objectDialect declaration a device binds to via
machine_profile.Fields:
key: stable identifier ("non_striker"/"striker").command_property: property frames are written to (data_requestvsapp_data_request).trailer: transport suffix after the timestamp (NONEtimestamp only,APP_ID4-byte registered app id).session: write-gate mechanism (plain unix timestamp write todevice_connectedvs0xE8handshake +84 0f 03 02registration).monitor_request_ids: request ids that carry monitor frames (the device map’smonitor_profilestays authoritative per data-model.md; this is informational).profile_entry_size: bytes per profile entry in0xA4blobs (21 non-striker / 22 striker incl. mug byte).grinder_scale: multiplier applied to bean-system grinder values on striker (write*2, read/2per APKO0/G0).
- cremalink.ecam.machine_profiles.profile_from_map(map_data: dict[str, Any], *, logger_: Logger | None = None) MachineProfile[source]
Bind the device map’s
machine_profilefield to a preset.A missing field binds
NON_STRIKERwith a logged warning (the verified Soul behaviour). An unrecognized value raisesValueError— failing closed is required because command construction on the wrong dialect produces frames the machine ignores (FR-006).