cremalink.transports.local package
This package contains the transport implementation for communicating with devices over the local network (LAN).
It exposes the LocalTransport class as the main entry point.
- class cremalink.transports.local.LocalTransport(dsn: str, lan_key: str, device_ip: str | None, server_host: str = '127.0.0.1', server_port: int = 10280, device_scheme: str = 'http', auto_configure: bool = False, command_map: dict[str, Any] | None = None, property_map: dict[str, Any] | None = None)[source]
Bases:
DeviceTransportA transport for communicating with a device on the local network.
This transport does not connect to the device directly. Instead, it sends requests to a local proxy server (cremalink.local_server), which then forwards them to the coffee machine. This architecture simplifies direct device communication and authentication.
- configure() None[source]
Configures the local proxy server with the device’s connection details. This must be called before other methods can be used.
- get_properties() PropertiesSnapshot[source]
Retrieves all device properties from the local proxy server.
- refresh_monitor() None[source]
Requests a refresh of the monitoring data via the local proxy server.