Hi. A while back, with some help from this discord, I built a custom driverFunction class (with an associated script) to built a custom CommandClass to set the button labels on a device I have. It worked great for a long time, but at some point (not clear when) it stopped working. Looking at that zjs logs, I see this:
2024-12-29 15:28:29.029 INFO Z-WAVE: Calling api driverFunction with args: [ 'const { logger, zwaveClient, require } = this; const { CommandClass } = require("@zwave-js/cc"); const cc = new CommandClass(driver, {nodeId: 139, ccId: 0x92, ccCommand: 2, payload: Buffer.concat([Buffer.from([ 0x39, 0, 0x00, 9 ]), Buffer.from("Lights On") ]) }); await driver.sendCommand(cc);', [length]: 1 ] 2024-12-29 15:28:29.030 INFO Z-WAVE: No command class defined for CommandClass! (ZW0300) driverFunction undefined 2024-12-29 15:28:29.030 INFO MQTT: Message received on zwave/_CLIENTS/ZWAVE_GATEWAY-Mosquitto/api/driverFunction: '{"success":false,"message":"No command class defined for CommandClass! (ZW0300)","args":["const { logger, zwaveClient, require } = this; const { CommandClass } = require(\\"@zwave-js/cc\\"); const cc = new CommandClass(driver, {nodeId: 139, ccId: 0x92, ccCommand: 2, payload: Buffer.concat([Buffer.from([ 0x39, 0, 0x00, 9 ]), Buffer.from(\\"utside On\\") ]) }); await driver.sendCommand(cc);"],"origin":{"args":["const { logger, zwaveClient, require } = this; const { CommandClass } = require(\\"@zwave-js/cc\\"); const cc = new CommandClass(driver, {nodeId: 139, ccId: 0x92, ccCommand: 2, payload: Buffer.concat([Buffer.from([ 0x39, 0, 0x00, 9 ]), Buffer.from(\\"Lights On\\") ]) }); await driver.sendCommand(cc);"]}}'
Unfortunately, it's been quite a while since I worked this all out and I didn't document it well (of course), but is it clear to anyone what's changed/what went wrong?
In case it helps, very similar code used to fail a different way and the devs kindly fixed the bug: https://github.com/zwave-js/node-zwave-js/issues/5586