Let's start talking about the new Z-wave JS integration

I have noticed unexpected behaviour in the UI when I turn a Z-Wave dimmer from ON to OFF.

When I turn the light off, the UI shows the following: The Light Icon changes from ON to OFF, then back to ON, then fades to OFF over a few seconds.

The Dimmer is recognised by the Z-Wave JS Integration and the “light” entity (on/off-switch icon) has been added to the UI. There are no other automations, scripts etc. related to this device.

I have posted the Z-Wave JS Debug logs below.

{'command': 'node.set_value',
 'messageId': 'd1738xxxxxxxxxxxxxxxxxxxxxxxxxx',
 'nodeId': 31,
 'value': 0,
 'valueId': {'ccVersion': 3,
             'commandClass': 38,
             'commandClassName': 'Multilevel Switch',
             'endpoint': 0,
             'metadata': {'label': 'Target value',
                          'max': 99,
                          'min': 0,
                          'readable': True,
                          'type': 'number',
                          'writeable': True},
             'property': 'targetValue',
             'propertyName': 'targetValue',
             'value': 0}}

2021-04-12 16:09:49 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":0,"prevValue":99,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:49 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 0
2021-04-12 16:09:49 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"result","success":true,"messageId":"d1738xxxxxxxxxxxxxxxxxxxxxxxxxx","result":{"success":true}}', extra='')

2021-04-12 16:09:50 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":81,"prevValue":0,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:50 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 81
2021-04-12 16:09:51 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":63,"prevValue":81,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:51 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 63
2021-04-12 16:09:52 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":27,"prevValue":63,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:52 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 27
2021-04-12 16:09:53 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":0,"prevValue":27,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:53 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 0
2021-04-12 16:09:54 DEBUG (MainThread) [zwave_js_server] Received message:
WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"node","event":"value updated","nodeId":31,"args":{"commandClassName":"Multilevel Switch","commandClass":38,"endpoint":0,"property":"currentValue","newValue":0,"prevValue":0,"propertyName":"currentValue"}}}', extra='')

2021-04-12 16:09:54 DEBUG (MainThread) [homeassistant.components.zwave_js.entity] [light.dimmer_spare_room] Value currentValue/None changed to: 0

Does anyone have an update on JS ability to set direct associations between z-wave devices?
I have asked on this forum and Reddit, and get the response ‘why not use ZwaveJS2Mqtt?’. No traffic found in Discord, and no responses to similar questions.

I have already set up with JS and this would require renaming everything. So I am hoping Associations are on the planned features list.

Any news?

This is normal and the behavior has been here for years with just about every zwave platform. Basically, you turn this off, home assistant polls the device, the device is still on (because it’s slowly turning off) and the UI jumps back to on and follows the hardware.

If you absolutely need to use it for something right now. Use zwavejs2mqtt and set your association, then flip back.

Otherwise you’ll have to wait for the control panel UI to evolve a bit more.

The set up for zwaveJS2mqtt requires deleting and reinstalling JS integration, and that requires renaming the nodes.

It most certainly does not require that.

1 Like

Hi Petro

Thanks for your feedback! I have used the older “built-in” Zwave for a couple of years and never noticed this UI behaviour before. Possibly this was due to the Dimmer changing from ON to OFF much faster (e.g. 1s) - so not having enough time to update the UI with the intermediate steps.

I experimented with all of the adjustable parameters in the Dimmer Switch, but have not been able to find any setting that changes the time taken to fade from ON to OFF. It seems like this is controlled by the Z-Wave JS plugin, since it works “normally” if I use my old backup of HA (with old built-in Zwave).

There’s nothing you can do. This was actually a bug in the old system. Zwave1.4 never verified that the action performed actually happened. I.e. it would just trust that the device was off. Now zwave js polls the device during turn off so that it can display the correct brightness to the UI. You can’t change this. You have to accept it or move back to the old integration.

1 Like

What brand/model of dimmer?

I am using the Qubino Dimmer ZMNHDD (FW 3.7).

I have tried adjusting parameter 68 (dimming duration), but this has no affect. Parameter 66 (dimming time when key pressed) appears to be the value that is used when the button in the UI is tapped.

I just updated my zwavejs2mqtt docker container to the latest version.

When I open the control panel I have a new “notification” icon I never noticed before in the top right.

ex

then when I click on it I get this window:

ex1

I click “install” and there s a pop up message that says that the API was called successfully but the notification never clears.

But I also noticed that I had to re-interview my node (1 node on a test instance) so I think something might have happened.

But, again, when I click on the info icon I see that I’m still on zwavejs 7.3.0. So it looks like nothing happened from that perspective.

in the debug screen I get this when click the install button:

Bug? Or am I missing something?

I’m having major problems with my Philio devices (PST02A and PST02C). None of them report movement or open/close. In the (now expanded) log I’m seeing this:

2021-05-01T14:14:48.854Z DRIVER « [Node 038] [REQ] [ApplicationCommand] └─[MultiCommandCCCommandEncapsulation] 2021-05-01T14:14:48.859Z DRIVER Received a command that contains multiple CommandClasses. This is not supporte d yet! Discarding the message... 2021-05-01T14:14:48.861Z CNTRLR « [Node 038] TODO: no handler for application command 2021-05-01T14:14:53.995Z SERIAL « 0x010f00040012097105000000ff0708006b (17 bytes)

Are the Philio devices not supported yet?

upon running a script switching off a zwave switch, I keep getting this error, which points to this in the code:

Logger: homeassistant.core
Source: components/zwave_js/switch.py:74
First occurred: 8:30:53 PM (1 occurrences)
Last logged: 8:30:53 PM

Error executing service: <ServiceCall switch.turn_off (c:ca59b8689af655295f1ab5065c72717e): entity_id=['switch.dorm_studenten']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1497, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 726, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/switch.py", line 74, in async_turn_off
    await self.info.node.async_set_value(target_value, False)
  File "/usr/local/lib/python3.8/site-packages/zwave_js_server/model/node.py", line 375, in async_set_value
    result = await self.async_send_command(
  File "/usr/local/lib/python3.8/site-packages/zwave_js_server/model/node.py", line 354, in async_send_command
    result = await self.client.async_send_command(message, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/zwave_js_server/client.py", line 73, in async_send_command
    return await future
zwave_js_server.exceptions.FailedCommand: Command failed: unknown_error

and I cant figure out what’s wrong. the switch.dorm_studenten exists alright, and this is the script:

switch_dorm_studenten_off:
  alias: Switch Dorm Studenten off
  mode: restart
  sequence:
    - service: switch.turn_off
      entity_id: switch.dorm_studenten
    - condition: state
      entity_id: input_boolean.notify_developing
      state: 'on'
    - service: notify.system
      data:
        message: >
          {{as_timestamp(now())|timestamp_custom('%X')}}: Dorm Studenten switched off

It is called by a few other scripts and presence setting, but given the fact the service turn_off is called, I know for a fact that has been ok up to this point.

Please anyone have a look to see what error this is, and if I have a Zwave issue?

Odd thing is, I can manually select the script in the services, and even then, it fails to execute half of the time. Even using the service switch.turn_off and select the entity directly in the service tool fails frequently. The fact it doesn’t always at least shows the syntax etc is alright.

How come this is such an unreliable service?

thanks

If you have a good reference set of steps, please send. The ones that I have found show removing the JS integration and re-adding, and there are discussions of people adding the zwaveJS2mqtt claiming they had to rename all of the nodes.
I am willing to give it a try, if renaming is not required. I am ok with breaking some things (now working through a change made via Silabs zwave pc controller), but don’t want to break this.
Thanks for any recommendations you have.

  1. Stop addon
  2. Start zwavejs2mqtt addon
  3. Do your thing
  4. Stop zwavejs2mqtt
  5. Start orginal addon

I think my confusion is not that part, but rather installing zwavejs2mqtt add-on. The instructions I find (both in writing and youtube) show deleting the JS integration and re-installing and changing the ws location.

Clearly wrong, you may need to go in like you’re adding a second zwave-js integration, but this just allows you to reconfigure the original zwave-js integration. I am sure the helpful guys in #addons on Discord can assist as needed.

I recently went through this process. You do indeed install the mqtt piece, turn off zwave js, and start the mqtt addon. Depending on your number of devices, it may take awhile for all the devices to be interviewed. Afterwards I did have to repair some assorted battery powered devices and those that were security paired.

There is a small catch to migrating from the Zwave_JS addon to the ZwaveJS2MQTT that can be confusing. I just did this myself.

By default, the Zwave_JS integration will try to automatically install the Zwave_JS addon at boot if it is not already installed. This is an issue if you are trying to run the ZwaveJS2MQTT addon instead. Unfortunately, this config option is only available at integration setup, but there is a solution:

You can “reinstall” the Zwave JS integration without uninstalling it first. This will allow you to update that setting without disturbing your existing zwave JS devices/entities. So follow these steps:

  1. Create a Snapshot backup of your HA install as a safety precaution.
  2. In Configurations > Integrations, choose “Add Integration” and select Zwave JS (Do not remove the existing version).
  3. In the configuration options, make sure to uncheck the “Automatically Install Addon” option.
  4. Get the full path of your Zwave Device, and the Network Key used in the Zwave JS Addon.
  5. Stop the Zwave JS Addon
  6. Add the ZwaveJS2MQTT addon on and configure it to use the same device path and network key as the Zwave JS addon. You can also disable the MQTT Gateway if you like.
  7. Restart the ZwaveJS2MQTT addon with the new settings, and you should see all your zwave devices, but listed as “unknown” types in the ZwaveJS2MQTT addon webui.
  8. All the devices should automatically start re-interviewing to get their device info (this can take quite a while), but if they don’t, you can manually trigger any device to reinterview by hitting the “advanced” button in the device details expander.
  9. Once you are sure the new addon is working correctly, remove the other Zwave JS addon.
  10. I don’t have any devices that are connected with secure associations, so its possible those have to be resetup, I’m not sure.

Good luck!

Anyone having issues with Zwave entities after updating HA 2021.5 and ZwaveJS 7.3.0?
Since the update, I have several of my zwave entities changed to “assumed_state”, and can not remove the assumed state via customization. It happened to some but not all of the same zwave node types - so I doesn’t appear to be node type related.