class

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)
Source

Instance methods

close
Source
connect(timeout : Time::Span = 60.seconds)
Source
connected?
Source
debug_frames=(debug_frames : Bool)
Source
debug_frames?
Source
host
Source
keepalive_enabled=(keepalive_enabled : Bool)
Source
keepalive_enabled?
Source
keepalive_idle_timeout
Source
keepalive_idle_timeout=(keepalive_idle_timeout : Time::Span)
Source
keepalive_probe_interval
Source
keepalive_probe_interval=(keepalive_probe_interval : Time::Span)
Source
keepalive_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.

Source
keepalive_status_uid
Source
keepalive_status_uid=(keepalive_status_uid : Int32 | Nil)
Source
mode
Source
on_notify

callback for push notifications

Source
on_notify=(on_notify : Proc(Message, Nil) | Nil)

callback for push notifications

Source
send(msg : Message)
Source
send_sync(msg : Message, timeout : Time::Span = 15.seconds) : Message

Send request and wait for matching RESPONSE.

Source