HomeconnectLocal::Client
Inherits HomeconnectLocal::Transport < Reference < Object
Minimal client:
- connect ws://host:80/homeconnect (AES framing) OR wss://host:443/homeconnect (TLS-PSK)
- perform handshake sequence
- provide send_sync waiting for responses
Constructors
new(host : String, psk64 : String, iv64 : String | Nil = nil, mode : TransportMode = TransportMode::AES, psk_identity : String = "homeconnect", tls_cipher : String = "PSK", app_name : String = "Crystal", app_id : String = Random::Secure.hex(4), keepalive_enabled : Bool = true, keepalive_idle_timeout : Time::Span = 60.seconds, keepalive_probe_interval : Time::Span = 10.seconds, keepalive_status_uid : Int32 | Nil = nil)
SourceInstance methods
close
Sourceconnect(timeout : Time::Span = 60.seconds)
Sourceconnected?
Sourcedebug_frames=(debug_frames : Bool)
Sourcedebug_frames?
Sourcehost
Sourcekeepalive_enabled=(keepalive_enabled : Bool)
Sourcekeepalive_enabled?
Sourcekeepalive_idle_timeout
Sourcekeepalive_idle_timeout=(keepalive_idle_timeout : Time::Span)
Sourcekeepalive_probe_interval
Sourcekeepalive_probe_interval=(keepalive_probe_interval : Time::Span)
Sourcekeepalive_status_from_description=(description : DeviceDescription)
Use the first settings entry from parsed XML for idle keepalive probes. Falls back to status entries if settings are unavailable.
keepalive_status_uid
Sourcekeepalive_status_uid=(keepalive_status_uid : Int32 | Nil)
Sourcemode
Sourcesend(msg : Message)
Sourcesend_sync(msg : Message, timeout : Time::Span = 15.seconds) : Message
Send request and wait for matching RESPONSE.