LZW45 (light strip) drivers for home assistant?

Can anyone vouch for this?
Zwave JS Beta works for configuring parameters

Works for me. LED strip on my red dimmer turned red.

Same thing but in node red
image
image

Uh oh, cant set parameter 16 past 83823359, yet anyrthing using PULSE effect is higher than that and wont work. @Petro would this be a zwave_js bug report?

image

Are you using the correct mask with the call? What’s that log coming from, doesn’t look like HA

Can you explain this? Do I need to be doing something different as compared to OZW beta? I put this same value for parameter 16 in OZW beta and it works. Heres same command run through HA with error.

Ah ok, that info comes from the “drivers” or machine files. If you use numbers lower than that, does it work?

Yah anything under that 83823359 works

I’m having trouble locating the spec sheet for that param to verify the bytes.

A very ‘rough’ explanation is in the actual manual. But nothing explaining the bytes.

EDIT: I guess it doesn’t really matter because byte 4 is duration and 255 is infinite so the limit for that value should be 4294967295

EDIT2: So here’s the conundrum… ZwaveJS does not have the ability to set multiple byte masks at the same time, same with home assistant. If I were to change this, the zwave_js gentlemen would want me to make it a partial parameter. Effectively making it impossible to set through the native HA service. You’d have to use the MQTT bridge to do the setting.

I know @EricM_Inovelli had a google sheet somewhere, but I cant find now. @nathanfiscus made the toolbox that gives me the number so he must know the logic behind it

Hmmm so really even with the explanation it seems like it wont really help if Im understanding you.

well, you can get around it by using the MQTT set sendcommand call but it’s not easy to understand. That’s what I currently do for the LZW45. Setting the partial params all at once is coming but the ETA is unknown. It only seems to affect inovelli devices because the params reset to zero when you provide invalid settings.

How do you set LZW45 through MQTT? I tried but couldent get any change. Again, use nathan toolbox and setting up a simple fade to yellow, these are the parameters it tells me to set.

When I set these in MQTT, I see no change. (I see them change in my mqtt explorer)

Yes, that’s because those parameters do not accept partials. You can only set the entire parameter or nothing. So when ZwaveJS2MQTT separates them into the individual bitmasks, it doesn’t work because a partial byte sent to the device sets the full parameter to zero. I don’t know why inovelli does this but they do. My guess is that they want you to set the entire parameter so that you don’t get any goofy behavior when setting each bytemask in between.

To set the full parameter, I use the following script:

zwavejs2mqtt_mqtt_set_config_parameter:
  alias: Set Config Parameter to ZwaveJS2MQTT via MQTT
  description: Publishes to ZwaveJS2MQTT
  fields:
    node_id:
      description: Zwave Node Id
      example: 3
    parameter:
      description: Parameter to be set.
      example: 4
    value:
      description: Value to be set for the parameter
      example: 256
    bytes:
      description: Size of parameter (1, 2, or 4)
      example: 4
  variables:
    payload:
      args:
      - nodeId: "{{ node_id }}"
        commandClass: 112
        property: "{{ parameter }}"
      - set
      - "{{ [ parameter, value, bytes ] }}"
  sequence:
  - service: mqtt.publish
    data:
      topic: zwave/_CLIENTS/ZWAVE_GATEWAY-Mosquitto/api/sendCommand/set
      payload: "{{ payload | tojson }}"

If you look at my current github configuration, I have a whole set of scripts that handle all my lzw45s but it requires you to keep the MQTT connection. So right now, I use websockets (Zwave JS Integration) for my devices, and I send the commands to the MQTT server.

image

So would I use that entire script to set just ONE of the FOUR parameters I need to set? So in the end, I would be running the script 4 times?

So parameter 22. Toolbox says to set it to 48, so using your script, I would have

zwavejs2mqtt_mqtt_set_config_parameter:
  alias: Set Config Parameter to ZwaveJS2MQTT via MQTT
  description: Publishes to ZwaveJS2MQTT
  fields:
    node_id: 11
      description: Zwave Node Id
      example: 3
    parameter: 22
      description: Parameter to be set.
      example: 4
    value: 48
      description: Value to be set for the parameter
      example: 256
    bytes: 4
      description: Size of parameter (1, 2, or 4)
      example: 4
  variables:
    payload:
      args:
      - nodeId: "{{ node_id }}"
        commandClass: 112
        property: "{{ parameter }}"
      - set
      - "{{ [ parameter, value, bytes ] }}"
  sequence:
  - service: mqtt.publish
    data:
      topic: zwave/_CLIENTS/ZWAVE_GATEWAY-Mosquitto/api/sendCommand/set
      payload: "{{ payload | tojson }}"

Add the script I posted to your scripts and the service call would just be:

  - service: script.zwavejs2mqtt_mqtt_set_config_parameter
    data:
      node_id: 11
      parameter: 22
      value: 48
      bytes: 4

Oh, gotcha. I’ve never used scripts before. I will give that a try. Thanks

So is your script setting the parameters via MQTT or natively through HA?

Your using ZWAVEJS2MQTT add-on with the Z Wave JS intergration but your NOT pointing the integration to the mqtt add-on as described in the config?

image

I’m pointing the Zwave JS integration at ZwaveJS2MQTT on port 3000. Turned off ‘Disable MQTT Gateway’. But I do not have MQTT discovery set to discovery ZwaveJS2MQTT so I only get entities from Zwave JS Integration. I use the MQTT Gateway to send the configuration parameters. It’s a very odd setup. You need to latch ZwaveJS2MQTT to an MQTT server by filling out the MQTT information in ZwaveJS2MQTT.

So how do I put the script into HA? What action type do I choose under Sequence heading?

For a premade script like that, in the upper right corner of add a script, there’s 3 dots. Click it and edit as yaml. Paste the script I wrote but do not include the first line (zwavejs2mqtt_mqtt_set_config_parameter:), just include everything else and then save.

Alright I did that. It named your script some random numbers for some reason, but whatever. So go to dev tools and run the service, as show in picture. I see the data come across MQTT.

But then when I tried to change the arguments to this, it doesnt change anything according to my MQTT browser. But the timestamp is updating to the time that I called the service.