[zwave] wrong alarm type for device

My BeNext Molite sensor reports a tamper alarm, but in the OH2 binding, it is interpreted as CARBON_DIOXIDE

17:23:47.823 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 07 00 13 CD 00 00 02 24 
17:23:47.844 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
17:23:47.850 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 09 00 13 CD 00 00 02 00 00 2A 
17:23:47.861 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 09 00 13 CD 00 00 02 00 00 2A 
17:23:47.865 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=SendData[0x13], type=Request[0x00], priority=High, dest=255, callback=0, payload=CD 00 00 02 
17:23:47.866 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 0A 00 04 00 08 04 71 05 03 00 8A 
17:23:47.869 [DEBUG] [l.serialmessage.SendDataMessageClass] - NODE 8: SendData Request. CallBack ID = 205, Status = Transmission complete and ACK received(0)
17:23:47.872 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 8: Starting initialisation from DONE
17:23:47.874 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@1ee1167 already registered
17:23:47.877 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00], priority=Immediate, dest=8, callback=205, payload=08 03 71 04 03 
17:23:47.880 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=SendData[0x13], type=Request[0x00], priority=High, dest=255, callback=0, payload=CD 00 00 02 
17:23:47.882 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=SendData, callback id=205, expected=ApplicationCommandHandler, cancelled=false      MISMATCH
17:23:47.883 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
17:23:47.886 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 0A 00 04 00 08 04 71 05 03 00 8A 
17:23:47.890 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 0A 00 04 00 08 04 71 05 03 00 8A 
17:23:47.893 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 08 04 71 05 03 00 
17:23:47.896 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 8: Application Command Request (ALIVE:DONE)
17:23:47.897 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 8: Starting initialisation from DONE
17:23:47.899 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@1ee1167 already registered
17:23:47.901 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 8: Incoming command class ALARM
17:23:47.902 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: Received ALARM command V1
17:23:47.904 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: Process NOTIFICATION_REPORT V1
17:23:47.905 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: ALARM report - 3 = 0
17:23:47.907 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: Alarm Type = CARBON_DIOXIDE (3)
17:23:47.909 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveAlarmValueEvent
17:23:47.910 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Got an event from Z-Wave network: ZWaveAlarmValueEvent
17:23:47.912 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Got a value event from Z-Wave network, endpoint = 0, command class = ALARM, value = 0
17:23:47.914 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing ALARM
17:23:47.917 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Updating channel state zwave:device:controller:node8:alarm_general to OFF [OnOffType]
17:23:47.928 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00], priority=Immediate, dest=8, callback=205, payload=08 03 71 04 03 
17:23:47.932 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 08 04 71 05 03 00 
17:23:47.934 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=ApplicationCommandHandler, callback id=205, expected=ApplicationCommandHandler, cancelled=false        transaction complete!
17:23:47.935 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveTransactionCompletedEvent
17:23:47.937 [DEBUG] [ve.internal.protocol.ZWaveController] - Message queued. Queue length = 1. Queue={}

@chris Should I create a Github Issue?

Not yet - let’s discuss here for a bit (although my time is limited for the next week).

Can you post the XML for the device when you get a chance and I’ll have a look - there are a few possible explanations…

At your service :slight_smile:

<node>
  <deviceClass>
    <basicDeviceClass>ROUTING_SLAVE</basicDeviceClass>
    <genericDeviceClass>BINARY_SENSOR</genericDeviceClass>
    <specificDeviceClass>NOT_USED</specificDeviceClass>
  </deviceClass>
  <homeId>0xcb5b3138</homeId>
  <nodeId>8</nodeId>
  <version>4</version>
  <manufacturer>0x8a</manufacturer>
  <deviceId>0x101</deviceId>
  <deviceType>0x3</deviceType>
  <listening>false</listening>
  <frequentlyListening>false</frequentlyListening>
  <routing>true</routing>
  <security>false</security>
  <beaming>true</beaming>
  <maxBaudRate>40000</maxBaudRate>
  <nodeInformationFrame>
    <commandClass>SENSOR_BINARY</commandClass>
    <commandClass>ALARM</commandClass>
    <commandClass>ASSOCIATION</commandClass>
    <commandClass>BATTERY</commandClass>
    <commandClass>CONFIGURATION</commandClass>
    <commandClass>MANUFACTURER_SPECIFIC</commandClass>
    <commandClass>SENSOR_MULTILEVEL</commandClass>
    <commandClass>VERSION</commandClass>
    <commandClass>WAKE_UP</commandClass>
  </nodeInformationFrame>
  <supportedCommandClasses>
    <entry>
      <commandClass>BASIC</commandClass>
      <basicCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <isGetSupported>true</isGetSupported>
      </basicCommandClass>
    </entry>
    <entry>
      <commandClass>SENSOR_BINARY</commandClass>
      <binarySensorCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <isGetSupported>true</isGetSupported>
        <types/>
      </binarySensorCommandClass>
    </entry>
    <entry>
      <commandClass>SENSOR_MULTILEVEL</commandClass>
      <multiLevelSensorCommandClass>
        <version>5</version>
        <instances>1</instances>
        <versionSupported>5</versionSupported>
        <sensors>
          <entry>
            <multilevelSensorType>LUMINANCE</multilevelSensorType>
            <multilevelSensor>
              <sensorType>LUMINANCE</sensorType>
              <initialised>true</initialised>
            </multilevelSensor>
          </entry>
          <entry>
            <multilevelSensorType>TEMPERATURE</multilevelSensorType>
            <multilevelSensor>
              <sensorType>TEMPERATURE</sensorType>
              <initialised>true</initialised>
            </multilevelSensor>
          </entry>
        </sensors>
        <isGetSupported>true</isGetSupported>
      </multiLevelSensorCommandClass>
    </entry>
    <entry>
      <commandClass>BATTERY</commandClass>
      <batteryCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <batteryLevel>90</batteryLevel>
        <batteryLow>false</batteryLow>
        <isGetSupported>true</isGetSupported>
      </batteryCommandClass>
    </entry>
    <entry>
      <commandClass>MANUFACTURER_SPECIFIC</commandClass>
      <manufacturerSpecificCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>2</versionSupported>
        <initSerialNumber>false</initSerialNumber>
        <deviceManufacturer>138</deviceManufacturer>
        <deviceType>3</deviceType>
        <deviceId>257</deviceId>
      </manufacturerSpecificCommandClass>
    </entry>
    <entry>
      <commandClass>ASSOCIATION</commandClass>
      <associationCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <maxGroups>1</maxGroups>
      </associationCommandClass>
    </entry>
    <entry>
      <commandClass>NO_OPERATION</commandClass>
      <noOperationCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
      </noOperationCommandClass>
    </entry>
    <entry>
      <commandClass>WAKE_UP</commandClass>
      <WakeUpCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <targetNodeId>1</targetNodeId>
        <interval>600</interval>
        <minInterval>0</minInterval>
        <maxInterval>2147483647</maxInterval>
        <defaultInterval>0</defaultInterval>
        <intervalStep>0</intervalStep>
        <lastWakeup>2017-01-15 15:27:45.863 UTC</lastWakeup>
        <isGetSupported>true</isGetSupported>
      </WakeUpCommandClass>
    </entry>
    <entry>
      <commandClass>ALARM</commandClass>
      <alarmCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <alarms>
          <entry>
            <alarmType>CARBON_DIOXIDE</alarmType>
            <alarmState>
              <alarmType>CARBON_DIOXIDE</alarmType>
              <reportedEvents/>
              <outer-class reference="../../../.."/>
            </alarmState>
          </entry>
        </alarms>
        <v1Supported>false</v1Supported>
        <isGetSupported>true</isGetSupported>
      </alarmCommandClass>
    </entry>
    <entry>
      <commandClass>CONFIGURATION</commandClass>
      <configurationCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <configParameters>
          <entry>
            <int>1</int>
            <configurationParameter>
              <index>1</index>
              <size>1</size>
              <value>85</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>2</int>
            <configurationParameter>
              <index>2</index>
              <size>2</size>
              <value>300</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>3</int>
            <configurationParameter>
              <index>3</index>
              <size>2</size>
              <value>2700</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>4</int>
            <configurationParameter>
              <index>4</index>
              <size>1</size>
              <value>80</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>5</int>
            <configurationParameter>
              <index>5</index>
              <size>1</size>
              <value>2</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>6</int>
            <configurationParameter>
              <index>6</index>
              <size>2</size>
              <value>-25</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>7</int>
            <configurationParameter>
              <index>7</index>
              <size>2</size>
              <value>17</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>8</int>
            <configurationParameter>
              <index>8</index>
              <size>2</size>
              <value>38</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>9</int>
            <configurationParameter>
              <index>9</index>
              <size>2</size>
              <value>85</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>10</int>
            <configurationParameter>
              <index>10</index>
              <size>2</size>
              <value>186</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>11</int>
            <configurationParameter>
              <index>11</index>
              <size>2</size>
              <value>407</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>12</int>
            <configurationParameter>
              <index>12</index>
              <size>2</size>
              <value>891</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>13</int>
            <configurationParameter>
              <index>13</index>
              <size>2</size>
              <value>1949</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>14</int>
            <configurationParameter>
              <index>14</index>
              <size>2</size>
              <value>4265</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>15</int>
            <configurationParameter>
              <index>15</index>
              <size>2</size>
              <value>9332</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>16</int>
            <configurationParameter>
              <index>16</index>
              <size>2</size>
              <value>20417</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
        </configParameters>
      </configurationCommandClass>
    </entry>
    <entry>
      <commandClass>VERSION</commandClass>
      <versionCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <libraryType>LIB_SLAVE_ROUTING</libraryType>
        <protocolVersion>3.42</protocolVersion>
        <applicationVersion>1.8</applicationVersion>
      </versionCommandClass>
    </entry>
  </supportedCommandClasses>
  <securedCommandClasses/>
  <associationGroups>
    <entry>
      <int>1</int>
      <associationGroup>
        <index>1</index>
        <associations>
          <associationMember>
            <node>1</node>
            <endpoint>0</endpoint>
          </associationMember>
        </associations>
      </associationGroup>
    </entry>
  </associationGroups>
  <nodeNeighbors>
    <int>7</int>
  </nodeNeighbors>
  <lastSent>2017-01-15 15:27:48.47 UTC</lastSent>
  <lastReceived>2017-01-15 15:27:48.115 UTC</lastReceived>
</node>

It’s this device

http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/374

The manual says:

class: 0x71 COMMAND_CLASS_ALARM
This command class is used to identify the state of the tamper alarm. The device will send an unsolicited report
to the controller if the status is changed, the value 0x00 will indicate that the tamper is placed correctly on the
wall. The value 0xFF will indicate a tamper alarm.
There is one alarm type:
3: Tamper switch
Every other alarm type that is requested will be ignored by application.

I guess that is what the 3 comes from?