37 return client_.
state();
61 return client_.
store();
64 return client_.
store();
72 return client_.
logs();
78 return client_.
voice();
81 return client_.
zwave();
96 request_timeout_ = timeout;
102 std::chrono::milliseconds timeout)
const;
111 bool subscribe_on_connect_ =
true;
112 std::chrono::milliseconds request_timeout_{30000};
113 std::chrono::milliseconds connect_pump_timeout_;
Scans for, connects to, and talks GATT to BLE devices through the device's Bluetooth proxy.
Definition bluetooth_proxy.hpp:175
Async client for a single device.
Definition client.hpp:38
ConnectionState state() const
bool is_connected() const
EntityRegistry entities()
Typed, object-oriented view over the entity store: entities().switches(), entities()....
HomeAssistantServices & home_assistant()
const ServerHello & server_hello() const
BluetoothProxy & bluetooth()
EntityStore & store()
The store of discovered entities and their latest states (auto-populated from every inbound message).
Object-oriented façade over the entity store.
Definition entity_registry.hpp:60
Collects a device's entity descriptions and live states.
Definition entity_store.hpp:60
Discovers user-defined services and invokes them.
Definition home_assistant_services.hpp:43
Subscribes to and surfaces the device's log stream.
Definition log_stream.hpp:21
A single serial-proxy instance bound to its index — the instance-aware, ergonomic front end to Serial...
Definition serial_proxy.hpp:129
Proxies a UART on the device, forwarding data and control to clients.
Definition serial_proxy.hpp:68
Synchronous, single-threaded client.
Definition sync_client.hpp:22
LogStream & logs()
Definition sync_client.hpp:71
SerialPort serial_proxy(std::uint32_t instance)
Instance-bound serial-proxy handle: sync.serial_proxy(0).write(...).
void list_entities() const
Request the full entity list and block until ListEntitiesDoneResponse.
VoiceAssistant & voice()
Definition sync_client.hpp:77
SerialPort serial_proxy(const std::string &name)
Serial-proxy handle by advertised name.
SerialProxy & serial()
Definition sync_client.hpp:83
void disconnect() const
Gracefully disconnect, blocking briefly for the close to settle.
EntityStore & store() noexcept
The underlying entity store (raw typed info/state access).
Definition sync_client.hpp:60
HomeAssistantServices & home_assistant()
Definition sync_client.hpp:74
DeviceInfo device_info() const
Request the device's DeviceInfoResponse and return it as a typed struct.
void connect() const
Connect and complete the handshake, blocking until ready.
EntityRegistry entities()
Object-oriented view of the discovered entities: entities().switches(), entities()....
Definition sync_client.hpp:56
const ServerHello & server_hello() const
Definition sync_client.hpp:39
Client & async()
Access the underlying async client (register handlers, send raw, etc.).
Definition sync_client.hpp:105
ConnectionState state() const
Definition sync_client.hpp:36
SyncClient(const ClientOptions &options)
BluetoothProxy & bluetooth()
Definition sync_client.hpp:68
bool is_connected() const
Definition sync_client.hpp:33
void set_request_timeout(const std::chrono::milliseconds timeout)
Default per-request deadline (does not apply to connect, which uses the connection's own handshake ti...
Definition sync_client.hpp:95
ZWaveProxy & zwave()
Definition sync_client.hpp:80
void subscribe_states() const
Subscribe to live state updates.
const EntityStore & store() const noexcept
Definition sync_client.hpp:63
void pump_until(const std::function< bool()> &predicate, std::chrono::milliseconds timeout) const
Pump the loop until predicate is true or timeout elapses.
Drives the device's voice-assistant pipeline: subscribing to start/stop requests, relaying events and...
Definition voice_assistant.hpp:79
Bridges raw Z-Wave frames between a client and the device's Z-Wave radio.
Definition zwave_proxy.hpp:20
Asynchronous orchestrator: owns the event loop and a Connection, and exposes connect/send/subscribe p...
Top-level connection parameters for Client / SyncClient.
Connection: the ESPHome native-API protocol state machine.
Connection state-machine states.
Typed view of the device's DeviceInfoResponse.
std::string name
Definition emit_registry.cpp:14
EntityRegistry: typed, object-oriented access to the entity store.
Typed store of a device's entities: ingest ListEntities*/State messages, query typed info/state per ...
ConnectionState
Lifecycle of a Connection.
Definition connection_state.hpp:11
Everything needed to reach and authenticate with one ESPHome device.
Definition client_options.hpp:16
Ergonomic, copyable snapshot of a device's identity and capabilities, converted from the raw DeviceIn...
Definition device_info.hpp:27
Information returned by the device in its HelloResponse.
Definition connection.hpp:27