auto_api v0.1.0 AutoApi.WiFiCapability View Source
Basic settings for WiFi Capability
iex> alias AutoApi.WiFiCapability, as: W
iex> W.identifier
<<0x00, 0x59>>
iex> W.name
:wi_fi
iex> W.description
"Wi-Fi"
iex> W.command_name(0x00)
:get_wi_fi_state
iex> W.command_name(0x01)
:wi_fi_state
iex> W.command_name(0x02)
:connect_to_network
iex> W.command_name(0x03)
:forget_network
iex> W.command_name(0x04)
:enable_disable_wi_fi
iex> length(W.properties)
4
iex> W.properties
[{1, :wi_fi_enabled}, {2, :network_connected}, {3, :network_ssid}, {4, :network_security}]
Link to this section Summary
Functions
Deprecated. Use API level 5 and above
Deprecated. Use API level 5 and above
Returns the command module related to this capability
Return commands id based on atom
Returns commands readable name
Returns map of commands id and thier name
Returns capability’s description: Wi-Fi
Retunrs capability’s identifier: <<0x0, 0x59>>
Returns capability’s unique name: wi_fi
Retunrs properties under Wi-Fi:
[{0x1, :wi_fi_enabled}, {0x2, :network_connected}, {0x3, :network_ssid}, {0x4, :network_security}]
Returns the command module related to this capability
Returns binary value of capability based on list of available supported capabilities
Returns list of supported sub capability based on binary value
Deprecated. Use API level 5 and above
Deprecated. Use API level 5 and above
Link to this section Types
command_type() :: :get_wi_fi_state | :wi_fi_state | :connect_to_network | :forget_network | :enable_disable_wi_fi
Link to this section Functions
Deprecated. Use API level 5 and above.
Retunrs capabilities under Wi-Fi:
[]
Deprecated. Use API level 5 and above.
Returns capability size: 1
Returns the command module related to this capability
command_id(AutoApi.WiFiCapability.command_type()) :: integer() | nil
Return commands id based on atom
command_name(integer()) :: AutoApi.WiFiCapability.command_type() | nil
Returns commands readable name.
Available commands:
%{0x0 => :get_wi_fi_state, 0x1 => :wi_fi_state, 0x2 => :connect_to_network, 0x3 => :forget_network, 0x4 => :enable_disable_wi_fi}
Returns map of commands id and thier name
[{0x0, :get_wi_fi_state}, {0x1, :wi_fi_state}, {0x2, :connect_to_network}, {0x3, :forget_network}, {0x4, :enable_disable_wi_fi}]
Returns capability’s description: Wi-Fi
Retunrs capability’s identifier: <<0x0, 0x59>>
Returns capability’s unique name: wi_fi
Retunrs properties under Wi-Fi:
[{0x1, :wi_fi_enabled}, {0x2, :network_connected}, {0x3, :network_ssid}, {0x4, :network_security}]
Returns the command module related to this capability
Returns binary value of capability based on list of available supported capabilities
to_map(binary()) :: [command_type()] :: [map()]
Returns list of supported sub capability based on binary value
Level 5:
ie> HmAutoApi.DoorLocksCapability.to_map(<<0x00, 0x20, 0x01, 0x00, 0x02>>)
[:lock_state, :get_lock_state, :lock_unlock_doors]
Level 4:
ie> HmAutoApi.DoorLocksCapability.to_map(<<0x1, 0x0>>)
[%{bin: <<0x00>>, name: "Unavailable", atom: :unavailable, title: ""}]
Deprecated. Use API level 5 and above.
Deprecated. Use API level 5 and above.