auto_api v0.1.0 AutoApi.RemoteControlCapability View Source
Basic settings for RemoteControl Capability
iex> alias AutoApi.RemoteControlCapability, as: R
iex> R.identifier
<<0x00, 0x27>>
iex> R.name
:remote_control
iex> R.description
"Remote Control"
iex> R.command_name(0x00)
:get_control_mode
iex> R.command_name(0x01)
:control_mode
iex> R.command_name(0x02)
:start_control_mode
iex> R.command_name(0x03)
:stop_control_mode
iex> R.command_name(0x04)
:control_command
iex> length(R.properties)
2
iex> R.properties
[{1, :control_mode}, {2, :angle}]
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: Remote Control
Retunrs capability’s identifier: <<0x0, 0x27>>
Returns capability’s unique name: remote_control
Retunrs properties under Remote Control:
[{0x1, :control_mode}, {0x2, :angle}]
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_control_mode | :control_mode | :start_control_mode | :stop_control_mode | :control_command
Link to this section Functions
Deprecated. Use API level 5 and above.
Retunrs capabilities under Remote Control:
[]
Deprecated. Use API level 5 and above.
Returns capability size: 1
Returns the command module related to this capability
command_id(AutoApi.RemoteControlCapability.command_type()) :: integer() | nil
Return commands id based on atom
command_name(integer()) :: AutoApi.RemoteControlCapability.command_type() | nil
Returns commands readable name.
Available commands:
%{0x0 => :get_control_mode, 0x1 => :control_mode, 0x2 => :start_control_mode, 0x3 => :stop_control_mode, 0x4 => :control_command}
Returns map of commands id and thier name
[{0x0, :get_control_mode}, {0x1, :control_mode}, {0x2, :start_control_mode}, {0x3, :stop_control_mode}, {0x4, :control_command}]
Returns capability’s description: Remote Control
Retunrs capability’s identifier: <<0x0, 0x27>>
Returns capability’s unique name: remote_control
Retunrs properties under Remote Control:
[{0x1, :control_mode}, {0x2, :angle}]
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.