Refactor device export command supporting now json and yaml export. Added device links data to device export and details command#52
Merged
darthsharp merged 18 commits intomainfrom Apr 29, 2026
Conversation
- Introduced `CcuCommandGroup` to group CCU-related commands in the CLI. - Enhanced `ShowDeviceDetailsCommand` with `CliCommand` attribute for better integration. - Added `ICcuBackupServiceBuilder` to support CCU backup handling. - Updated project dependencies and service registrations to include new functionality.
- Registered a named `HttpClient` ("CcuBackup") in `HomeMaticServiceCollectionExtensions`.
- Enables support for CCU backup handling via `ICcuBackupServiceBuilder`.
- Implemented `CcuBackupService` to handle HomeMatic CCU system backups via JSON-RPC and HTTP. - Added `CcuBackupServiceBuilder` for flexible service configuration based on host and credentials. - Introduced CLI support with the `CreateBackupCommand` and `CreateBackupOptions` for managing CCU backups directly from the command line. - Extended `HomeMaticServiceCollectionExtensions` to register CCU backup services.
- Deleted `CcuBackupService`, `CcuBackupServiceBuilder`, and related interfaces. - Removed `CreateBackupCommand`, `CreateBackupOptions`, and `CcuCommandGroup`. - Updated `HomeMaticServiceCollectionExtensions` to exclude CCU backup registration.
…method, and redundant device export logic
…ructure - Deleted deprecated `CliBaseCommand`, `CliCommandBase`, and associated CLI command implementations. - Introduced `DataOutputCommandBase` for a streamlined and reusable command structure. - Added new tests in `CreativeCoders.HomeMatic.Tools.Cli.Base.Tests` to validate `DataOutputCommandBase` behavior and functionality.
…property handling - Updated collection initializations to use concise syntax for readability. - Marked `DataOutputCommandBase` class with `[PublicAPI]` for better tooling support. - Removed redundant private field `_console` and replaced it with a direct property `Console`. - Consolidated YAML format handling in `DataOutputWriter`.
- Introduced `.serena/project.yml` with project-specific settings. - Configured C# as the primary language for the Serena language server. - Enabled gitignore integration and UTF-8 encoding as defaults. - Added placeholders for advanced project and tool configurations.
… unit tests - Introduced `Link` and `LinkInfo` classes to represent HomeMatic communication links. - Added `LinkFlags` and `GetLinksFlags` enums for link state and API filtering options. - Implemented extension methods in `HomeMaticXmlRpcApiLinkExtensions` for strongly-typed link operations. - Updated `IHomeMaticXmlRpcApi` with new methods: `GetLinksAsync`, `AddLinkAsync`, `RemoveLinkAsync`, `SetLinkInfoAsync`, and `ActivateLinkParamsetAsync`. - Added `CreativeCoders.HomeMatic.XmlRpc.Tests` project with comprehensive tests for the `Links` module, ensuring full coverage.
…ce` tests - Replaced `HomeMaticXmlRpcApiBuilderLinkSurfaceTests` with an extended `HomeMaticXmlRpcApiBuilderTests` suite for improved test clarity and edge case handling. - Added null argument checks and error scenario validations for `HomeMaticXmlRpcApiBuilder` and `HomeMaticXmlRpcApiLinkExtensions`. - Improved bitmask flag tests in `GetLinksFlagsTests` and `LinkFlagsTests` to ensure completeness. - Refactored test structure and added assertion comments for better readability.
…conversion tests - Deleted `GetLinksFlagsTests`, `LinkFlagsTests`, and `LinkTests` as they overlap with `FlagsMemberValueConverter` and API extension tests. - Added `FlagsMemberValueConverterRxModesTests` for comprehensive RxModes conversion testing. - Expanded `HomeMaticXmlRpcApiLinkExtensionsTests` and `HomeMaticXmlRpcApiBuilderTests` for new edge cases and error propagation validation.
…guration validation - Added `CcuClientLinkTests` and `CcuDeviceChannelLinkTests` for thorough validation of link operations. - Introduced `CompleteCcuDeviceBuildOptions` class to configure link inclusion during snapshot creation. - Enhanced `DeviceExporter` to include communication links when exporting devices. - Updated interfaces and entities to support link retrieval, export, and error handling. - Increased test coverage for edge cases and API interactions.
…le paramset deserialization - Added `ParamSetDictionaryValueConverter` to handle HomeMatic `getLinks` paramset conversion, tolerating deviations in XML-RPC response formats. - Updated `Link` model to include the new converter for `SenderParamSet` and `ReceiverParamSet`. - Introduced unit tests to ensure correct handling of various `XmlRpcValue` types, including edge cases.
- Introduced `UseEncoding` with `Encoding.Latin1` in `HomeMaticXmlRpcApiBuilder` to support custom character encoding.
- Updated unit tests to include mocking for `UseEncoding` in `HomeMaticXmlRpcApiBuilder`. - Ensured proper handling of `Encoding` in the API builder's test scenarios. - Improved null check validation and refactored test consistency.
This file contains hidden or 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
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.
No description provided.