Transport¶
transport
¶
Choosing between the LAN and the cloud to deliver commands.
Mirrors the app: when the box's local IP is known, commands go to <ip>:400
and fall back to the cloud if the box cannot be reached or refuses the frame.
Otherwise they go through tmate20/feedthecommands + ack polling.
TransportMode
¶
Channel
¶
SendResult
dataclass
¶
CommandSender
¶
CommandSender(
api: CloudApi,
*,
mode: TransportMode = AUTO,
ack_timeout: float = 15.0,
)
Deliver commands to a Daisy box.
send
async
¶
send(
installation: Installation,
commands: list[WireCommand],
*,
scenario_id: int = 0,
cloud_only: bool = False,
until: tuple[str, ...] = (ACK_PROCESSED, ACK_ACCEPTED),
) -> SendResult
Send device/scenario commands.
cloud_only is used for box-level commands (timers, schedule...), which
the app always sends through the cloud and whose ack it waits for.