<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="zwave"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
  xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0
                      https://openhab.org/schemas/thing-description/v1.0.0">

  <thing-type id="benext_tagreader500_00_000" listed="false">
    <label>Tag Reader 500 WTRFID Mini Keypad</label>
    <description><![CDATA[
WTRFID Mini Keypad<br /><h1>Overview</h1><p>A Z-Wave security enabled entry control device. You can arm/disarm your house to home or away with the Tag Reader 500. With the use of a RFID tag or a numerical code the device can send an entry control message which can be handled by a supported gateway. In addition the Tag Reader supports the activation of scenes.</p> <br /><h2>Inclusion Information</h2><ol><li>To include the Tag Reader 500 US press and hold the enter button for two seconds (indication LED blinks shortly). </li> <li>Release the enter button now to start the inclusion (during the inclusion routine the indication LED willblink twice per second).</li> </ol><br /><h2>Exclusion Information</h2><ol><li>To exclude the Tag Reader 500 US press and hold the enter button for two seconds (indication LED blinks shortly). </li> <li>Release the enter button now to start the exclusion (during the exclusion routine the indication LED willblink twice three times per 1,5 second).</li> </ol><br /><h2>Wakeup Information</h2><p>Press and hold the button for 7 seconds, the indication LED will go on for 1 full second.</p>
    ]]></description>
    <category>RemoteControl</category>

    <!-- CHANNEL DEFINITIONS -->
    <channels>
      <channel id="switch_binary" typeId="switch_binary">
        <label>Switch</label>
        <properties>
          <property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY</property>
        </properties>
      </channel>
      <channel id="alarm_access" typeId="alarm_access">
        <label>Alarm (access)</label>
        <properties>
          <property name="binding:*:OnOffType">COMMAND_CLASS_ALARM;type=ACCESS_CONTROL</property>
        </properties>
      </channel>
      <channel id="battery-level" typeId="system.battery-level">
        <properties>
          <property name="binding:*:PercentType">COMMAND_CLASS_BATTERY</property>
        </properties>
      </channel>
    </channels>

    <!-- DEVICE PROPERTY DEFINITIONS -->
    <properties>
      <property name="vendor">BeNext</property>
      <property name="modelId">Tag Reader 500</property>
      <property name="manufacturerId">008A</property>
      <property name="manufacturerRef">0007:0200</property>
      <property name="dbReference">1122</property>
      <property name="defaultAssociations">1</property>
    </properties>

    <!-- CONFIGURATION DESCRIPTIONS -->
    <config-description>

      <!-- GROUP DEFINITIONS -->
      <parameter-group name="configuration">
        <context>setup</context>
        <label>Configuration Parameters</label>
      </parameter-group>

      <parameter-group name="association">
        <context>link</context>
        <label>Association Groups</label>
      </parameter-group>

      <!-- PARAMETER DEFINITIONS -->
      <parameter name="config_1_1" type="integer" groupName="configuration"
                 min="0" max="255">
        <label>1: Set to Default</label>
        <description><![CDATA[
Set all configuration values to default values (factory settings)<br /><h1>Overview</h1><p>If the Value is set to 0xFF (255) this device will return to factory settings.</p>
        ]]></description>
        <default>0</default>
        <options>
          <option value="255">Reset to factory defaults</option>
        </options>
        <limitToOptions>false</limitToOptions>
      </parameter>

      <parameter name="config_2_1" type="integer" groupName="configuration"
                 min="0" max="255">
        <label>2: Feedback time</label>
        <description><![CDATA[
the time the beep goes to off<br /><h1>Overview</h1><p>0x00 = Off, 0xFF = endless</p>
        ]]></description>
        <default>15</default>
      </parameter>

      <parameter name="config_3_1" type="integer" groupName="configuration"
                 min="0" max="255">
        <label>3: Feedback time-out</label>
        <description><![CDATA[
waiting for the wake-up-no-more command<br /><h1>Overview</h1><p>Too configure the time-out, waiting on the wakeup_no_more_information command before the error sound starts automatically. The error sound is set to 8 short beeps.</p> <p>0x00 = off</p> <p>0x01 – 0xFF: Value in seconds</p>
        ]]></description>
        <default>0</default>
      </parameter>

      <parameter name="config_4_1" type="integer" groupName="configuration"
                 min="0" max="5">
        <label>4: feedback beeps per second</label>
        <description><![CDATA[
Amount of beeps a second<br /><h1>Overview</h1><p>To set the amount of beeps per second, every beep is around 10ms.</p>
        ]]></description>
        <default>2</default>
      </parameter>

      <parameter name="config_5_1" type="integer" groupName="configuration">
        <label>5: Always awake mode</label>
        <description><![CDATA[
Always awake mode<br /><h1>Overview</h1><p>Mode 1 =  normal working mode</p> <p>Mode 3 = z-wave chip is always on to be asked for information, for example version or manufacturer ID.</p> <p>Any other value will be reported after a GET, but will be seen as a mode 1.</p>
        ]]></description>
        <default>1</default>
        <options>
          <option value="1">normal operating mode.</option>
          <option value="3">Always awake mode</option>
        </options>
      </parameter>

      <parameter name="config_7_1" type="integer" groupName="configuration">
        <label>7: Operation mode</label>
        <description><![CDATA[
Operation mode<br /><h1>Overview</h1><ul><li>0x00: the RFID and Numeric codes are reported in gateway mode</li> <li>0x01 – 0xFF: the RFID and Numeric codes are reported in local mode</li> </ul>
        ]]></description>
        <default>0</default>
        <options>
          <option value="0">Gateway mode</option>
          <option value="1">Local mode</option>
        </options>
      </parameter>

      <parameter name="config_8_1" type="integer" groupName="configuration">
        <label>8: Gateway confirmation</label>
        <description><![CDATA[
Gateway confirmation<br /><h1>Overview</h1><ul><li>In gateway mode it is possible to let the gateway decide if the Tag Reader 500 can arm to home or away.</li> <li>If gateway indication is disabled the Tag Reader 500 automatically assumes that it can arm and will wait for a user input of RFID TAG or numeric code. </li> </ul>
        ]]></description>
        <default>0</default>
        <options>
          <option value="0">Confirmation Disabled</option>
          <option value="1">Confirmation Enabled</option>
        </options>
      </parameter>

      <!-- ASSOCIATION DEFINITIONS -->
      <parameter name="group_1" type="text" groupName="association">
        <label>1: Lifeline</label>
      </parameter>

      <!-- STATIC DEFINITIONS -->
      <parameter name="node_id" type="integer" min="1" max="232" readOnly="true" required="true">
        <label>Node ID</label>
        <advanced>true</advanced>
      </parameter>

    </config-description>

  </thing-type>

</thing:thing-descriptions>
