# `Grizzly.ZWave.SmartStart.MetaExtension`
[🔗](https://github.com/smartrent/grizzly/blob/v9.1.4/lib/grizzly/zwave/smart_start/meta_extension.ex#L1)

Meta Extensions for SmartStart devices for QR codes and node provisioning
list

# `application_version`

```elixir
@type application_version() :: binary()
```

Version of the application in a string format of "Major.Minor"

# `bootstrapping_mode`

```elixir
@type bootstrapping_mode() :: :security_2 | :smart_start | :long_range
```

The mode to use when including the node advertised in the provisioning list

- `:security_2` - the node must be manually set to learn mode and follow the
  S2 bootstrapping instructions
- `:smart_start` - the node will use S2 bootstrapping automatically using the
  SmartStart functionality
- `:long_range` - included the device using the Z-Waver long range protocol.
  If no keys are granted in the `:advanced_joining` extension this inclusion
  will fail.

# `extension`

```elixir
@type extension() ::
  {:advanced_joining, [Grizzly.ZWave.Security.key()]}
  | {:bootstrapping_mode, bootstrapping_mode()}
  | {:location_information, information_location()}
  | {:max_inclusion_request_interval, inclusion_interval()}
  | {:name_information, information_name()}
  | {:network_status, {Grizzly.ZWave.node_id(), atom()}}
  | {:product_id, product_id_values()}
  | {:product_type, product_type_values()}
  | {:smart_start_inclusion_setting, inclusion_setting()}
  | {:uuid16, Grizzly.ZWave.SmartStart.MetaExtension.UUID16.t()}
  | {:unknown, binary()}
```

Meta extension for SmartStart devices

* `:advanced_joining` - used to specify which S2 security keys to grant
  during S2 inclusion
* `:bootstrapping_mode` - used to specify the bootstrapping mode the including
  node must join with
* `:location_information` - used to advertise the location assigned to the node
* `:max_inclusion_request_interval` - used to advertise if a power constrained
  smart start node will issue an inclusion request at a higher interval than
  the default 512 seconds
* `:name_information` - used to advertise the name of the node
* `:network_status` - used to advertise if the node is in the network and its
  node id
* `:product_id` - used to advertise product identifying data
* `:product_type` - used to advertise the product type data
* `:smart_start_inclusion_setting` - used to advertise the smart start
  inclusion setting
* `:uuid16` - used to advertise the 16 byte manufacturer-defined information
  that is unique to the that device
* `:unknown` - sometimes new extensions are released without first class
  support, so this extension is used for those extensions that still need to
  be supported in this library

# `generic_device_class`

```elixir
@type generic_device_class() :: atom()
```

Generic Device Class for the product type extension

# `inclusion_interval`

```elixir
@type inclusion_interval() :: 640..12672
```

The interval (in seconds) must be in the range of 640..12672 inclusive, and
has to be in steps of 128 seconds.

So after 640 the next valid interval is `640 + 128` which is `768` seconds.

See `SDS13944 Node Provisioning Information Type Registry.pdf` section
`3.1.2.3` for more information.

# `inclusion_setting`

```elixir
@type inclusion_setting() :: :pending | :passive | :ignored
```

Settings for the smart start inclusion setting extension

* `:pending` - the node will be added to the network when it issues SmartStart
  inclusion requests.
* `:passive` - this node is unlikely to issues a SmartStart inclusion request
  and SmartStart inclusion requests will be ignored from this node by the
  Z/IP Gateway. All nodes in the list with this setting must be updated to
  `:pending` when Provisioning List Iteration Get command is issued.
* `:ignored` - All SmartStart inclusion request are ignored from this node
  until updated via Z/IP Client (Grizzly) or a controlling node.

# `information_location`

```elixir
@type information_location() :: binary()
```

The location string cannot contain underscores and cannot end with a dash.

The location string can contain a period (.) but a sublocation cannot end a
dash. For example:

```
123.123-.123
```

The above location invalid. To make it valid remove the `-` before `.`.

A node's location cannot be more than 62 bytes.

# `information_name`

```elixir
@type information_name() :: binary()
```

The name string cannot contain underscores and cannot end with a dash.

A node's name cannot be more than 62 bytes.

# `installer_icon_type`

```elixir
@type installer_icon_type() :: Grizzly.ZWave.IconType.name()
```

Installer icon for the product type extension

# `manufacturer_id`

```elixir
@type manufacturer_id() :: unit_16()
```

Id of the manufacturer for the product id extension

# `network_status`

```elixir
@type network_status() :: :pending | :passive | :ignored
```

The different network statuses are:

- `:not_in_network` - the node in the provisioning list is not included in
  the network
- `:included` - the node in the provisioning list is included in the network
  and is functional
- `:failing` - the node in the provisioning list is included in the network
  but is now marked as failing

# `product_id`

```elixir
@type product_id() :: unit_16()
```

Id of the product produced by the manufacturer for the product id extension

# `product_id_values`

```elixir
@type product_id_values() ::
  {manufacturer_id(), product_id(), product_type(), application_version()}
```

# `product_type`

```elixir
@type product_type() :: unit_16()
```

Type of product produced by the manufacturer for the product id extension

# `product_type_values`

```elixir
@type product_type_values() ::
  {generic_device_class(), specific_device_class(), installer_icon_type()}
```

# `specific_device_class`

```elixir
@type specific_device_class() :: atom()
```

Specific Device Class for the product type extension

# `unit_16`

```elixir
@type unit_16() :: char()
```

Unsigned 16 bit integer

# `encode`

```elixir
@spec encode(extension()) :: binary()
```

Encode an extension into a binary

# `parse`

```elixir
@spec parse(binary()) :: [extension()]
```

Parse the binary into the list of extensions

---

*Consult [api-reference.md](api-reference.md) for complete listing*
