Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shutter recognized as dimmer #3862

Closed
zeev-mindali opened this issue Aug 25, 2024 · 27 comments · Fixed by #3877 or #3900
Closed

shutter recognized as dimmer #3862

zeev-mindali opened this issue Aug 25, 2024 · 27 comments · Fixed by #3877 or #3900
Assignees
Labels
question Further information is requested

Comments

@zeev-mindali
Copy link

Dear all,

i connected the homeassistant to zwave-js-ui.
made working with mqtt discovery because of issues that the shutter is recognized as dimmier
once i made the choice i can see home assistant option on the device.
but the device reporting also as dimmer:
{
"type": "light",
"object_id": "dimmer_9",
"discovery_payload": {
"command_topic": "zwave/lab/gp9/switch_multilevel/endpoint_9/targetValue/set",
"state_topic": "zwave/lab/gp9/switch_multilevel/endpoint_9/currentValue",
"state_value_template": "{{ "OFF" if value_json.value == 0 else "ON" }}",
"brightness_command_topic": "zwave/lab/gp9/switch_multilevel/endpoint_9/targetValue/set",
"brightness_scale": 99,
"brightness_state_topic": "zwave/lab/gp9/switch_multilevel/endpoint_9/currentValue",
"brightness_value_template": "{{ value_json.value }}",
"on_command_type": "brightness",
"availability": [
{
"payload_available": "true",
"payload_not_available": "false",
"topic": "zwave/lab/gp9/status",
"value_template": "{{'true' if value_json.value else 'false'}}"
},
{
"topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status",
"value_template": "{{'online' if value_json.value else 'offline'}}"
},
{
"payload_available": "true",
"payload_not_available": "false",
"topic": "zwave/driver/status"
}
],
"availability_mode": "all",
"device": {
"identifiers": [
"zwavejs2mqtt_0xf2e08abf_node48"
],
"manufacturer": "TouchWand Co., Ltd.",
"model": "Glass 9 v2.03 (Glass9)",
"name": "lab-gp9",
"sw_version": "4.13.8"
},
"name": "lab-gp9_dimmer_9",
"unique_id": "zwavejs2mqtt_0xf2e08abf_48-38-9-currentValue"
},
"discoveryTopic": "light/lab-gp9/dimmer_9/config",
"values": [
"38-9-currentValue",
"38-9-targetValue"
],
"persistent": false,
"ignoreDiscovery": false,
"id": "light_dimmer_9"
}

is there anything i can do to make it work as shutter?
are there any automation for making all dimmer recognized as shutter?

zeev

@zeev-mindali zeev-mindali added the question Further information is requested label Aug 25, 2024
@robertsLando
Copy link
Member

Hi @zeev-mindali , the code that defines if discovering a cover or a light dimmer is here:

case CommandClasses['Multilevel Switch']:

I may have to add a case to handle your device as a cover, could you do a node export from the ui so I can check the node.deviceClass.generic and node.deviceClass.specific

@zeev-mindali
Copy link
Author

Dear robert,

i attaching two files:
node46_ui node46_driver.
in node46_driver i see that node 8,9,10, identify as Motor class C, i think this is the start point of the bug.
node46_ui.json
node46_driver.json

zeev

@robertsLando
Copy link
Member

Oh ok I may have understand what's the issue here, seems I only get the device class of root endpoint instead of getting it for each one, this requires a fix on my side

@zeev-mindali
Copy link
Author

hi @robertsLando
i didn't see any change on my side regrading that issue,
it's still shows dimmer,
i check the linked pull, but it's not working for now.

@robertsLando
Copy link
Member

@zeev-mindali The PR is not merged yet, how did you test it?

@robertsLando
Copy link
Member

I have created 9.18.1 relese, give it a try

@zeev-mindali
Copy link
Author

great, i will check it today, tnx a lot

@zeev-mindali
Copy link
Author

zeev-mindali commented Sep 11, 2024

dear @robertsLando,
i made the update, and i using the zwave-js-ui as my main zwave in home assistant,
i can see in the home assistant tab, that it's recognized as cover, but home assistant still show me as light,
is it something on zwave-js-ui or on home assistant?

i using HAOS

@robertsLando
Copy link
Member

I think that's something related to HA but I'm not an HA expert, try to ask to them and let me know :)

@zeev-mindali
Copy link
Author

zeev-mindali commented Sep 16, 2024

@robertsLando
the problem is deffentily HA fault.
i used the mqtt in HA , and i got cover, but the zwave-js of HA is still shown as light.

but i have another device, whice is still shown as dimmer :(
i will get the info out and send you the logs

@zeev-mindali
Copy link
Author

here the files:
zwavejs_current.log
z-ui_current.log

@robertsLando
Copy link
Member

From discovery prospecctive seems good:

2024-09-16 16:53:38.703 DEBUG GATEWAY: Publishing discovery: {
  type: 'cover',
  object_id: 'position_8',
  discovery_payload: {
    command_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_8/targetValue/set',
    position_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_8/currentValue',
    set_position_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_8/targetValue/set',
    position_template: '{{ value_json.value | round(0) }}',
    position_open: 99,
    position_closed: 0,
    payload_open: 99,
    payload_close: 0,
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/gp9/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node24', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'Glass 9 (Glass9)',
      name: 'lab-gp9',
      sw_version: '2.10.3'
    },
    name: 'lab-gp9_position_8',
    unique_id: 'zwavejs2mqtt_0xe98f251e_24-38-8-currentValue'
  },
  discoveryTopic: 'cover/lab-gp9/position_8/config',
  values: [ '38-8-currentValue', '38-8-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}
2024-09-16 16:53:39.190 DEBUG GATEWAY: Publishing discovery: {
  type: 'cover',
  object_id: 'position_9',
  discovery_payload: {
    command_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_9/targetValue/set',
    position_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_9/currentValue',
    set_position_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_9/targetValue/set',
    position_template: '{{ value_json.value | round(0) }}',
    position_open: 99,
    position_closed: 0,
    payload_open: 99,
    payload_close: 0,
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/gp9/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node24', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'Glass 9 (Glass9)',
      name: 'lab-gp9',
      sw_version: '2.10.3'
    },
    name: 'lab-gp9_position_9',
    unique_id: 'zwavejs2mqtt_0xe98f251e_24-38-9-currentValue'
  },
  discoveryTopic: 'cover/lab-gp9/position_9/config',
  values: [ '38-9-currentValue', '38-9-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}
2024-09-16 16:53:39.676 DEBUG GATEWAY: Publishing discovery: {
  type: 'cover',
  object_id: 'position_10',
  discovery_payload: {
    command_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_10/targetValue/set',
    position_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_10/currentValue',
    set_position_topic: 'zwave/lab/gp9/switch_multilevel/endpoint_10/targetValue/set',
    position_template: '{{ value_json.value | round(0) }}',
    position_open: 99,
    position_closed: 0,
    payload_open: 99,
    payload_close: 0,
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/gp9/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node24', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'Glass 9 (Glass9)',
      name: 'lab-gp9',
      sw_version: '2.10.3'
    },
    name: 'lab-gp9_position_10',
    unique_id: 'zwavejs2mqtt_0xe98f251e_24-38-10-currentValue'
  },
  discoveryTopic: 'cover/lab-gp9/position_10/config',
  values: [ '38-10-currentValue', '38-10-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}

Then light dimmers:

2024-09-16 16:52:46.192 DEBUG GATEWAY: Publishing discovery: {
  type: 'light',
  object_id: 'dimmer_1',
  discovery_payload: {
    command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_1/targetValue/set',
    state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_1/currentValue',
    state_value_template: '{{ "OFF" if value_json.value == 0 else "ON" }}',
    brightness_command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_1/targetValue/set',
    brightness_scale: 99,
    brightness_state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_1/currentValue',
    brightness_value_template: '{{ value_json.value }}',
    on_command_type: 'brightness',
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/wallwand/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node25', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'WallWand touch panel (WallWand)',
      name: 'lab-wallwand',
      sw_version: '1.48'
    },
    name: 'lab-wallwand_dimmer_1',
    unique_id: 'zwavejs2mqtt_0xe98f251e_25-38-1-currentValue'
  },
  discoveryTopic: 'light/lab-wallwand/dimmer_1/config',
  values: [ '38-1-currentValue', '38-1-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}
2024-09-16 16:52:46.349 DEBUG GATEWAY: Publishing discovery: {
  type: 'light',
  object_id: 'dimmer_2',
  discovery_payload: {
    command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_2/targetValue/set',
    state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_2/currentValue',
    state_value_template: '{{ "OFF" if value_json.value == 0 else "ON" }}',
    brightness_command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_2/targetValue/set',
    brightness_scale: 99,
    brightness_state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_2/currentValue',
    brightness_value_template: '{{ value_json.value }}',
    on_command_type: 'brightness',
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/wallwand/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node25', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'WallWand touch panel (WallWand)',
      name: 'lab-wallwand',
      sw_version: '1.48'
    },
    name: 'lab-wallwand_dimmer_2',
    unique_id: 'zwavejs2mqtt_0xe98f251e_25-38-2-currentValue'
  },
  discoveryTopic: 'light/lab-wallwand/dimmer_2/config',
  values: [ '38-2-currentValue', '38-2-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}
2024-09-16 16:52:46.654 DEBUG GATEWAY: Publishing discovery: {
  type: 'light',
  object_id: 'dimmer_5',
  discovery_payload: {
    command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_5/targetValue/set',
    state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_5/currentValue',
    state_value_template: '{{ "OFF" if value_json.value == 0 else "ON" }}',
    brightness_command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_5/targetValue/set',
    brightness_scale: 99,
    brightness_state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_5/currentValue',
    brightness_value_template: '{{ value_json.value }}',
    on_command_type: 'brightness',
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/wallwand/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node25', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'WallWand touch panel (WallWand)',
      name: 'lab-wallwand',
      sw_version: '1.48'
    },
    name: 'lab-wallwand_dimmer_5',
    unique_id: 'zwavejs2mqtt_0xe98f251e_25-38-5-currentValue'
  },
  discoveryTopic: 'light/lab-wallwand/dimmer_5/config',
  values: [ '38-5-currentValue', '38-5-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}
2024-09-16 16:52:47.137 DEBUG GATEWAY: Publishing discovery: {
  type: 'light',
  object_id: 'dimmer_6',
  discovery_payload: {
    command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_6/targetValue/set',
    state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_6/currentValue',
    state_value_template: '{{ "OFF" if value_json.value == 0 else "ON" }}',
    brightness_command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_6/targetValue/set',
    brightness_scale: 99,
    brightness_state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_6/currentValue',
    brightness_value_template: '{{ value_json.value }}',
    on_command_type: 'brightness',
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/wallwand/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node25', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'WallWand touch panel (WallWand)',
      name: 'lab-wallwand',
      sw_version: '1.48'
    },
    name: 'lab-wallwand_dimmer_6',
    unique_id: 'zwavejs2mqtt_0xe98f251e_25-38-6-currentValue'
  },
  discoveryTopic: 'light/lab-wallwand/dimmer_6/config',
  values: [ '38-6-currentValue', '38-6-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}
2024-09-16 16:52:47.334 DEBUG GATEWAY: Publishing discovery: {
  type: 'light',
  object_id: 'dimmer_7',
  discovery_payload: {
    command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_7/targetValue/set',
    state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_7/currentValue',
    state_value_template: '{{ "OFF" if value_json.value == 0 else "ON" }}',
    brightness_command_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_7/targetValue/set',
    brightness_scale: 99,
    brightness_state_topic: 'zwave/lab/wallwand/switch_multilevel/endpoint_7/currentValue',
    brightness_value_template: '{{ value_json.value }}',
    on_command_type: 'brightness',
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/lab/wallwand/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xe98f251e_node25', [length]: 1 ],
      manufacturer: 'TouchWand Co., Ltd.',
      model: 'WallWand touch panel (WallWand)',
      name: 'lab-wallwand',
      sw_version: '1.48'
    },
    name: 'lab-wallwand_dimmer_7',
    unique_id: 'zwavejs2mqtt_0xe98f251e_25-38-7-currentValue'
  },
  discoveryTopic: 'light/lab-wallwand/dimmer_7/config',
  values: [ '38-7-currentValue', '38-7-targetValue', [length]: 2 ],
  persistent: false,
  ignoreDiscovery: false
}

@zeev-mindali
Copy link
Author

this is my problem, the wallwand is not a dimmer, it's a cover :(

@robertsLando
Copy link
Member

@zeev-mindali the wallwand has multiple endpoints (13), could you do another export of the node please like you did here: #3862 (comment) ?

@zeev-mindali
Copy link
Author

here are logs, i attached only the wallwand
z-ui_current.log
zwavejs_current.log

@robertsLando robertsLando reopened this Sep 17, 2024
@robertsLando
Copy link
Member

@zeev-mindali those are the logs, I need an export of the node like you did hre: #3862 (comment)

@zeev-mindali
Copy link
Author

@robertsLando
Copy link
Member

@zeev-mindali are ALL dimmers above covers? Because some are reporting specific_type_basic_wall_controller and others specific_type_motor_multiposition. While the second is self explanatory the fist I'm not sure if should be alwats considered a cover

@zeev-mindali
Copy link
Author

the controller have two multi level switch:

  1. multiposition motor.
  2. long/short switch , which is virtual switch which long press (3 seconds) makes it's true, for not make action accedently.

@robertsLando
Copy link
Member

@zeev-mindali wait for 9.19.1, will release it the end of the week

@zeev-mindali
Copy link
Author

Dear @robertsLando ,

any news on the release?

@robertsLando
Copy link
Member

Coming in one hour :)

@zeev-mindali
Copy link
Author

Dear @robertsLando ,

first of all it's recognize the cover :)
but there is a strange problem with the stop command.
while the percentage and therefor the up/down is made in mqtt :
zwave/bedrom/ww_left/switch_multilevel/endpoint_1/targetValue/set
0

for stoping the device the mqtt path is diffrent:
zwave/bedrom/ww_left/switch_multilevel/endpoint_1/Down/set
false

this happing on the two multilevel switch , the GlassPanel 9 by MCO home and WallWand by touchwand.

i sent the mqtt command and paths, and it's working when i sent to Up or Down the false as value.

@robertsLando
Copy link
Member

@AlCalzone does all covers have up and down commands?

@AlCalzone
Copy link
Member

AlCalzone commented Sep 24, 2024

Bit of confusion here.

First off, all Multilevel Switches support being opened/closed/dimmed up/dimmed down using Start/StopLevelChange.
They can also be set to a specific value/position using target value.

The two MQTT topics @zeev-mindali mentions are a mix of both.

  • .../switch_multilevel/endpoint_1/targetValue/set <value> means go to position <value>
  • .../switch_multilevel/endpoint_1/Down/set false means stop moving

That is fine, but this would be more consistent:

  • .../switch_multilevel/endpoint_1/Up/set true to start opening
  • .../switch_multilevel/endpoint_1/Down/set true to start closing
  • .../switch_multilevel/endpoint_1/Up/set false or .../switch_multilevel/endpoint_1/Down/set false to stop moving

"Up" and "Down" may also be called differently, based on which type of multilevel switch you're dealing with.

@zeev-mindali
Copy link
Author

@AlCalzone

you are correct :)
the up/down is for open close dim up dim down and stop (but in dimming is little problematic with the timing to stop, prefer dali for dimming)

the targetValue is for position setup

@robertsLando
Copy link
Member

@zeev-mindali could you share the discovery payload?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
3 participants