Search documentation of grizzly

# View Source Grizzly.ZWave.CommandClasses.SensorBinary (grizzly v7.4.2)

Deprecated command class for triggered/not triggered sensors.

# Summary

## Types

sensor_type()

## Functions

decode_sensor_types(binary)

Decode a list of sensor types from a bitmap.

decode_type(byte)

Parse the type value from a byte

encode_sensor_types(sensor_types)

Encode a list of sensor types as a bitmap.

encode_type(atom)

Encode the type value for the sensor report

# Types

Link to this type

# sensor_type()

View Source

    @type sensor_type() ::
      :general_purpose
      | :smoke
      | :co
      | :co2
      | :heat
      | :water
      | :freeze
      | :tamper
      | :aux
      | :door_window
      | :tilt
      | :motion
      | :glass_break

# Functions

Link to this function

# decode_sensor_types(binary)

View Source

    @spec decode_sensor_types(binary()) ::
      {:ok, [{:sensor_types, [atom()]}]} | {:error, Grizzly.ZWave.DecodeError.t()}

Decode a list of sensor types from a bitmap.

## Examples

    iex> decode_sensor_types(<<0x40, 0x00>>)
    {:ok, sensor_types: [:water]}

Link to this function

# decode_type(byte)

View Source

    @spec decode_type(byte()) ::
      {:ok, sensor_type()} | {:error, Grizzly.ZWave.DecodeError.t()}

Parse the type value from a byte

Link to this function

# encode_sensor_types(sensor_types)

View Source

    @spec encode_sensor_types([atom()]) :: binary()

Encode a list of sensor types as a bitmap.

## Examples

    iex> encode_sensor_types([:water])
    <<0x40, 0x00>>

Link to this function

# encode_type(atom)

View Source

    @spec encode_type(sensor_type()) :: byte()

Encode the type value for the sensor report