Send Manufacturer Proprietary command

I have a few old Leviton 4-zone controllers

They currently have basic support in zwave-js of assigning targets to groups
so pressing the rockers turns things on and off.

But the rockers also have LEDs that my old Vera1 was able to control to reflect the
state of assigned target. There is currently no support for that in zwave-js.

I’d like to give it a shot and add the support for it (I have some time and decades of systems software engineering experience). Unless this is a quick fix for maintainers :slight_smile:

I have found implementations in other products that all indicate that it’s the matter of sending the following Manufacturer Proprietary command (0x91):

[“91”, “00”, “1D”, “0D”, “01”, “FF”, X, “00”, “00”, “0A”]

where X is the bitmap of colors for each of the 4 rockers:

MSB RRRRGGGG LSB
    43214321 corresponding button number

So RG bits for each button represent what color it supposed to be:
0=off, 1=green, 2=red, 3=orange

Furthermore, it looks like zwave-js already has support for sending Manufacturer Proprietary CC:

using sendData API.

So it looks like it’s just a matter of creating new Service, perhaps
zwave_js.set_leviton_controller_led that would take X value and invoke zwave-js sendData with the constructed data buffer per above.

I also saw zwave_js.invoke_cc_api but it looks like you can only send values of 1, 2 or 4 bytes?

I guess I’m looking for a bit of guidance here to tell me if I’m completely off or otherwise point me in the right direction on how to get started implementing this.

Thank you

Try this service code. Copy/paste into the dev tools and select your device/entity. Replace X with your value.

service: zwave_js.invoke_cc_api
data:
  command_class: "145"    # 0x91 Manufacturer Proprietary CC
  method_name: sendData
  parameters:
    - 29  # manufacturerId = 0x001D (Leviton)
    - type: Buffer  # data = Buffer of mfg data
      data:
        - 13    # 0x0D
        - 1     # 0x01
        - 255   # 0xFF
        - X     # "X"
        - 0     # 0x00
        - 0     # 0x00
        - 10    # 0x0A

It worked! Thank you so much!

1 Like

Your easiest path from here, if you want something simpler to use from automations, is probably to write a script that issues this command, and you can supply the LED values as script arguments.

If you wanted first class support for this, i.e. some entity that controls the LEDs instead of the command, you would need to implement support in node-zwave-js and HA.

See:

Thanks, will try the script way first.

There is another interesting problem to solve here.

These controllers have direct association and scene association modes, per

When I used Vera, I’m pretty sure it configured them in direct association mode, because i was able to turn things on and off even when Vera was down, but LED propagation wouldn’t work in this case. When Vera was on, LED propagation would work, but with a noticeable delay – clearly through some logic in Vera.

The question is, if Vera configured direct associations, how did it know when rockers were pressed?

I enabled debug logging and all I can see when I press rockers is this event, which always carries the same payload, so clearly it’s not telling me specifically which rocker and which side was pressed:

2024-05-16T07:06:37.496Z SERIAL « 0x0115004984050f020100852d7c778273867291ef2b2cf1                    (23 bytes)
2024-05-16T07:06:37.498Z SERIAL » [ACK]                                                                   (0x06)
2024-05-16T07:06:37.500Z DRIVER « [Node 005] [REQ] [ApplicationUpdateRequest] payload: 0x050f020100852d7c778273867291ef2b2c
2024-05-16T07:06:37.501Z CNTRLR « [Node 005] Received updated node info
2024-05-16T07:06:37.502Z CNTRLR   [Node 005] Node does not send unsolicited updates; refreshing actuator and sensor values...

I guess I could create an automation that listens to this event. Upon receiving it refreshes all switches and updates LEDs on all rockers with direct association to those switches.

The thing that’s blocking me now, is how to listen to this event. What would be the trigger parameters based on the above event data?

This log you are showing is not an event that the application can listen for.

According to that issue link I posted, you need to configure scenes. https://github.com/zwave-js/node-zwave-js/issues/2397#issuecomment-1022739064.

Thank you for all your help. It works great. All of the feature I used to have with Vera, but way more responsive and LED propagation seems to work more reliably.

I uploaded all of the related code and instructions here:

One minor note, the script page states that
When the script is executed within an automation, the trigger variable is available.
but that doesn’t seem to be the case. You have to explicitly pass all of the trigger variable (or its parts) as parameters to the script.