From 523f5380af1ec45e7ee4ce7a4168e7265c944228 Mon Sep 17 00:00:00 2001 From: Z-Wave JS Bot Date: Wed, 30 Oct 2024 09:17:19 +0000 Subject: [PATCH] feat(config): import config files from zwa --- .../config/devices/0x0189/za-116001.json | 91 +++++++++++++++++++ packages/config/src/LogicParser.ts | 33 +++---- 2 files changed, 104 insertions(+), 20 deletions(-) create mode 100644 packages/config/config/devices/0x0189/za-116001.json diff --git a/packages/config/config/devices/0x0189/za-116001.json b/packages/config/config/devices/0x0189/za-116001.json new file mode 100644 index 000000000000..2ca3edb95c6d --- /dev/null +++ b/packages/config/config/devices/0x0189/za-116001.json @@ -0,0 +1,91 @@ +{ + "manufacturer": "Ness Corporation Pty, Ltd.", + "manufacturerId": "0x0189", + "label": "ZA-116001", + "description": "Ness Z-Wave Door Strike Controller", + "devices": [ + { + "productType": "0x0204", + "productId": "0x0101", + "zwaveAllianceId": 4520 + } + ], + "firmwareVersion": { + "min": "0.0", + "max": "255.255" + }, + "associations": { + "1": { + "label": "Lifeline", + "maxNodes": 5, + "isLifeline": true + } + }, + "paramInformation": [ + { + "#": "1", + "label": "The Relock Timer", + "description": "0", + "valueSize": 2, + "minValue": 0, + "maxValue": 300, + "defaultValue": 10, + "unsigned": true + }, + { + "#": "2", + "label": "Function Options For Input Terminal Sw1", + "description": "0", + "valueSize": 1, + "minValue": 0, + "maxValue": 3, + "defaultValue": 2, + "unsigned": true + }, + { + "#": "3", + "label": "Function Options For Input Terminal Sw2", + "description": "0", + "valueSize": 1, + "minValue": 0, + "maxValue": 3, + "defaultValue": 3, + "unsigned": true + }, + { + "#": "4", + "label": "Battery Low Setting", + "description": "0", + "valueSize": 1, + "minValue": 10, + "maxValue": 50, + "defaultValue": 10, + "unsigned": true + }, + { + "#": "5", + "label": "Battery Scheduled Report Interval", + "description": "0", + "valueSize": 1, + "minValue": 0, + "maxValue": 120, + "defaultValue": 12, + "unsigned": true + }, + { + "#": "6", + "label": "The 12v Dc Power Output Options", + "description": "0", + "valueSize": 1, + "minValue": 0, + "maxValue": 1, + "defaultValue": 0, + "unsigned": true + } + ], + "metadata": { + "inclusion": "To add the device into the Z-Wave™ network:\n1) Power on device and ensure it has been factory defaulted.\n2) Set the primary controller into inclusion mode.\n3) Click the Action Button once the device enters the inclusion mode and the Red LED starts fast flashing.\nNote: Inclusion mode can be cancelled by clicking the Action Button once again before the device starts the learning process (controller has not yet started inclusion mode), the device exits the learning mode and Red LED stops fast flash.\n4) The inclusion is processing. \n5) If your Z-Wave controller supports S2 Access encryption and DSK, enter the first 5 digits of the DSK located at bottom of the QR image. \n6) If the inclusion is successful, the Red LED stops fast flashing and the Green LED turns on for 2 seconds", + "exclusion": "You may need to refer to your Z-Wave™ gateway’s instructions for removing devices.\nExclusion\nTo remove the device from the Z-Wave network:\n1) The device is powered \n2) Set the primary controller into exclusion mode.\n3) Click the Action Button once the device enters the inclusion mode and the Red LED starts fast flashing. Click the Action Button once again before the device starts the learning process (controller has not yet started inclusion mode), the device exits the learning mode and Red LED stops fast flash.\n4) If the exclusion is successful, the Red LED stops flashing and the Green LED turns on for 1 second", + "reset": "To Factory Default Ness Z-Wave DLC\nPlease use this procedure only when the network primary controller is missing or otherwise inoperable.\nReset the device to factory Default:\n1) The device is powered\n2) Press and hold the action button down for 20 seconds. When the action button has been held for greater than 3 seconds, the Red LED starts fast flash, and the Fast flash will stop after 20 seconds. Once the action button is released, the Green LED will turn on for 1 second indicating that the device has been reset.\n3) Release the action button while the Red LED is fast flashing (before 20 seconds), the device reset will be cancelled, and the Red LED will stop fast flash" + } +} diff --git a/packages/config/src/LogicParser.ts b/packages/config/src/LogicParser.ts index 93ddb51354e1..a7ba7d7faa0a 100644 --- a/packages/config/src/LogicParser.ts +++ b/packages/config/src/LogicParser.ts @@ -86,13 +86,14 @@ const peggyParser: { parse: any; SyntaxError: any; DefaultTracer?: any } = // Ge // @ts-ignore var s = this.location.start; // @ts-ignore - var offset_s = (this.location.source - && (typeof this.location.source.offset - === "function")) - // @ts-ignore - ? this.location.source.offset(s) - // @ts-ignore - : s; + var offset_s = + (this.location.source + && (typeof this.location.source.offset + === "function")) + // @ts-ignore + ? this.location.source.offset(s) + // @ts-ignore + : s; // @ts-ignore var loc = this.location.source + ":" @@ -116,19 +117,11 @@ const peggyParser: { parse: any; SyntaxError: any; DefaultTracer?: any } = // Ge // @ts-ignore var hatLen = (last - s.column) || 1; // @ts-ignore - str += "\n --> " - + loc - + "\n" // @ts-ignore - + filler - + " |\n" // @ts-ignore - + offset_s.line - + " | " - + line - + "\n" // @ts-ignore - + filler - + " | " - + peg$padEnd("", s.column - 1, " ") // @ts-ignore - + peg$padEnd("", hatLen, "^"); + str += "\n --> " + loc + "\n" // @ts-ignore + + filler + " |\n" // @ts-ignore + + offset_s.line + " | " + line + "\n" // @ts-ignore + + filler + " | " + peg$padEnd("", s.column - 1, " ") // @ts-ignore + + peg$padEnd("", hatLen, "^"); // @ts-ignore } else { // @ts-ignore