OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 918 forks source link

ZME_064435 COMMAND_CLASS_SCENE_ACTIVATION Problem #2483

Open macfly92 opened 3 years ago

macfly92 commented 3 years ago

Hi all,

I know it is a particular device, and I know there is already a workaround made for it (https://github.com/OpenZWave/open-zwave/issues/656) but it seem to not working anymore or I miss something.

I set the parameter 13 & 14 on 3 (Scene Activation) but when I push a button I have some Warnings logged and it didn't trigger any event or change any value:

 [ozw.library] [warning]: Warning - Node: 44 Received a SceneActivation Message for a Controlled CommandClass
 [ozw.library] [warning]: Warning - Node: 44 CommandClass COMMAND_CLASS_SCENE_ACTIVATION HandlerMsg Returned False

But the detailed message in hex logged is different for each action UP 1 press : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x01, 0xff, 0x0d

UP Double Press : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x0b, 0xff, 0x07

UP Long Press : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x03, 0xff, 0x0f

UP Long Press Release : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x05, 0xff, 0x09

DOWN 1 Press : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x02, 0xff, 0x0e

DOWN Double Press : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x0c, 0xff, 0x00

DOWN Long Press : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x04, 0xff, 0x08

DOWN Long Press Release : Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x2c, 0x04, 0x2b, 0x01, 0x06, 0xff, 0x0a

I've read up on the CommandClass compatibility flags, but I'm not sure it can provide a fix, or I'm not sure how to do it.

Can someone help me ?

Thanks.

macfly92 commented 3 years ago

I confirm that the previous trick to throw events seem to not working anymore, even with a fresh and completed polled device. Despite my research I did not find any documentation on Command Class Scene Activation but based on dead and retry method and what I found for other device in my ozwcache, I've managed to get it works :

This is the modified part of ./zwave.me/ZME_064435.xml file :

  <CommandClass id="43" name="COMMAND_CLASS_SCENE_ACTIVATION">
    <Compatibility />
    <State>
      <AfterMark>true</AfterMark>
      <CCVersion>1</CCVersion>
      <InNif>true</InNif>
      <StaticRequests>4</StaticRequests>
    </State>
    <Instance index="1" />
    <Value type="int" genre="user" instance="1" index="0" label="Scene" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0">
      <Help>Scene Event</Help>
    </Value>
  </CommandClass>

But I don't know exactly what I did, especially the "State" part was a copy/paste without really understanding... but it works and now throws ozw events with different scene_value_id based on each events.

Next I tried to put some labels for scene_value_id, but no luck with that. I've tried something like :

    <Value type="list" genre="user" instance="1" index="0" label="Scene" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0">
        <Help></Help>
        <Item label="Inactive" value="0" />
        <Item label="Single Click UP" value="1" />
        <Item label="Single Click DOWN" value="2" />
        <Item label="Hold Click UP" value="3" />
        <Item label="Hold Click DOWN" value="4" />
        <Item label="Release Hold Click UP" value="5" />
        <Item label="Release Hold Click DOWN" value="6" />
        <Item label="Double Click UP" value="11" />
        <Item label="Double Click DOWN" value="12" />
        <Item label="Hold Double Click UP" value="13" />
        <Item label="Hold Double Click DOWN" value="14" />
        <Item label="Release Hold Double Click UP" value="15" />
        <Item label="Release Hold Double Click DOWN" value="16" />
    </Value>

But the returned Item was always 0 : Inactive

It is not mandatory, but my goal is to try to have a good device xml file to publish it for everybody if I'm right about the official file not working anymore.

Any help would be really welcome. Thanks.