Skip to content
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

resolves #7 support delta pro #19

Merged
merged 16 commits into from
Aug 15, 2024
Merged

resolves #7 support delta pro #19

merged 16 commits into from
Aug 15, 2024

Conversation

rustyy
Copy link
Owner

@rustyy rustyy commented Aug 15, 2024

Adds delta pro support by providing a dedicated class

Introduced a new module to handle Delta Pro serial number validation using Zod. This includes a schema that enforces serial numbers to start with "DCABZ" and type-checking utilities.
Created schemas for setting various DeltaPro configurations like X-Boost switch, car charger, charge level, discharge level, car input current, beep switch, screen brightness, and smart generator auto-on. Each schema includes detailed validation based on the corresponding command parameters.
Introduced schemas for various deltaPro set commands, including smart generator auto off, unit timeout, screen timeout, AC standby time, AC charging settings, PV charging type, and bypass AC auto start.
This commit introduces a new file, `getProperties.ts`, defining a comprehensive schema using zod for DeltaPro properties. It includes numerous fields related to system metrics, health status, and configurations, each with appropriate data type validation.
This commit introduces the export for the deltaPro schema in the index file. This ensures that deltaPro can be used throughout the application as part of the schemas package. Other exports remain unchanged.
Introduced Delta Pro class with validation for serial numbers. Updated DeviceFactory and respective tests to ensure proper creation and handling of Delta Pro instances.
…ptional.

Updated the 'mppt.reserved' and 'pd.brightnessLevel' fields to be optional in the deltaPro schema. Original data did not include these fields.
Introduced methods `enableXboost` and `enableCharger` to the DeltaPro class. Updated tests for the new methods and included additional validation for API response parsing.
Implemented `setMaxChargeLevel` method in DeltaPro to specify maximum charge level. Added corresponding test to ensure proper functionality and schema validation.
Implemented new methods for various device settings like AC charging power, beep, screen timeout, and smart generator thresholds. Updated corresponding tests to ensure these methods work correctly and included renaming `setMaxChargeLevel` to `setChargeLevel`.
Included detailed usage examples for the Delta Pro device in the TypeScript code and updated the README accordingly. These changes demonstrate how to enable features and set various configurations using the client library.
Deleted redundant changeset files and consolidated updates into a single changeset for the addition of delta pro support. This ensures cleaner version tracking and avoids duplicate entries.
@rustyy rustyy linked an issue Aug 15, 2024 that may be closed by this pull request
@rustyy rustyy changed the base branch from main to development August 15, 2024 19:27
@rustyy rustyy merged commit c6dde9e into development Aug 15, 2024
2 checks passed
@rustyy rustyy deleted the 7-support-delta-pro branch August 15, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Delta Pro
1 participant