View Source Klf200.Api (klf200 v0.1.4)

This module provides functions on a general API level to create requests and to parse responses. It implements the basic protocol described by VELUX.

The actual commands and confirmations are defined in sub-modules.

Summary

Functions

request(cmd)

@spec request(atom()) :: <<_::16, _::_*8>>

request(cmd, data)

@spec request(atom(), map()) :: <<_::16, _::_*8>>

response(frame)

@spec response(bitstring()) ::
  {:error, :protocol_mismatch | :wrong_checksum}
  | {:ok, %{frame: atom(), payload: any()}}