-
-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: convert all Z-Wave specific configs except devices and manufacturers into code #6925
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlCalzone
changed the title
refactor: move everything but device configs into code
refactor: convert all Z-Wave specific configs except device configs and manufacturers into code
Jun 13, 2024
AlCalzone
force-pushed
the
internalize-scales-and-sensors
branch
from
June 13, 2024 20:58
445a887
to
d96d705
Compare
AlCalzone
force-pushed
the
internalize-scales-and-sensors
branch
from
June 13, 2024 21:22
d96d705
to
7475f1b
Compare
AlCalzone
changed the title
refactor: convert all Z-Wave specific configs except device configs and manufacturers into code
refactor: convert all Z-Wave specific configs except devices and manufacturers into code
Jun 14, 2024
Closed
AlCalzone
added a commit
that referenced
this pull request
Jun 17, 2024
…facturers into code (#6925)
AlCalzone
added a commit
that referenced
this pull request
Jun 17, 2024
…facturers into code (#6925)
AlCalzone
added a commit
that referenced
this pull request
Jun 21, 2024
…facturers into code (#6925)
AlCalzone
added a commit
that referenced
this pull request
Jun 24, 2024
…facturers into code (#6925)
AlCalzone
added a commit
that referenced
this pull request
Jul 5, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949)
AlCalzone
added a commit
that referenced
this pull request
Jul 5, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748)
AlCalzone
added a commit
that referenced
this pull request
Jul 5, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748)
AlCalzone
added a commit
that referenced
this pull request
Jul 9, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748)
AlCalzone
added a commit
that referenced
this pull request
Jul 11, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) * "Master Code" was renamed to "Admin Code" (#6995) ### Config file changes * Update Zooz ZEN30 to latest revisions (#6630) * Support MCO Home MH-S412 parameters properly (#6623) * Add Ring Flood Freeze Sensor (#6970) * Override user code count for Yale ZW2 locks to expose admin code (#6528) * Add GDZW7-ECO Ecolink 700 Series Garage Door Controller (#6572) * Correct label for Remote 3-Way Switch parameter on Zooz ZEN32 (#6871) * Add UltraPro 700 Series Z-Wave In-Wall Smart Dimmer (#6904) * Add Yale Assure 2 Biometric Deadbolt locks (#6972) * Add iDevices In-Wall Smart Dimmer (#5521) * Support Comet parameters properly (#6583) * Update label of Nortek GD00Z-6, -7, -8 (#6991) * Disable Supervision for Zooz ZSE11 (#6990) * Clarify parameters and units for Everspring AN158 (#6364) * Force-add support for Multilevel Switch CC to FGRM-222, remove Binary Switch CC (#6986) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748) * Fixed some minor issues found by code scanning (#6992) * Fixed an issue where `yarn codefind` was loading no source files (#6993) * Fixed an issue where `import(...)` types with absolute paths could appear in in CC docs (#6996)
AlCalzone
added a commit
that referenced
this pull request
Jul 15, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) * "Master Code" was renamed to "Admin Code" (#6995) ### Features * `mock-server` now supports communication with endpoints (#7005) ### Config file changes * Update Zooz ZEN30 to latest revisions (#6630) * Support MCO Home MH-S412 parameters properly (#6623) * Add Ring Flood Freeze Sensor (#6970) * Override user code count for Yale ZW2 locks to expose admin code (#6528) * Add GDZW7-ECO Ecolink 700 Series Garage Door Controller (#6572) * Correct label for Remote 3-Way Switch parameter on Zooz ZEN32 (#6871) * Add UltraPro 700 Series Z-Wave In-Wall Smart Dimmer (#6904) * Add Yale Assure 2 Biometric Deadbolt locks (#6972) * Add iDevices In-Wall Smart Dimmer (#5521) * Support Comet parameters properly (#6583) * Update label of Nortek GD00Z-6, -7, -8 (#6991) * Disable Supervision for Zooz ZSE11 (#6990) * Clarify parameters and units for Everspring AN158 (#6364) * Force-add support for Multilevel Switch CC to FGRM-222, remove Binary Switch CC (#6986) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748) * Fixed some minor issues found by code scanning (#6992) * Fixed an issue where `yarn codefind` was loading no source files (#6993) * Fixed an issue where `import(...)` types with absolute paths could appear in in CC docs (#6996)
AlCalzone
added a commit
that referenced
this pull request
Jul 15, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) * "Master Code" was renamed to "Admin Code" (#6995) ### Features * `mock-server` now supports communication with endpoints (#7005) ### Config file changes * Update Zooz ZEN30 to latest revisions (#6630) * Support MCO Home MH-S412 parameters properly (#6623) * Add Ring Flood Freeze Sensor (#6970) * Override user code count for Yale ZW2 locks to expose admin code (#6528) * Add GDZW7-ECO Ecolink 700 Series Garage Door Controller (#6572) * Correct label for Remote 3-Way Switch parameter on Zooz ZEN32 (#6871) * Add UltraPro 700 Series Z-Wave In-Wall Smart Dimmer (#6904) * Add Yale Assure 2 Biometric Deadbolt locks (#6972) * Add iDevices In-Wall Smart Dimmer (#5521) * Support Comet parameters properly (#6583) * Update label of Nortek GD00Z-6, -7, -8 (#6991) * Disable Supervision for Zooz ZSE11 (#6990) * Clarify parameters and units for Everspring AN158 (#6364) * Force-add support for Multilevel Switch CC to FGRM-222, remove Binary Switch CC (#6986) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748) * Fixed some minor issues found by code scanning (#6992) * Fixed an issue where `yarn codefind` was loading no source files (#6993) * Fixed an issue where `import(...)` types with absolute paths could appear in in CC docs (#6996)
AlCalzone
added a commit
that referenced
this pull request
Jul 16, 2024
### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) * "Master Code" was renamed to "Admin Code" (#6995) ### Features * `mock-server` now supports communication with endpoints (#7005) ### Config file changes * Update Zooz ZEN30 to latest revisions (#6630) * Support MCO Home MH-S412 parameters properly (#6623) * Add Ring Flood Freeze Sensor (#6970) * Override user code count for Yale ZW2 locks to expose admin code (#6528) * Add GDZW7-ECO Ecolink 700 Series Garage Door Controller (#6572) * Correct label for Remote 3-Way Switch parameter on Zooz ZEN32 (#6871) * Add UltraPro 700 Series Z-Wave In-Wall Smart Dimmer (#6904) * Add Yale Assure 2 Biometric Deadbolt locks (#6972) * Add iDevices In-Wall Smart Dimmer (#5521) * Support Comet parameters properly (#6583) * Update label of Nortek GD00Z-6, -7, -8 (#6991) * Disable Supervision for Zooz ZSE11 (#6990) * Clarify parameters and units for Everspring AN158 (#6364) * Force-add support for Multilevel Switch CC to FGRM-222, remove Binary Switch CC (#6986) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748) * Fixed some minor issues found by code scanning (#6992) * Fixed an issue where `yarn codefind` was loading no source files (#6993) * Fixed an issue where `import(...)` types with absolute paths could appear in in CC docs (#6996)
AlCalzone
added a commit
that referenced
this pull request
Jul 17, 2024
### Application compatibility Home Assistant users who manage `zwave-js-server` themselves, **must** install the following upgrades before upgrading to this driver version: * Home Assistant **TBD** or higher * `zwave-js-server` **1.37.0** ### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v13) * Align Meter CC Reset v6 with specifications, add mocks, add API for report commands (#6921) * Convert all Z-Wave specific configs except devices and manufacturers into code, move from ConfigManager methods to utility functions (#6925, #6929, #7023) * Remove `ZWaveApplicationHost` dependency from `CommandClass.toLogEntry()` (#6927) * Removed some deprecated things (#6928) * Replace `Controller.isAssociationAllowed` with `Controller.checkAssociation` (#6935) * Fixed health checks for ZWLR nodes, throw when requesting neighbors (#6939) * The repo now uses Yarn 4 and Corepack to manage its dependencies (#6949) * "Master Code" was renamed to "Admin Code" (#6995) ### Features * `mock-server` now supports communication with endpoints (#7005) ### Bugfixes * Reset aborted flags when starting link reliability or route health check (#7022) ### Config file changes * Update Zooz ZEN30 to latest revisions (#6630) * Support MCO Home MH-S412 parameters properly (#6623) * Add Ring Flood Freeze Sensor (#6970) * Override user code count for Yale ZW2 locks to expose admin code (#6528) * Add GDZW7-ECO Ecolink 700 Series Garage Door Controller (#6572) * Correct label for Remote 3-Way Switch parameter on Zooz ZEN32 (#6871) * Add UltraPro 700 Series Z-Wave In-Wall Smart Dimmer (#6904) * Add Yale Assure 2 Biometric Deadbolt locks (#6972) * Add iDevices In-Wall Smart Dimmer (#5521) * Support Comet parameters properly (#6583) * Update label of Nortek GD00Z-6, -7, -8 (#6991) * Disable Supervision for Zooz ZSE11 (#6990) * Clarify parameters and units for Everspring AN158 (#6364) * Force-add support for Multilevel Switch CC to FGRM-222, remove Binary Switch CC (#6986) * Add ZVIDAR Z-PI 800 Series PI Module (#7018) ### Changes under the hood * Upgrade to TypeScript 5.5 (#6919) * The root `tsconfig.json` is now set up in "solution-style", which should improve the goto references functionality. In addition, linting, testing and running locally no longer requires all modules to be compiled first. (#6748) * Fixed some minor issues found by code scanning (#6992) * Fixed an issue where `yarn codefind` was loading no source files (#6993) * Fixed an issue where `import(...)` types with absolute paths could appear in in CC docs (#6996)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Historically the
ConfigManager
was used to parse Z-Wave specific definitions like Indicators, Scales, Meter types, etc. from disk. However it was found that Z-Wave JS updates at a much higher frequency than the Z-Wave specifications, so being able to statically reference certain definitions in code is far more useful than the possibility of updating config files outside of a driver update.This PR refactors all Z-Wave specific JSON config files that are not device configurations or manufacturer IDs into code.
Breaking changes
The following files have been removed from the
config
directory:deviceClasses.json
,indicators.json
,meters.json
,scales.json
,sensorTypes.json
. If you used them in custom configuration, those are no longer needed.All types/methods below are exported from
@zwave-js/core
. The corresponding exports from@zwave-js/config
have been removed.Device Classes
BasicDeviceClass
is now an enum. "Slave" has been renamed to "End Node", "Routing Slave" to "Routing End Node". To get the corresponding string of a basic device class, usegetEnumMemberName(BasicDeviceClass, value)
.GenericDeviceClass
andSpecificDeviceClass
are no longer class instances, but simple objects.All methods related to device classes have been removed from
ConfigManager
. To look up a generic/specific device class, use thegetGenericDeviceClass
orgetSpecificDeviceClass
functions.The constructor of the
DeviceClass
class no longer takes an instance of aConfigManager
.All instances where the basic device class is used are now typed with the
BasicDeviceClass
enum. This include node mocks, NIF, Z-Wave Protocol CC, and several serial API commands.Indicators
Defined indicators are now exposed via the
Indicator
enum. To get the corresponding string of an indicator ID, usegetEnumMemberName(Indicator, indicatorId)
.IndicatorProperty
is no longer a class instance, but a simple object.All methods related to indicators have been removed from
ConfigManager
. To look up an indicator property and its information, use thegetIndicatorProperty
function. This is strongly typed, so you should see the indicator property information in your IDE at compile time.Meters
Meter
andMeterScale
are no longer class instances, but simple objects.MeterScale
now has an additionalunit
field.All methods related to meters have been removed from
ConfigManager
. To look up a meter or meter scale, use thegetMeter
orgetMeterScale
functions. These are strongly typed, so you should see the definitions in your IDE at compile time.Sensors and Scales
Scale
is no longer a class instances, but a simple object.SensorType
is now calledSensor
and also just a simple object type.All named scales (e.g. "temperature") now have their type derived from the specific scale definition.
All methods related to sensors and scales have been removed from
ConfigManager
. To look up a sensor or scale, use thegetSensor
orgetSensorScale
functions. To look up a group of named scales or a specific one, usegetNamedScaleGroup
orgetNamedScale
. All of these are strongly typed, so you should see the definitions in your IDE at compile time.Notifications
The types for notification definitions have been reworked and are all simple object types now instead of class instances. Applications might interact with the following ones:
Notification
: The definition for a single notification type, with all its variables and eventsNotificationVariable
: The definition for a (stateful) notification variable, which can have multiple states defined byNotificationState
NotificationEvent
: The definition for a (stateless) notification eventNotificationValue
: A generic notification value that can either be a state or an eventNotificationParameter
: A union of the possible notification parameter types, namelyNotificationParameterWithDuration
,NotificationParameterWithCommandClass
,NotificationParameterWithValue
,NotificationParameterWithEnum
. These can be distinguished by theirtype
property.All methods related to notifications have been removed from
ConfigManager
. To look up a notification or value, use thegetNotification
orgetNotificationValue
functions.getNotificationValue
needs access to the object returned bygetNotification
.