esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
esphome::api::DiscoveredDevice Struct Reference

An ESPHome device found on the local network. More...

#include <discovery.hpp>

Collaboration diagram for esphome::api::DiscoveredDevice:
Collaboration graph
[legend]

Public Member Functions

std::string connect_host () const
 Best host to connect to: the resolved IP if known, else the hostname.
 

Public Attributes

std::string name
 Service instance name (the device's friendly/host name).
 
std::string hostname
 SRV target host, e.g. "living-room.local".
 
std::string address
 Resolved IP address (from the A/AAAA record); empty if not provided.
 
std::uint16_t port = 6053
 API TCP port (default 6053).
 
std::string mac
 
std::string version
 
std::string friendly_name
 
std::string platform
 
std::string board
 
std::string network
 
std::string project_name
 
std::string project_version
 
bool requires_encryption = false
 True when the device advertises that Noise encryption is required (TXT api_encryption).
 
bool supports_encryption = false
 
std::map< std::string, std::string > properties
 Every TXT record, as key → value.
 

Detailed Description

An ESPHome device found on the local network.

Member Function Documentation

◆ connect_host()

std::string esphome::api::DiscoveredDevice::connect_host ( ) const
inline

Best host to connect to: the resolved IP if known, else the hostname.

Member Data Documentation

◆ address

std::string esphome::api::DiscoveredDevice::address

Resolved IP address (from the A/AAAA record); empty if not provided.

◆ board

std::string esphome::api::DiscoveredDevice::board

◆ friendly_name

std::string esphome::api::DiscoveredDevice::friendly_name

◆ hostname

std::string esphome::api::DiscoveredDevice::hostname

SRV target host, e.g. "living-room.local".

◆ mac

std::string esphome::api::DiscoveredDevice::mac

◆ name

std::string esphome::api::DiscoveredDevice::name

Service instance name (the device's friendly/host name).

◆ network

std::string esphome::api::DiscoveredDevice::network

◆ platform

std::string esphome::api::DiscoveredDevice::platform

◆ port

std::uint16_t esphome::api::DiscoveredDevice::port = 6053

API TCP port (default 6053).

◆ project_name

std::string esphome::api::DiscoveredDevice::project_name

◆ project_version

std::string esphome::api::DiscoveredDevice::project_version

◆ properties

std::map<std::string, std::string> esphome::api::DiscoveredDevice::properties

Every TXT record, as key → value.

◆ requires_encryption

bool esphome::api::DiscoveredDevice::requires_encryption = false

True when the device advertises that Noise encryption is required (TXT api_encryption).

supports_encryption is true when encryption is at least supported (TXT api_encryption or api_encryption_supported).

◆ supports_encryption

bool esphome::api::DiscoveredDevice::supports_encryption = false

◆ version

std::string esphome::api::DiscoveredDevice::version

The documentation for this struct was generated from the following file: