Bulk update lock codes using setMany

I have a Z-wave Schlage BE469ZP that I’m setting multiple user codes on every 30 seconds triggered when otp sensors change codes. I’d like to bulk update user codes using the setMany method but keep getting this error:

Failed to call service zwave_js.invoke_cc_api. Endpoint(node_id=5, index=0) - FailedZWaveCommand: zwave_error: Z-Wave error 322 - codes has the wrong type (ZW0322)

I can’t for the life of me figure out the correct syntax for this command. This is what I believe should work:

service: zwave_js.invoke_cc_api
target:
  entity_id: lock.front_door
data:
  command_class: 99
  method_name: setMany
  parameters: [[1, 1, "111111"]]

I’ve confirmed that the set command works successfully:

service: zwave_js.invoke_cc_api
target:
  entity_id: lock.front_door
data:
  command_class: 99
  method_name: set
  parameters: [1, 1, "111111"]

UserCodeCCSetOptions type is an object, so the method takes a list/array of objects, not a list/array of the individual parameters.

service: zwave_js.invoke_cc_api
target:
  entity_id: lock.front_door
data:
  command_class: 99
  method_name: setMany
  parameters:
    - - userId: 1
        userIdStatus: 1
        userCode: "111111"

I’ve tried that as well, but get the same error :frowning:

It’s not the same error. The syntax error has been solved. Your device just does support the required Z-Wave command.

The Extended User Code Set Command was added to User Code Command Class V2. If your device only supports V1, you cannot use setMany.

1 Like

Thank you! I didn’t notice the different error message. I’ll have to try and find a different lock that supports User Code Command Class V2